From 85dddf6d78d08c001df7f8a88cdd2824804517c5 Mon Sep 17 00:00:00 2001 From: mrkubax10 Date: Thu, 23 Mar 2023 10:32:09 +0100 Subject: [PATCH] Fix processing not stopping after taking item from machine --- machines.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/machines.lua b/machines.lua index ce7a3c3..6a14a29 100644 --- a/machines.lua +++ b/machines.lua @@ -391,6 +391,11 @@ local function registerSimpleElectricItemProcessor(config) meta:set_float("maxSrcTime",output.time*config.efficiency) end end + if srcSlot:get_count()==0 and meta:get_float("maxSrcTime")>0 then + meta:set_float("srcTime",-1) + meta:set_float("maxSrcTime",0) + shouldUpdateFormspec=true + end if meta:get_float("maxSrcTime")>0 then if meta:get_int("industrialtest.powerAmount")>=requiredPower then meta:set_int("industrialtest.powerAmount",meta:get_int("industrialtest.powerAmount")-requiredPower)