summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bags.lua51
-rw-r--r--depends.txt2
2 files changed, 27 insertions, 26 deletions
diff --git a/bags.lua b/bags.lua
index 08c25f9..7e925db 100644
--- a/bags.lua
+++ b/bags.lua
@@ -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
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?