From: Vanessa Ezekowitz Date: Tue, 22 Jan 2013 01:52:04 +0000 (-0500) Subject: Added fir cones, more tweaks to weed out old conifer/jungletree refs. X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=71e0fce57ae1b5c84c822afe289cf048fa30687b;p=zefram%2Fminetest%2Fmoretrees.git Added fir cones, more tweaks to weed out old conifer/jungletree refs. Changed fir models so that they include the new cones. --- diff --git a/biome_defs.lua b/biome_defs.lua index 3c8fa8c..827e092 100644 --- a/biome_defs.lua +++ b/biome_defs.lua @@ -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, diff --git a/init.lua b/init.lua index 40a8dc2..c6f5bd7 100644 --- 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 diff --git a/node_defs.lua b/node_defs.lua index 38ed950..4036a48 100644 --- a/node_defs.lua +++ b/node_defs.lua @@ -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 index 0000000..b40c94e Binary files /dev/null and b/textures/moretrees_fir_cone.png differ diff --git a/tree_biomes.txt b/tree_biomes.txt index 9b5fcad..71814f3 100644 --- a/tree_biomes.txt +++ b/tree_biomes.txt @@ -3,7 +3,7 @@ Tree type (m) (approx., °C) some node water to spawn on seed diff radius ----------------------------------------------------------------------------------------------------------------------- jungle tree - 5 to +10 above +26 water, 15 10 dirt_with_grass 329 7 -fir (conifers) above +25 -20 to +10 n/a n/a dirt_with_grass 359 8 +fir above +25 -20 to +10 n/a n/a dirt_with_grass 359 8 palm - 1 to + 1 +18 to +32 water, 15 10 sand 330 5 apple + 1 to +10 +23 to +32 n/a n/a dirt_with grass 331 15 oak 0 to +10 + 4 to +16 n/a n/a dirt_with grass 332 15 diff --git a/tree_models.lua b/tree_models.lua index a355a0d..e9e03e9 100644 --- a/tree_models.lua +++ b/tree_models.lua @@ -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 }