diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-01-20 14:43:18 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-01-20 14:45:45 -0500 |
commit | d80cfb4a7f37758ef2ee0c75336028baac922677 (patch) | |
tree | 44be50b240b56fe24e210482ea0d065040f3a41a | |
parent | cd188b8ad231aa0a13396483bda6f2817a83e0cf (diff) |
Made surface-based sapling growth depend on surface value
in each tree's biome
-rw-r--r-- | init.lua | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -61,19 +61,15 @@ plantslib:register_generate_plant(moretrees.beech_biome, moretrees.beech_model) -- sapling growth setup -local sapling_interval = 500 -local sapling_chance = 10 +local sapling_interval = 1 +local sapling_chance = 1 for i in ipairs(simple_trees) do local tree_name = trees[i][1] local tree_model = tree_name.."_model" - dbg(dump(moretrees[tree_model])) + local tree_biome = tree_name.."_biome" - if tree_model == "palm_model" then - grow_nodes = {"default:sand"} - else - grow_nodes = {"default:dirt_with_grass"} - end + plantslib:dbg(dump(moretrees[tree_biome].surface)) plantslib:grow_plants( sapling_interval, @@ -81,7 +77,7 @@ for i in ipairs(simple_trees) do "moretrees:"..tree_name.."_sapling", nil, nil, - grow_nodes, + moretrees[tree_biome].surface, nil, nil, nil, |