From adecd4b1ea3e6e2ba481c8dabcfe038fa5ec50f8 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 19 Jul 2015 16:00:30 -0400 Subject: add support for the default stairs mod renamed the relevant enable setting --- node_defs.lua | 82 +++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 28 deletions(-) (limited to 'node_defs.lua') diff --git a/node_defs.lua b/node_defs.lua index c5ad566..cad3a07 100644 --- a/node_defs.lua +++ b/node_defs.lua @@ -173,37 +173,63 @@ for i in ipairs(moretrees.treelist) do }, }) - if minetest.get_modpath("moreblocks") and moretrees.enable_stairsplus then - --- 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", + if moretrees.enable_stairs then + if minetest.get_modpath("moreblocks") then + + -- 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", + "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", - } - ) - - 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", - } - ) + S(treedesc.." Trunk Stair"), + S(treedesc.." Trunk Slab"), + default.node_sound_wood_defaults() + ) + + 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 -- cgit v1.2.3