diff options
author | tenplus1 <tenplus1@users.noreply.github.com> | 2018-06-14 09:15:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-14 09:15:16 +0100 |
commit | 39d8e35463ff734677a25ecf7525d8a1d0d14a3c (patch) | |
tree | a7c1face0986c953655488167991c8547c7d8c0b | |
parent | 709f037ae72e11182be223e7681b5df6bf6b552c (diff) |
stairs no longer dependency
this will only register straw stairs if mod is running.
-rw-r--r-- | crops/wheat.lua | 34 |
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 |