Made moreblocks dependency optional and configurable
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Mon, 22 Jul 2013 07:55:12 +0000 (03:55 -0400)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Mon, 22 Jul 2013 07:55:12 +0000 (03:55 -0400)
default_settings.txt
depends.txt
node_defs.lua

index 766d1933598853bc21536dfc4c51f61bb99f2c4f..e13b0aae6cf1a667c13b5a8263f8dedaccab4dcf 100644 (file)
@@ -2,22 +2,26 @@
 
 -- Enable the various kinds of trees.
 
-moretrees.enable_apple_tree    = true
-moretrees.enable_oak           = true
-moretrees.enable_sequoia       = true
-moretrees.enable_palm          = true
-moretrees.enable_pine          = true
-moretrees.enable_rubber_tree   = true
-moretrees.enable_willow                = true
-moretrees.enable_birch         = true
-moretrees.enable_spruce                = true
-moretrees.enable_jungle_tree   = true
-moretrees.enable_fir           = true
-moretrees.enable_beech         = false
+moretrees.enable_apple_tree            = true
+moretrees.enable_oak                   = true
+moretrees.enable_sequoia               = true
+moretrees.enable_palm                  = true
+moretrees.enable_pine                  = true
+moretrees.enable_rubber_tree           = true
+moretrees.enable_willow                        = true
+moretrees.enable_birch                 = true
+moretrees.enable_spruce                        = true
+moretrees.enable_jungle_tree           = true
+moretrees.enable_fir                   = true
+moretrees.enable_beech                 = false
+
+-- Set this to true to allow usage of the stairsplus mod in moreblocks
+
+moretrees.enable_stairsplus            = true
 
 -- Set this to true to enable leaf decay of all trees except the default ones.
 
-moretrees.enable_leafdecay = true
+moretrees.enable_leafdecay             = true
 
 -- Enable this one if you want this mod's leafdecay code to affect the old
 -- default trees too; this setting is independent of the one above.  You'll
@@ -25,33 +29,33 @@ moretrees.enable_leafdecay = true
 -- you enable this, otherwise you'll have two sets of leaf decay code running
 -- at the same time, which will just waste CPU for no benefit.
 
-moretrees.enable_default_leafdecay = true
+moretrees.enable_default_leafdecay     = true
 
 -- Enable this if you want moretrees to redefine default apples so that they
 -- fall when leaves decay/are dug.
 
-moretrees.enable_redefine_apple = true
+moretrees.enable_redefine_apple                = true
 
 -- various settings to configure leaf decay in general.
 
-moretrees.leafdecay_delay = 2
-moretrees.leafdecay_chance = 200
-moretrees.leafdecay_radius = 5
+moretrees.leafdecay_delay              = 2
+moretrees.leafdecay_chance             = 200
+moretrees.leafdecay_radius             = 5
 
-moretrees.palm_leafdecay_radius = 12
+moretrees.palm_leafdecay_radius                = 12
 
-moretrees.default_leafdecay_delay = 3
-moretrees.default_leafdecay_chance = 100
-moretrees.default_leafdecay_radius = 4
+moretrees.default_leafdecay_delay      = 3
+moretrees.default_leafdecay_chance     = 100
+moretrees.default_leafdecay_radius     = 4
 
 -- Change these settings if you want default trees to be gradually cut down
 -- above the elevation where firs normally generate.
 
-moretrees.firs_remove_default_trees = false
-moretrees.firs_remove_interval = 2
-moretrees.firs_remove_chance = 150
+moretrees.firs_remove_default_trees    = false
+moretrees.firs_remove_interval         = 2
+moretrees.firs_remove_chance           = 150
 
 -- Sapling settings
 
-moretrees.sapling_interval = 500
-moretrees.sapling_chance = 20
+moretrees.sapling_interval             = 500
+moretrees.sapling_chance               = 20
index 59c3cba3fcb17171a32ea244f9840c4a30d815ec..cacd7e66d568faf9b179b12e195fe633ec2cc0f7 100644 (file)
@@ -1,4 +1,4 @@
 default
 plants_lib
-moreblocks
+moreblocks?
 
index 9230ad1b862e5d849a8cbd2c9f56fa966bc40e38..b02a6a242db5974985442e77c249b313574439f2 100644 (file)
@@ -86,110 +86,112 @@ for i in ipairs(moretrees.treelist) do
                        },
                })
 
