diff options
Diffstat (limited to 'crops')
-rw-r--r-- | crops/hemp.lua | 33 | ||||
-rw-r--r-- | crops/wheat.lua | 34 |
2 files changed, 37 insertions, 30 deletions
diff --git a/crops/hemp.lua b/crops/hemp.lua index dd49134..e3278f9 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -111,21 +111,24 @@ minetest.register_craft( { }, }) --- register stairs -if stairs and stairs.mod and stairs.mod == "redo" then - -stairs.register_all("hemp_block", "farming:hemp_block", - {snappy = 1, flammable = 2}, - {"farming_hemp_block.png"}, - "Hemp Block", - default.node_sound_leaves_defaults()) -else - -stairs.register_stair_and_slab("hemp_block", "farming:hemp_block", - {snappy = 1, flammable = 2}, - {"farming_hemp_block.png"}, - "Hemp Block", - 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("hemp_block", "farming:hemp_block", + {snappy = 1, flammable = 2}, + {"farming_hemp_block.png"}, + "Hemp Block", + default.node_sound_leaves_defaults()) + else + + stairs.register_stair_and_slab("hemp_block", "farming:hemp_block", + {snappy = 1, flammable = 2}, + {"farming_hemp_block.png"}, + "Hemp Block", + default.node_sound_leaves_defaults()) + end end -- paper 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 |