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 --- textures/apple_juice.png | Bin 0 -> 351 bytes textures/apple_juice_inv.png | Bin 0 -> 322 bytes textures/apple_juice_popsicle.png | Bin 0 -> 295 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 textures/apple_juice.png create mode 100644 textures/apple_juice_inv.png create mode 100644 textures/apple_juice_popsicle.png (limited to 'textures') diff --git a/textures/apple_juice.png b/textures/apple_juice.png new file mode 100644 index 0000000..ebb5783 Binary files /dev/null and b/textures/apple_juice.png differ diff --git a/textures/apple_juice_inv.png b/textures/apple_juice_inv.png new file mode 100644 index 0000000..2ca94f7 Binary files /dev/null and b/textures/apple_juice_inv.png differ diff --git a/textures/apple_juice_popsicle.png b/textures/apple_juice_popsicle.png new file mode 100644 index 0000000..622be84 Binary files /dev/null and b/textures/apple_juice_popsicle.png differ -- 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 --- init.lua | 12 ++++++++++++ juices.lua | 18 +++++++++++++++++- textures/pineapple_juice.png | Bin 0 -> 356 bytes textures/pineapple_juice_inv.png | Bin 0 -> 322 bytes textures/pineapple_juice_popsicle.png | Bin 0 -> 293 bytes 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 textures/pineapple_juice.png create mode 100644 textures/pineapple_juice_inv.png create mode 100644 textures/pineapple_juice_popsicle.png (limited to 'textures') diff --git a/init.lua b/init.lua index 73db9eb..2900a19 100644 --- a/init.lua +++ b/init.lua @@ -415,6 +415,18 @@ minetest.register_craft({ {"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"} } }) + +if minetest.get_modpath("ethereal") then + minetest.register_craft({ + output = "freezer:freezer", + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "", "default:steel_ingot"}, + {"default:steel_ingot", "ethereal:crystal_spike", "default:steel_ingot"} + } + }) +end + minetest.register_craft({ 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 + }, } diff --git a/textures/pineapple_juice.png b/textures/pineapple_juice.png new file mode 100644 index 0000000..5fc8717 Binary files /dev/null and b/textures/pineapple_juice.png differ diff --git a/textures/pineapple_juice_inv.png b/textures/pineapple_juice_inv.png new file mode 100644 index 0000000..063313c Binary files /dev/null and b/textures/pineapple_juice_inv.png differ diff --git a/textures/pineapple_juice_popsicle.png b/textures/pineapple_juice_popsicle.png new file mode 100644 index 0000000..6ec3739 Binary files /dev/null and b/textures/pineapple_juice_popsicle.png differ -- 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 --- depends.txt | 3 ++- init.lua | 63 ++++++++++++++++++++++++++++++++++++++++++++- juices.lua | 25 +++++++++++++----- textures/freezing_icon.png | Bin 0 -> 175 bytes 4 files changed, 82 insertions(+), 9 deletions(-) create mode 100644 textures/freezing_icon.png (limited to 'textures') diff --git a/depends.txt b/depends.txt index 62c1b68..3919d3c 100644 --- a/depends.txt +++ b/depends.txt @@ -3,4 +3,5 @@ pipeworks? ethereal? mobs? farming? -vessels? \ No newline at end of file +vessels? +unified_inventory? \ No newline at end of file diff --git a/init.lua b/init.lua index 2900a19..ab14f9b 100644 --- a/init.lua +++ b/init.lua @@ -7,10 +7,22 @@ -- enable extra popsicle types provided there are both vessels and fruits/veggies available -- fruit + glass -> juice; juice @ freezer -> popsicle + empty glass +if minetest.get_modpath("unified_inventory") and unified_inventory.register_craft_type then + unified_inventory.register_craft_type("freezing", { + description = "Freezing", + icon = "freezing_icon.png", + width = 1, + height = 1, + uses_crafting_grid = false, + }) +end + if minetest.get_modpath("vessels") then dofile(minetest.get_modpath("freezer") .. "/juices.lua") end + + -- -- Formspecs -- @@ -130,7 +142,8 @@ local function freezer_node_timer(pos, elapsed) inv:add_item("dst", "bucket:bucket_empty") end end - + + -- an extra recipe involving liquid in a bucket, for good measure -- a cactus pulp bucket gives 2 hp, but freezing it gives 3 popsicles, each -- of them giving 1 hp, achieving 50% increase in efficiency through processing @@ -436,3 +449,51 @@ minetest.register_craft({ "default:ice" } }) + +if minetest.get_modpath("unified_inventory") and unified_inventory.register_craft then + unified_inventory.register_craft({ + type = "freezing", + output = "default:ice", + items = {"bucket:bucket_water"}, + }) + + + unified_inventory.register_craft({ + type = "freezing", + output = "default:ice", + items = {"bucket:bucket_river_water"}, + }) + + if minetest.get_modpath("ethereal") then + unified_inventory.register_craft({ + type = "freezing", + output = "freezer:cactus_popsicle 3", + items = {"ethereal:bucket_cactus"}, + }) + end + + if minetest.get_modpath("mobs") and mobs and mobs.mod == "redo" then + unified_inventory.register_craft({ + type = "freezing", + output = "freezer:milk_popsicle 3", + items = {"mobs:bucket_milk"}, + }) + end + + if minetest.get_modpath("mobs") and mobs and mobs.mod == "redo" and minetest.get_modpath("farming") then + unified_inventory.register_craft({ + type = "freezing", + output = "freezer:pelmeni_pack 3", + items = {"freezer:pelmeni_raw"}, + }) + end + + if minetest.get_modpath("mobs") and mobs and mobs.mod == "redo" and minetest.get_modpath("ethereal") then + unified_inventory.register_craft({ + type = "freezing", + output = "freezer:aspic 5", + items = {"freezer:meat_broth"}, + }) + end + +end \ No newline at end of file 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 diff --git a/textures/freezing_icon.png b/textures/freezing_icon.png new file mode 100644 index 0000000..099b9f2 Binary files /dev/null and b/textures/freezing_icon.png differ -- cgit v1.2.3