From c93df73a5c85184ccaff0abf4defbb76ea3dd113 Mon Sep 17 00:00:00 2001 From: sys4-fr Date: Sat, 2 Mar 2019 19:29:26 +0100 Subject: [PATCH] Rend les items du groupe limitcraft non craftable par l'autocrafter --- autocrafter.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autocrafter.lua b/autocrafter.lua index 7ddc312..2ce80a7 100644 --- a/autocrafter.lua +++ b/autocrafter.lua @@ -66,8 +66,11 @@ local function run_autocrafter(pos, elapsed) local inventory = meta:get_inventory() local craft = get_craft(pos, inventory) local output_item = craft.output.item + -- NALC: existence de limitgroup ? + local limitcraft = minetest.get_item_group(output_item:get_name(), "limitcraft") or 0 -- only use crafts that have an actual result - if output_item:is_empty() then + -- NALC: ou si l'item n'est pas dans le group limitcraft + if output_item:is_empty() or limitcraft > 0 then meta:set_string("infotext", "unconfigured Autocrafter: unknown recipe") return false end