forked from mrkubax10/industrialtest
Fix processing not stopping after taking item from machine
This commit is contained in:
parent
169bb6bcf8
commit
85dddf6d78
@ -391,6 +391,11 @@ local function registerSimpleElectricItemProcessor(config)
|
|||||||
meta:set_float("maxSrcTime",output.time*config.efficiency)
|
meta:set_float("maxSrcTime",output.time*config.efficiency)
|
||||||
end
|
end
|
||||||
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_float("maxSrcTime")>0 then
|
||||||
if meta:get_int("industrialtest.powerAmount")>=requiredPower then
|
if meta:get_int("industrialtest.powerAmount")>=requiredPower then
|
||||||
meta:set_int("industrialtest.powerAmount",meta:get_int("industrialtest.powerAmount")-requiredPower)
|
meta:set_int("industrialtest.powerAmount",meta:get_int("industrialtest.powerAmount")-requiredPower)
|
||||||
|
Loading…
Reference in New Issue
Block a user