From 39d8e35463ff734677a25ecf7525d8a1d0d14a3c Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 14 Jun 2018 09:15:16 +0100 Subject: stairs no longer dependency this will only register straw stairs if mod is running. --- crops/wheat.lua | 34 +++++++++++++++++++--------------- 1 file 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 -- cgit v1.2.3