diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-09-23 12:09:33 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-09-23 12:09:33 +0200 |
commit | c846cb1c76fb54d2c3c56d5da13b155f73e0edba (patch) | |
tree | 46bbd1b2b193f40bdb299e62fab11616c6862384 /juices.lua | |
parent | 23cca6232de2ef83f2b45888bba571057a7d174d (diff) | |
parent | d2fe59c56706625f89afc4528e120d2bd7223e9b (diff) |
Merge https://github.com/h-v-smacker/freezer
Diffstat (limited to 'juices.lua')
-rw-r--r-- | juices.lua | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -15,8 +15,28 @@ -- internal_name_of_the_juice_popsicle.png for the popsicle form ]] +-- clear the recipe for juice from farming redo for consistency's sake + +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 = { + proper_name = "Apple juice", + found_in = "default", + obj_name = "apple", + orig_nutritional_value = 2 + }, + orange_juice = { proper_name = "Orange juice", found_in = "ethereal", obj_name = "orange", @@ -88,7 +108,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 + }, } @@ -122,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 |