From 021c4c33248b53cfded0840901931b03bc8a72fa Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS Date: Tue, 5 Mar 2024 22:45:59 +0100 Subject: [PATCH] fix faulty empty table check --- autocrafter.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autocrafter.lua b/autocrafter.lua index 8c0be99..014c4a5 100644 --- a/autocrafter.lua +++ b/autocrafter.lua @@ -4,6 +4,7 @@ local S = minetest.get_translator("pipeworks") local autocrafterCache = {} local craft_time = 1 +local next = next local function count_index(invlist) local index = {} @@ -141,7 +142,7 @@ local function calculate_consumption(inv_index, consumption_with_groups) end -- Next, resolve groups using the remaining items in the inventory - if grouped_ingredients ~= {} then + if next(grouped_ingredients) ~= nil then local take for itemname, count in pairs(inv_index) do if count > 0 then