diff options
author | Wuzzy <almikes@aol.com> | 2016-08-06 17:44:37 +0200 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-08-06 17:44:37 +0200 |
commit | 1c11de10d5f66e920bc66eb2dbeb174a34624a53 (patch) | |
tree | cc2a670c203ea356d84ab5710e044a269e679af8 | |
parent | 7d039147e71bcc4e947be0f3bfb38707790263fb (diff) |
Add optional farming dependency for bag craft
-rw-r--r-- | bags.lua | 51 | ||||
-rw-r--r-- | depends.txt | 2 |
2 files changed, 27 insertions, 26 deletions
@@ -214,30 +214,31 @@ minetest.register_tool("unified_inventory:bag_large", { }) -- register bag crafts -minetest.register_craft({ - output = "unified_inventory:bag_small", - recipe = { - {"", "farming:cotton", ""}, - {"group:wool", "group:wool", "group:wool"}, - {"group:wool", "group:wool", "group:wool"}, - }, -}) - -minetest.register_craft({ - output = "unified_inventory:bag_medium", - recipe = { - {"", "", ""}, - {"farming:cotton", "unified_inventory:bag_small", "farming:cotton"}, - {"farming:cotton", "unified_inventory:bag_small", "farming:cotton"}, - }, -}) +if minetest.get_modpath("farming") ~= nil then + minetest.register_craft({ + output = "unified_inventory:bag_small", + recipe = { + {"", "farming:cotton", ""}, + {"group:wool", "group:wool", "group:wool"}, + {"group:wool", "group:wool", "group:wool"}, + }, + }) -minetest.register_craft({ - output = "unified_inventory:bag_large", - recipe = { - {"", "", ""}, - {"farming:cotton", "unified_inventory:bag_medium", "farming:cotton"}, - {"farming:cotton", "unified_inventory:bag_medium", "farming:cotton"}, - }, -}) + minetest.register_craft({ + output = "unified_inventory:bag_medium", + recipe = { + {"", "", ""}, + {"farming:cotton", "unified_inventory:bag_small", "farming:cotton"}, + {"farming:cotton", "unified_inventory:bag_small", "farming:cotton"}, + }, + }) + minetest.register_craft({ + output = "unified_inventory:bag_large", + recipe = { + {"", "", ""}, + {"farming:cotton", "unified_inventory:bag_medium", "farming:cotton"}, + {"farming:cotton", "unified_inventory:bag_medium", "farming:cotton"}, + }, + }) +end diff --git a/depends.txt b/depends.txt index a1ea556..3879b2c 100644 --- a/depends.txt +++ b/depends.txt @@ -1,4 +1,4 @@ creative? intllib? datastorage? - +farming? |