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 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 -- Set this to true if you want the plantlike drawtype for leaves, which
-- improves some peoples' framerates without resorting to making leaf nodes opaque. -- improves some peoples' framerates without resorting to making leaf nodes opaque.

View File

@ -1,5 +1,6 @@
default default
plants_lib plants_lib
stairs?
moreblocks? moreblocks?
intllib? 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( stairsplus:register_all(
"moretrees", "moretrees",
treename.."_trunk", treename.."_trunk",
"moretrees:"..treename.."_trunk", "moretrees:"..treename.."_trunk",
{ {
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2, not_in_creative_inventory=1 }, groups = { snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2, not_in_creative_inventory=1 },
tiles = { tiles = {
"moretrees_"..treename.."_trunk_top.png", "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_top.png",
"moretrees_"..treename.."_trunk.png" "moretrees_"..treename.."_trunk.png"
}, },
description = S(treedesc.." Trunk"), S(treedesc.." Trunk Stair"),
drop = treename.."_trunk", S(treedesc.." Trunk Slab"),
} default.node_sound_wood_defaults()
) )
stairsplus:register_all( stairs.register_stair_and_slab(
"moretrees", "moretrees_"..treename.."_planks",
treename.."_planks", "moretrees:"..treename.."_planks",
"moretrees:"..treename.."_planks", { snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3 },
{ { "moretrees_"..treename.."_wood.png" },
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1 }, S(treedesc.." Planks Stair"),
tiles = { "moretrees_"..treename.."_wood.png" }, S(treedesc.." Planks Slab"),
description = S(treedesc.." Planks"), default.node_sound_wood_defaults()
drop = treename.."_planks", )
}
) end
end end
end end