Fix processing not stopping after taking item from machine

This commit is contained in:
mrkubax10 2023-03-23 10:32:09 +01:00
parent 169bb6bcf8
commit 85dddf6d78

View File

@ -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)