1
0
mirror of https://github.com/mt-mods/moretrees.git synced 2024-12-24 17:50:24 +01:00

Made moreblocks dependency optional and configurable

This commit is contained in:
Vanessa Ezekowitz 2013-07-22 03:55:12 -04:00
parent 1377d69f54
commit d32993e355
3 changed files with 129 additions and 123 deletions

View File

@ -2,22 +2,26 @@
-- Enable the various kinds of trees. -- Enable the various kinds of trees.
moretrees.enable_apple_tree = true moretrees.enable_apple_tree = true
moretrees.enable_oak = true moretrees.enable_oak = true
moretrees.enable_sequoia = true moretrees.enable_sequoia = true
moretrees.enable_palm = true moretrees.enable_palm = true
moretrees.enable_pine = true moretrees.enable_pine = true
moretrees.enable_rubber_tree = true moretrees.enable_rubber_tree = true
moretrees.enable_willow = true moretrees.enable_willow = true
moretrees.enable_birch = true moretrees.enable_birch = true
moretrees.enable_spruce = true moretrees.enable_spruce = true
moretrees.enable_jungle_tree = true moretrees.enable_jungle_tree = true
moretrees.enable_fir = true moretrees.enable_fir = true
moretrees.enable_beech = false 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. -- 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 -- 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 -- 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 -- 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. -- 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 -- Enable this if you want moretrees to redefine default apples so that they
-- fall when leaves decay/are dug. -- fall when leaves decay/are dug.
moretrees.enable_redefine_apple = true moretrees.enable_redefine_apple = true
-- various settings to configure leaf decay in general. -- various settings to configure leaf decay in general.
moretrees.leafdecay_delay = 2 moretrees.leafdecay_delay = 2
moretrees.leafdecay_chance = 200 moretrees.leafdecay_chance = 200
moretrees.leafdecay_radius = 5 moretrees.leafdecay_radius = 5
moretrees.palm_leafdecay_radius = 12 moretrees.palm_leafdecay_radius = 12
moretrees.default_leafdecay_delay = 3 moretrees.default_leafdecay_delay = 3
moretrees.default_leafdecay_chance = 100 moretrees.default_leafdecay_chance = 100
moretrees.default_leafdecay_radius = 4 moretrees.default_leafdecay_radius = 4
-- Change these settings if you want default trees to be gradually cut down -- Change these settings if you want default trees to be gradually cut down
-- above the elevation where firs normally generate. -- above the elevation where firs normally generate.
moretrees.firs_remove_default_trees = false moretrees.firs_remove_default_trees = false
moretrees.firs_remove_interval = 2 moretrees.firs_remove_interval = 2
moretrees.firs_remove_chance = 150 moretrees.firs_remove_chance = 150
-- Sapling settings -- Sapling settings
moretrees.sapling_interval = 500 moretrees.sapling_interval = 500
moretrees.sapling_chance = 20 moretrees.sapling_chance = 20

View File

@ -1,4 +1,4 @@
default default
plants_lib plants_lib
moreblocks moreblocks?

View File

@ -86,110 +86,112 @@ for i in ipairs(moretrees.treelist) do
}, },
}) })
register_stair( if minetest.get_modpath("moreblocks") and moretrees.enable_stairsplus then
"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( register_stair(
"moretrees", "moretrees",
treename.."_trunk", treename.."_trunk",
"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 }, { 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_top.png", "moretrees_"..treename.."_trunk_top.png",
"moretrees_"..treename.."_trunk.png" "moretrees_"..treename.."_trunk.png"
}, },
treedesc.." Trunk", treedesc.." Trunk",
treename.."_trunk", treename.."_trunk",
0 0
) )
register_panel( register_slab(
"moretrees", "moretrees",
treename.."_trunk", treename.."_trunk",
"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 }, { 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_top.png", "moretrees_"..treename.."_trunk_top.png",
"moretrees_"..treename.."_trunk.png" "moretrees_"..treename.."_trunk.png"
}, },
treedesc.." Trunk", treedesc.." Trunk",
treename.."_trunk", treename.."_trunk",
0 0
) )
register_micro( register_panel(
"moretrees", "moretrees",
treename.."_trunk", treename.."_trunk",
"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 }, { 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_top.png", "moretrees_"..treename.."_trunk_top.png",
"moretrees_"..treename.."_trunk.png" "moretrees_"..treename.."_trunk.png"
}, },
treedesc.." Trunk", treedesc.." Trunk",
treename.."_trunk", treename.."_trunk",
0 0
) )
register_stair( register_micro(
"moretrees", "moretrees",
treename.."_planks", treename.."_trunk",
"moretrees:"..treename.."_planks", "moretrees:"..treename.."_trunk",
{ snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_stair=1 }, { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_micro=1 },
{ "moretrees_"..treename.."_wood.png" }, { "moretrees_"..treename.."_trunk_top.png",
treedesc.." Planks", "moretrees_"..treename.."_trunk_top.png",
treename.."_planks", "moretrees_"..treename.."_trunk.png"
0 },
) treedesc.." Trunk",
treename.."_trunk",
0
)
register_slab( register_stair(
"moretrees", "moretrees",
treename.."_planks", treename.."_planks",
"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 }, { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_stair=1 },
{ "moretrees_"..treename.."_wood.png" }, { "moretrees_"..treename.."_wood.png" },
treedesc.." Planks", treedesc.." Planks",
treename.."_planks", treename.."_planks",
0 0
) )
register_panel( register_slab(
"moretrees", "moretrees",
treename.."_planks", treename.."_planks",
"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 }, { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_slab=1 },
{ "moretrees_"..treename.."_wood.png" }, { "moretrees_"..treename.."_wood.png" },
treedesc.." Planks", treedesc.." Planks",
treename.."_planks", treename.."_planks",
0 0
) )
register_micro( register_panel(
"moretrees", "moretrees",
treename.."_planks", treename.."_planks",
"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 }, { snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_panel=1 },
{ "moretrees_"..treename.."_wood.png" }, { "moretrees_"..treename.."_wood.png" },
treedesc.." Planks", treedesc.." Planks",
treename.."_planks", treename.."_planks",
0 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.."_trunk")
table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_planks") table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_planks")
end
end end
if (fruit ~= nil) then if (fruit ~= nil) then