summaryrefslogtreecommitdiff
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
parent5048d4e894e40608a318fad88ee1cf8a79150b46 (diff)
add support for the default stairs mod
renamed the relevant enable setting
-rw-r--r--default_settings.txt6
-rw-r--r--depends.txt1
-rw-r--r--node_defs.lua82
3 files changed, 59 insertions, 30 deletions
diff --git a/default_settings.txt b/default_settings.txt
index 5c69324..29c9d24 100644
--- a/default_settings.txt
+++ b/default_settings.txt
@@ -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.
diff --git a/depends.txt b/depends.txt
index 1cd5974..3e8cf2d 100644
--- a/depends.txt
+++ b/depends.txt
@@ -1,5 +1,6 @@
default
plants_lib
+stairs?
moreblocks?
intllib?
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