From 6af363db5aedbfe1eb77b9504315d441f0815d3c Mon Sep 17 00:00:00 2001 From: h-v-smacker Date: Thu, 20 Sep 2018 14:46:01 +0300 Subject: [PATCH] unified inventory integration --- depends.txt | 3 ++- init.lua | 18 ++++++++++++++++++ textures/pickling_icon.png | Bin 0 -> 145 bytes 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 textures/pickling_icon.png diff --git a/depends.txt b/depends.txt index 29e384f..3b565c6 100644 --- a/depends.txt +++ b/depends.txt @@ -2,4 +2,5 @@ default vessels flowers ethereal? -farming? \ No newline at end of file +farming? +unified_inventory? \ No newline at end of file diff --git a/init.lua b/init.lua index 7bd950e..c31d3a7 100644 --- a/init.lua +++ b/init.lua @@ -19,6 +19,16 @@ image files for items must follow the scheme "internal_name_of_the_product.png" ]] +if minetest.get_modpath("unified_inventory") and unified_inventory.register_craft_type then + unified_inventory.register_craft_type("pickling", { + description = "Dark room, wooden shelf", + icon = "pickling_icon.png", + width = 1, + height = 1, + uses_crafting_grid = false, + }) +end + local canned_food_definitions = { apple_jam = { proper_name = "Apple jam", @@ -348,6 +358,14 @@ for product, def in pairs(canned_food_definitions) do end, }) + if minetest.get_modpath("unified_inventory") and unified_inventory.register_craft then + unified_inventory.register_craft({ + type = "pickling", + output = "canned_food:" .. product .."_plus", + items = {"canned_food:" .. product}, + }) + end + end -- a family of shapeless recipes, with sugar for jams diff --git a/textures/pickling_icon.png b/textures/pickling_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..63ad92d5325ea8fcfd2bdad9a3cfe45205a6c97c GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^93afd3?%;@)Hwm9*aCb)T>mpL{Qv*oQPxBdD8iWJ z?e4vL>4nJa0`PlBg3pY5H=O_D7r|+$svq59Y`Ng#