diff options
author | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-09-20 14:46:28 +0300 |
---|---|---|
committer | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-09-20 14:46:28 +0300 |
commit | d2fe59c56706625f89afc4528e120d2bd7223e9b (patch) | |
tree | a9561c16fa0ea5bcd86bc996b014eac4479e30f9 /juices.lua | |
parent | 98468c473c70829c1dd21d2f71905af3bcd31586 (diff) |
unified inventory integration
Diffstat (limited to 'juices.lua')
-rw-r--r-- | juices.lua | 25 |
1 files changed, 18 insertions, 7 deletions
@@ -17,14 +17,17 @@ -- clear the recipe for juice from farming redo for consistency's sake -minetest.clear_craft({ - output = "farming:pineapple_juice", - type = "shapeless", - recipe = {"vessels:drinking_glass", "farming:pineapple_ring", - "farming:pineapple_ring", "farming:pineapple_ring"} -}) -minetest.unregister_item("farming:pineapple_juice") +if minetest.get_modpath("farming") and farming.mod and farming.mod == "redo" then + minetest.clear_craft({ + output = "farming:pineapple_juice", + type = "shapeless", + recipe = {"vessels:drinking_glass", "farming:pineapple_ring", + "farming:pineapple_ring", "farming:pineapple_ring"} + }) + minetest.unregister_item("farming:pineapple_juice") + +end local juice_table = { orange_juice = { @@ -144,6 +147,14 @@ for juice_name, def in pairs(juice_table) do recipe = {"vessels:drinking_glass", def.found_in .. ":" .. def.obj_name}, }) + if minetest.get_modpath("unified_inventory") and unified_inventory.register_craft then + unified_inventory.register_craft({ + type = "freezing", + output = "freezer:" .. juice_name .. "_popsicle", + items = {"freezer:" .. juice_name}, + }) + end + end end |