summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-04-06 17:21:11 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-04-06 17:21:11 -0400
commitd877bd51bb0246addc01477396af31c6d67fe0f4 (patch)
tree61b46d9b96b6d110e0297f1981b8342a2f839947 /init.lua
parent89e1cb49bd0a1132f3139fa92b174f9dbd469838 (diff)
Added settings to enable/disable each tree type, all default to enabled.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua58
1 files changed, 44 insertions, 14 deletions
diff --git a/init.lua b/init.lua
index 894c1c9..c58b419 100644
--- a/init.lua
+++ b/init.lua
@@ -32,20 +32,50 @@ dofile(minetest.get_modpath("moretrees").."/saplings.lua")
-- tree spawning setup
-plantslib:register_generate_plant(moretrees.apple_tree_biome, moretrees.apple_tree_model)
-plantslib:register_generate_plant(moretrees.oak_biome, moretrees.oak_model)
-plantslib:register_generate_plant(moretrees.sequoia_biome, moretrees.sequoia_model)
-plantslib:register_generate_plant(moretrees.palm_biome, moretrees.palm_model)
-plantslib:register_generate_plant(moretrees.pine_biome, moretrees.pine_model)
-plantslib:register_generate_plant(moretrees.rubber_tree_biome, moretrees.rubber_tree_model)
-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.fir_biome, "moretrees:grow_fir")
-
-plantslib:register_generate_plant(moretrees.fir_biome_snow, "moretrees:grow_fir_snow")
+if moretrees.enable_apple_tree then
+ plantslib:register_generate_plant(moretrees.apple_tree_biome, moretrees.apple_tree_model)
+end
+
+if moretrees.enable_oak then
+ plantslib:register_generate_plant(moretrees.oak_biome, moretrees.oak_model)
+end
+
+if moretrees.enable_sequoia then
+ plantslib:register_generate_plant(moretrees.sequoia_biome, moretrees.sequoia_model)
+end
+
+if moretrees.enable_palm then
+ plantslib:register_generate_plant(moretrees.palm_biome, moretrees.palm_model)
+end
+
+if moretrees.enable_pine then
+ plantslib:register_generate_plant(moretrees.pine_biome, moretrees.pine_model)
+end
+
+if moretrees.enable_rubber_tree then
+ plantslib:register_generate_plant(moretrees.rubber_tree_biome, moretrees.rubber_tree_model)
+end
+
+if moretrees.enable_willow then
+ plantslib:register_generate_plant(moretrees.willow_biome, moretrees.willow_model)
+end
+
+if moretrees.enable_birch then
+ plantslib:register_generate_plant(moretrees.birch_biome, "moretrees:grow_birch")
+end
+
+if moretrees.enable_spruce then
+ plantslib:register_generate_plant(moretrees.spruce_biome, "moretrees:grow_spruce")
+end
+
+if moretrees.enable_jungle_tree then
+ plantslib:register_generate_plant(moretrees.jungletree_biome, "moretrees:grow_jungletree")
+end
+
+if moretrees.enable_fir then
+ plantslib:register_generate_plant(moretrees.fir_biome, "moretrees:grow_fir")
+ plantslib:register_generate_plant(moretrees.fir_biome_snow, "moretrees:grow_fir_snow")
+end
-- Code to spawn a birch tree