diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-08-07 12:57:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-07 12:57:06 -0400 |
commit | 8332707198f0e1a35b8e1683feaccce5280e0da3 (patch) | |
tree | ff6f6eb31317ceec6121ff8132ae118a5f6bd1c1 /bags.lua | |
parent | 6ec72eba74ab832da3cd79cdf37d1dd9a4603720 (diff) | |
parent | 1c11de10d5f66e920bc66eb2dbeb174a34624a53 (diff) |
Merge pull request #61 from Wuzzy2/bagdep
Add optional farming dependency for bag craft
Diffstat (limited to 'bags.lua')
-rw-r--r-- | bags.lua | 51 |
1 files changed, 26 insertions, 25 deletions
@@ -215,30 +215,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 |