From 02a5ec8bb01ab3e7481e85d1e7455d03c18bf102 Mon Sep 17 00:00:00 2001 From: Niklp09 <89982526+Niklp09@users.noreply.github.com> Date: Fri, 7 Jul 2023 22:05:25 +0200 Subject: [PATCH] add UI craft type for xdecor:honey --- locale/template.txt | 1 + locale/xdecor.de.tr | 1 + locale/xdecor.fr.tr | 1 + locale/xdecor.it.tr | 1 + mod.conf | 2 +- src/hive.lua | 17 +++++++++++++++++ 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/locale/template.txt b/locale/template.txt index 0540f83..30ad02e 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -63,6 +63,7 @@ Your tool last longer= Your tool digs faster= Artificial Hive= Honey= +Made by bees= The bees are busy making honey.= The bees are looking for flowers.= The bees want to pollinate more flowers.= diff --git a/locale/xdecor.de.tr b/locale/xdecor.de.tr index b51a764..067abd0 100644 --- a/locale/xdecor.de.tr +++ b/locale/xdecor.de.tr @@ -63,6 +63,7 @@ Your tool last longer=Ihr Werkzeug hält länger Your tool digs faster=Ihr Werkzeug arbeitet schneller Artificial Hive=Künstlicher Bienenstock Honey=Honig +Made by bees=Hergestellt von Bienen The bees are busy making honey.=Die Bienen sind beschäftigt, Honig herzustellen. The bees are looking for flowers.=Die Bienen halten nach Blumen Ausschau. The bees want to pollinate more flowers.=Die Bienen wollen mehr Blumen bestäuben. diff --git a/locale/xdecor.fr.tr b/locale/xdecor.fr.tr index 6015db0..602060a 100644 --- a/locale/xdecor.fr.tr +++ b/locale/xdecor.fr.tr @@ -63,6 +63,7 @@ Your tool last longer=Votre outil dure plus longtemps Your tool digs faster=Votre outil creuse plus vite Artificial Hive=Ruche artificielle Honey=Miel +Made by bees= The bees are busy making honey.= The bees are looking for flowers.= The bees want to pollinate more flowers.= diff --git a/locale/xdecor.it.tr b/locale/xdecor.it.tr index 5d141c6..9a6e156 100644 --- a/locale/xdecor.it.tr +++ b/locale/xdecor.it.tr @@ -63,6 +63,7 @@ Your tool last longer=Il tuo utensile dura di più Your tool digs faster=Il tuo utensile scava più rapidamente Artificial Hive=Favo artificiale Honey=Miele +Made by bees= The bees are busy making honey.= The bees are looking for flowers.= The bees want to pollinate more flowers.= diff --git a/mod.conf b/mod.conf index 15d7d59..22fd86d 100644 --- a/mod.conf +++ b/mod.conf @@ -2,5 +2,5 @@ name = xdecor title = X-Decor-libre description = A decoration mod meant to be simple and well-featured (libre version). depends = default, bucket, doors, farming, stairs, xpanes -optional_depends = playerphysics, player_api, fire, moreblocks, mesecons +optional_depends = playerphysics, player_api, fire, moreblocks, mesecons, unified_inventory min_minetest_version = 5.7.0 diff --git a/src/hive.lua b/src/hive.lua index 7475dab..8abaf19 100644 --- a/src/hive.lua +++ b/src/hive.lua @@ -182,3 +182,20 @@ minetest.register_craft({ {"group:stick", "group:stick", "group:stick"} } }) + +if minetest.get_modpath("unified_inventory") then + unified_inventory.register_craft_type("xdecor:hive", { + description = S("Made by bees"), + icon = "hive_bee.png", + width = 1, + height = 1, + uses_crafting_grid = false + }) + + unified_inventory.register_craft({ + output = "xdecor:honey", + type = "xdecor:hive", + items = {"xdecor:hive"}, + width = 1 + }) +end