summaryrefslogtreecommitdiff
path: root/crops/wheat.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-06-14 09:12:02 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2018-06-14 09:12:02 +0100
commit83ef1cebb24d9862f18dac7a35f4b02765e94794 (patch)
treeafe7cb755f06450a9780d9cb0fb754e5ed23a52b /crops/wheat.lua
parent709f037ae72e11182be223e7681b5df6bf6b552c (diff)
stairs no longer dependency, will use only when found
Diffstat (limited to 'crops/wheat.lua')
-rw-r--r--crops/wheat.lua34
1 files changed, 19 insertions, 15 deletions
diff --git a/crops/wheat.lua b/crops/wheat.lua
index d53c33e..abf3ada 100644
--- a/crops/wheat.lua
+++ b/crops/wheat.lua
@@ -51,21 +51,25 @@ minetest.register_craft({
}
})
-if stairs and stairs.mod and stairs.mod == "redo" then
-
-stairs.register_all("straw", "farming:straw",
- {snappy = 3, flammable = 4},
- {"farming_straw.png"},
- "Straw",
- default.node_sound_leaves_defaults())
-else
-
-stairs.register_stair_and_slab("straw", "farming:straw",
- {snappy = 3, flammable = 4},
- {"farming_straw.png"},
- "Straw Stair",
- "Straw Slab",
- default.node_sound_leaves_defaults())
+-- check and register stairs
+if minetest.global_exists("stairs") then
+
+ if stairs.mod and stairs.mod == "redo" then
+
+ stairs.register_all("straw", "farming:straw",
+ {snappy = 3, flammable = 4},
+ {"farming_straw.png"},
+ "Straw",
+ default.node_sound_leaves_defaults())
+ else
+
+ stairs.register_stair_and_slab("straw", "farming:straw",
+ {snappy = 3, flammable = 4},
+ {"farming_straw.png"},
+ "Straw Stair",
+ "Straw Slab",
+ default.node_sound_leaves_defaults())
+ end
end
-- flour