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

add support for the default stairs mod

renamed the relevant enable setting
This commit is contained in:
Vanessa Ezekowitz 2015-07-19 16:00:30 -04:00
parent 5048d4e894
commit adecd4b1ea
3 changed files with 56 additions and 27 deletions

View File

@ -22,9 +22,11 @@ moretrees.enable_beech = false
moretrees.spawn_saplings = false
-- Set this to true to allow usage of the stairsplus mod in moreblocks
-- Set this to true to allow defining stairs/slabs/etc. If Moreblocks is
-- installed, this will use that mod's Stairs Plus component. Otherwise, it
-- will use the default stairs mod in minetest_game, if present
moretrees.enable_stairsplus = true
moretrees.enable_stairs = true
-- Set this to true if you want the plantlike drawtype for leaves, which
-- improves some peoples' framerates without resorting to making leaf nodes opaque.

View File

@ -1,5 +1,6 @@
default
plants_lib
stairs?
moreblocks?
intllib?

View File

@ -173,37 +173,63 @@ for i in ipairs(moretrees.treelist) do
},
})
if minetest.get_modpath("moreblocks") and moretrees.enable_stairsplus then
if moretrees.enable_stairs then
if minetest.get_modpath("moreblocks") then
-- stairsplus:register_all(modname, subname, recipeitem, {fields})
-- stairsplus:register_all(modname, subname, recipeitem, {fields})
stairsplus:register_all(
"moretrees",
treename.."_trunk",
"moretrees:"..treename.."_trunk",
{
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2, not_in_creative_inventory=1 },
tiles = {
"moretrees_"..treename.."_trunk_top.png",
stairsplus:register_all(
"moretrees",
treename.."_trunk",
"moretrees:"..treename.."_trunk",
{
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2, not_in_creative_inventory=1 },
tiles = {
"moretrees_"..treename.."_trunk_top.png",
"moretrees_"..treename.."_trunk_top.png",
"moretrees_"..treename.."_trunk.png"
},
description = S(treedesc.." Trunk"),
drop = treename.."_trunk",
}
)
stairsplus:register_all(
"moretrees",
treename.."_planks",
"moretrees:"..treename.."_planks",
{
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1 },
tiles = { "moretrees_"..treename.."_wood.png" },
description = S(treedesc.." Planks"),
drop = treename.."_planks",
}
)
elseif minetest.get_modpath("stairs") then
stairs.register_stair_and_slab(
"moretrees_"..treename.."_trunk",
"moretrees:"..treename.."_trunk",
{ snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2 },
{ "moretrees_"..treename.."_trunk_top.png",
"moretrees_"..treename.."_trunk_top.png",
"moretrees_"..treename.."_trunk.png"
},
description = S(treedesc.." Trunk"),
drop = treename.."_trunk",
}
)
S(treedesc.." Trunk Stair"),
S(treedesc.." Trunk Slab"),
default.node_sound_wood_defaults()
)
stairsplus:register_all(
"moretrees",
treename.."_planks",
"moretrees:"..treename.."_planks",
{
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1 },
tiles = { "moretrees_"..treename.."_wood.png" },
description = S(treedesc.." Planks"),
drop = treename.."_planks",
}
)
stairs.register_stair_and_slab(
"moretrees_"..treename.."_planks",
"moretrees:"..treename.."_planks",
{ snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3 },
{ "moretrees_"..treename.."_wood.png" },
S(treedesc.." Planks Stair"),
S(treedesc.." Planks Slab"),
default.node_sound_wood_defaults()
)
end
end
end