Added fir cones, more tweaks to weed out old conifer/jungletree refs.
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Tue, 22 Jan 2013 01:52:04 +0000 (20:52 -0500)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Tue, 22 Jan 2013 02:08:11 +0000 (21:08 -0500)
Changed fir models so that they include the new cones.

biome_defs.lua
init.lua
node_defs.lua
textures/moretrees_fir_cone.png [new file with mode: 0644]
tree_biomes.txt
tree_models.lua

index 3c8fa8c3a4b581456ce562d066914ac8d7f0644c..827e092b6694fc7f91e2c2a3f440ad22b3650d50 100644 (file)
@@ -156,7 +156,7 @@ moretrees.jungletree_biome = {
        rarity = 50,
 }
 
-moretrees.conifer_biome = {
+moretrees.fir_biome = {
        surface = "default:dirt_with_grass",
        avoid_nodes = moretrees.avoidnodes,
        avoid_radius = 10,
index 40a8dc27fd2db15199101fd84f46c59ade641af4..c6f5bd7395ec5d75a5084c9423ddafd811edfa0e 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -47,7 +47,7 @@ plantslib:register_generate_plant(moretrees.willow_biome, moretrees.willow_model
 plantslib:register_generate_plant(moretrees.birch_biome, "moretrees:grow_birch")
 plantslib:register_generate_plant(moretrees.spruce_biome, "moretrees:grow_spruce")
 plantslib:register_generate_plant(moretrees.jungletree_biome, "moretrees:grow_jungletree")
-plantslib:register_generate_plant(moretrees.conifer_biome, "moretrees:grow_fir")
+plantslib:register_generate_plant(moretrees.fir_biome, "moretrees:grow_fir")
 
 -- These three lines replace default trees with beech
 -- Enable them if you want but be warned - due to serious bugs in the speed
@@ -61,7 +61,7 @@ plantslib:register_generate_plant(moretrees.beech_biome, moretrees.beech_model)
 
 -- sapling growth setup
 
-local sapling_interval = 500
+local sapling_interval = 500    
 local sapling_chance = 10
 
 for i in ipairs(simple_trees) do
@@ -90,7 +90,7 @@ end
 
 plantslib:grow_plants(sapling_interval,sapling_chance,"moretrees:birch_sapling",nil,nil,nil,nil,nil,nil,nil,nil,"moretrees:grow_birch",nil)
 plantslib:grow_plants(sapling_interval,sapling_chance,"moretrees:spruce_sapling",nil,nil,nil,nil,nil,nil,nil,nil,"moretrees:grow_spruce",nil)
-plantslib:grow_plants(sapling_interval,sapling_chance,"moretrees:conifer_sapling",nil,nil,nil,nil,nil,nil,nil,nil,"moretrees:grow_fir",nil)
+plantslib:grow_plants(sapling_interval,sapling_chance,"moretrees:fir_sapling",nil,nil,nil,nil,nil,nil,nil,nil,"moretrees:grow_fir",nil)
 plantslib:grow_plants(sapling_interval,sapling_chance,"moretrees:jungletree_sapling",nil,nil,nil,nil,nil,nil,nil,nil,"moretrees:grow_jungletree",nil)
 
 -- Code to spawn a birch tree
@@ -115,7 +115,7 @@ function moretrees:grow_spruce(pos)
        end
 end
 
--- Code that spawns jungle trees and firs ("conifer")
+-- Code that spawns jungle trees and firs
 
 moretrees.jt_axiom1 = "FFFA"
 moretrees.jt_rules_a1 = "FFF[&&-FBf[&&&Ff]^^^Ff][&&+FBFf[&&&FFf]^^^Ff][&&---FBFf[&&&Ff]^^^Ff][&&+++FBFf[&&&Ff]^^^Ff]F/A"
@@ -171,16 +171,16 @@ end
 
 function moretrees:grow_fir(pos)
        if math.random(2) == 1 then
-               moretrees.conifer_model.leaves="moretrees:fir_leaves"
+               moretrees.fir_model.leaves="moretrees:fir_leaves"
        else
-               moretrees.conifer_model.leaves="moretrees:fir_leaves_special"
+               moretrees.fir_model.leaves="moretrees:fir_leaves_special"
        end
        if math.random(2) == 1 then
-               moretrees.conifer_model.rules_a = moretrees.ct_rules_a1
-               moretrees.conifer_model.rules_b = moretrees.ct_rules_b1
+               moretrees.fir_model.rules_a = moretrees.ct_rules_a1
+               moretrees.fir_model.rules_b = moretrees.ct_rules_b1
        else
-               moretrees.conifer_model.rules_a = moretrees.ct_rules_a2
-               moretrees.conifer_model.rules_b = moretrees.ct_rules_b2
+               moretrees.fir_model.rules_a = moretrees.ct_rules_a2
+               moretrees.fir_model.rules_b = moretrees.ct_rules_b2
        end
 
        minetest.env:remove_node(pos)
@@ -188,7 +188,7 @@ function moretrees:grow_fir(pos)
        for leaf in ipairs(leaves) do
                        minetest.env:remove_node(leaves[leaf])
        end
-       minetest.env:spawn_tree(pos,moretrees.conifer_model)
+       minetest.env:spawn_tree(pos,moretrees.fir_model)
 end
 
 
index 38ed95009dcb0be48073be894f653d5ed933ac52..4036a480ec5ed0c76d1f7a1313fe0c27c4615ed8 100644 (file)
@@ -324,7 +324,21 @@ minetest.register_node("moretrees:fir_sapling", {
        sounds = default.node_sound_defaults(),
 })
 
-
+minetest.register_node("moretrees:fir_cone", {
+       description = "Fir cone",
+       drawtype = "plantlike",
+       visual_scale = 0.8,
+       tiles = {"moretrees_fir_cone.png"},
+       paramtype = "light",
+       sunlight_propagates = true,
+       walkable = false,
+       groups = {fleshy=3,dig_immediate=3,flammable=2},
+       sounds = default.node_sound_defaults(),
+       selection_box = {
+               type = "fixed",
+                       fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
+               },
+})
 
 -- Backward compatbility with old mods/nodes:
 
diff --git a/textures/moretrees_fir_cone.png b/textures/moretrees_fir_cone.png
new file mode 100644 (file)
index 0000000..b40c94e
Binary files /dev/null and b/textures/moretrees_fir_cone.png differ
index 9b5fcad9f69f51010530b367fa7b938e7d89485a..71814f30c6a416a2760ad23a13e7b0b66010fa24 100644 (file)
@@ -3,7 +3,7 @@
 Tree type         (m)          (approx., °C)  some node       water   to spawn on             seed diff       radius\r
 -----------------------------------------------------------------------------------------------------------------------\r
 jungle tree    - 5 to +10       above +26      water, 15         10    dirt_with_grass         329              7\r
-fir (conifers)  above +25      -20 to +10        n/a           n/a     dirt_with_grass         359              8\r
+fir             above +25      -20 to +10        n/a           n/a     dirt_with_grass         359              8\r
 palm           - 1 to + 1      +18 to +32      water, 15         10    sand                    330              5\r
 apple          + 1 to +10      +23 to +32        n/a           n/a     dirt_with grass         331             15\r
 oak              0 to +10      + 4 to +16        n/a           n/a     dirt_with grass         332             15\r
index a355a0d91924ca3625f6b7d258687f6e62a85623..e9e03e9659e1fb0e563c945af502d31db790fb25 100644 (file)
@@ -194,12 +194,12 @@ moretrees.jungletree_model={
        iterations=nil,
        random_level=2,
        trunk_type=nil,
-       thin_branches=true;
+       thin_branches=true,
        fruit_chance=15,
        fruit="vines:vine"
 }
 
-moretrees.conifer_model={
+moretrees.fir_model={
        axiom="FFFAF[&&-F][&&+F][&&---F][&&+++F]Fff",
        rules_a=nil,
        rules_b=nil,
@@ -209,5 +209,7 @@ moretrees.conifer_model={
        iterations=7,
        random_level=5,
        trunk_type="single",
-       thin_branches=true
+       thin_branches=true,
+       fruit="moretrees:fir_cone",
+       fruit_chance=8
 }