From 1796ed169c853113de20b42019ad5a3f0438349f Mon Sep 17 00:00:00 2001 From: h-v-smacker Date: Sun, 21 Jan 2018 15:54:50 +0300 Subject: added apple juice --- juices.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'juices.lua') diff --git a/juices.lua b/juices.lua index 5fd0145..03b1879 100644 --- a/juices.lua +++ b/juices.lua @@ -16,6 +16,12 @@ ]] local juice_table = { + orange_juice = { + proper_name = "Apple juice", + found_in = "default", + obj_name = "apple", + orig_nutritional_value = 2 + }, orange_juice = { proper_name = "Orange juice", found_in = "ethereal", -- cgit v1.2.3 From 98468c473c70829c1dd21d2f71905af3bcd31586 Mon Sep 17 00:00:00 2001 From: h-v-smacker Date: Wed, 28 Feb 2018 01:26:57 +0300 Subject: new juices --- juices.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'juices.lua') diff --git a/juices.lua b/juices.lua index 03b1879..1f000fa 100644 --- a/juices.lua +++ b/juices.lua @@ -15,6 +15,17 @@ -- internal_name_of_the_juice_popsicle.png for the popsicle form ]] +-- 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") + + local juice_table = { orange_juice = { proper_name = "Apple juice", @@ -94,7 +105,12 @@ local juice_table = { obj_name = "tomato", orig_nutritional_value = 4 }, - + pineapple_juice = { + proper_name = "Pineapple juice", + found_in = "farming", + obj_name = "pineapple_ring", + orig_nutritional_value = 1 + }, } -- cgit v1.2.3 From d2fe59c56706625f89afc4528e120d2bd7223e9b Mon Sep 17 00:00:00 2001 From: h-v-smacker Date: Thu, 20 Sep 2018 14:46:28 +0300 Subject: unified inventory integration --- juices.lua | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'juices.lua') diff --git a/juices.lua b/juices.lua index 1f000fa..3c2e532 100644 --- a/juices.lua +++ b/juices.lua @@ -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 -- cgit v1.2.3