summaryrefslogtreecommitdiff
path: root/node_defs.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-07-19 16:00:30 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-07-19 16:00:30 -0400
commitadecd4b1ea3e6e2ba481c8dabcfe038fa5ec50f8 (patch)
tree859e2676237b69d44de540fc8e724cc86b493283 /node_defs.lua
parent5048d4e894e40608a318fad88ee1cf8a79150b46 (diff)
add support for the default stairs mod
renamed the relevant enable setting
Diffstat (limited to 'node_defs.lua')
-rw-r--r--node_defs.lua82
1 files changed, 54 insertions, 28 deletions
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