From 56ff8fbad5bb4948dd734fdf4f456e3e1138698b Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 12 Jan 2019 05:41:36 +0100 Subject: [PATCH] Hide repair recipes if disable_repair=1 is set --- mods/HELP/mcl_craftguide/init.lua | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mods/HELP/mcl_craftguide/init.lua b/mods/HELP/mcl_craftguide/init.lua index 0ee29397..6b3d4132 100644 --- a/mods/HELP/mcl_craftguide/init.lua +++ b/mods/HELP/mcl_craftguide/init.lua @@ -26,14 +26,16 @@ local get_recipes = function(query_item) if recipes == nil then recipes = {} end - table.insert(recipes, { - type = "normal", - width = 0, - items = { [1] = query_item, [2] = query_item }, - output = query_item, - -- Special marker for repairing recipes - _is_toolrepair = true, - }) + if minetest.get_item_group(query_item, "disable_repair") ~= 1 then + table.insert(recipes, { + type = "normal", + width = 0, + items = { [1] = query_item, [2] = query_item }, + output = query_item, + -- Special marker for repairing recipes + _is_toolrepair = true, + }) + end end end return recipes -- 2.11.4.GIT