-               register_stair(
-                       "moretrees",
-                       treename.."_trunk",
-                       "moretrees:"..treename.."_trunk",
-                       { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_stair=1 },
-                       {       "moretrees_"..treename.."_trunk_top.png",
-                               "moretrees_"..treename.."_trunk_top.png",
-                               "moretrees_"..treename.."_trunk.png"
-                       },
-                       treedesc.." Trunk",
-                       treename.."_trunk",
-                       0
-               )
-
-               register_slab(
-                       "moretrees",
-                       treename.."_trunk",
-                       "moretrees:"..treename.."_trunk",
-                       { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_slab=1 },
-                       {       "moretrees_"..treename.."_trunk_top.png",
-                               "moretrees_"..treename.."_trunk_top.png",
-                               "moretrees_"..treename.."_trunk.png"
-                       },
-                       treedesc.." Trunk",
-                       treename.."_trunk",
-                       0
-               )
-
-               register_panel(
-                       "moretrees",
-                       treename.."_trunk",
-                       "moretrees:"..treename.."_trunk",
-                       { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_panel=1 },
-                       {       "moretrees_"..treename.."_trunk_top.png",
-                               "moretrees_"..treename.."_trunk_top.png",
-                               "moretrees_"..treename.."_trunk.png"
-                       },
-                       treedesc.." Trunk",
-                       treename.."_trunk",
-                       0
-               )
-
-               register_micro(
-                       "moretrees",
-                       treename.."_trunk",
-                       "moretrees:"..treename.."_trunk",
-                       { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_micro=1 },
-                       {       "moretrees_"..treename.."_trunk_top.png",
-                               "moretrees_"..treename.."_trunk_top.png",
-                               "moretrees_"..treename.."_trunk.png"
-                       },
-                       treedesc.." Trunk",
-                       treename.."_trunk",
-                       0
-               )
-
-               register_stair(
-                       "moretrees",
-                       treename.."_planks",
-                       "moretrees:"..treename.."_planks",
-                       { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_stair=1 },
-                       { "moretrees_"..treename.."_wood.png" },
-                       treedesc.." Planks",
-                       treename.."_planks",
-                       0
-               )
-
-               register_slab(
-                       "moretrees",
-                       treename.."_planks",
-                       "moretrees:"..treename.."_planks",
-                       { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_slab=1 },
-                       { "moretrees_"..treename.."_wood.png" },
-                       treedesc.." Planks",
-                       treename.."_planks",
-                       0
-               )
-
-               register_panel(
-                       "moretrees",
-                       treename.."_planks",
-                       "moretrees:"..treename.."_planks",
-                       { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_panel=1 },
-                       { "moretrees_"..treename.."_wood.png" },
-                       treedesc.." Planks",
-                       treename.."_planks",
-                       0
-               )
-
-               register_micro(
-                       "moretrees",
-                       treename.."_planks",
-                       "moretrees:"..treename.."_planks",
-                       { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_micro=1 },
-                       { "moretrees_"..treename.."_wood.png" },
-                       treedesc.." Planks",
-                       treename.."_planks",
-                       0
-               )
-
-
-               table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_trunk")
-               table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_planks")
-
+               if minetest.get_modpath("moreblocks") and moretrees.enable_stairsplus then
+
+                       register_stair(
+                               "moretrees",
+                               treename.."_trunk",
+                               "moretrees:"..treename.."_trunk",
+                               { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_stair=1 },
+                               {       "moretrees_"..treename.."_trunk_top.png",
+                                       "moretrees_"..treename.."_trunk_top.png",
+                                       "moretrees_"..treename.."_trunk.png"
+                               },
+                               treedesc.." Trunk",
+                               treename.."_trunk",
+                               0
+                       )
+
+                       register_slab(
+                               "moretrees",
+                               treename.."_trunk",
+                               "moretrees:"..treename.."_trunk",
+                               { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_slab=1 },
+                               {       "moretrees_"..treename.."_trunk_top.png",
+                                       "moretrees_"..treename.."_trunk_top.png",
+                                       "moretrees_"..treename.."_trunk.png"
+                               },
+                               treedesc.." Trunk",
+                               treename.."_trunk",
+                               0
+                       )
+
+                       register_panel(
+                               "moretrees",
+                               treename.."_trunk",
+                               "moretrees:"..treename.."_trunk",
+                               { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_panel=1 },
+                               {       "moretrees_"..treename.."_trunk_top.png",
+                                       "moretrees_"..treename.."_trunk_top.png",
+                                       "moretrees_"..treename.."_trunk.png"
+                               },
+                               treedesc.." Trunk",
+                               treename.."_trunk",
+                               0
+                       )
+
+                       register_micro(
+                               "moretrees",
+                               treename.."_trunk",
+                               "moretrees:"..treename.."_trunk",
+                               { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_micro=1 },
+                               {       "moretrees_"..treename.."_trunk_top.png",
+                                       "moretrees_"..treename.."_trunk_top.png",
+                                       "moretrees_"..treename.."_trunk.png"
+                               },
+                               treedesc.." Trunk",
+                               treename.."_trunk",
+                               0
+                       )
+
+                       register_stair(
+                               "moretrees",
+                               treename.."_planks",
+                               "moretrees:"..treename.."_planks",
+                               { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_stair=1 },
+                               { "moretrees_"..treename.."_wood.png" },
+                               treedesc.." Planks",
+                               treename.."_planks",
+                               0
+                       )
+
+                       register_slab(
+                               "moretrees",
+                               treename.."_planks",
+                               "moretrees:"..treename.."_planks",
+                               { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_slab=1 },
+                               { "moretrees_"..treename.."_wood.png" },
+                               treedesc.." Planks",
+                               treename.."_planks",
+                               0
+                       )
+
+                       register_panel(
+                               "moretrees",
+                               treename.."_planks",
+                               "moretrees:"..treename.."_planks",
+                               { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_panel=1 },
+                               { "moretrees_"..treename.."_wood.png" },
+                               treedesc.." Planks",
+                               treename.."_planks",
+                               0
+                       )
+
+                       register_micro(
+                               "moretrees",
+                               treename.."_planks",
+                               "moretrees:"..treename.."_planks",
+                               { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_micro=1 },
+                               { "moretrees_"..treename.."_wood.png" },
+                               treedesc.." Planks",
+                               treename.."_planks",
+                               0
+                       )
+
+
+                       table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_trunk")
+                       table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_planks")
+               end
        end
 
        if (fruit ~= nil) then