diff --git a/machines.lua b/machines.lua index 9732efe..2aa1ce9 100644 --- a/machines.lua +++ b/machines.lua @@ -955,11 +955,13 @@ local function registerSimpleElectricItemProcessor(config) inv:set_stack("powerStorage",1,powerStorageSlot) end end - if srcSlot:get_count()>0 and meta:get_float("maxSrcTime")<=0 and meta:get_int("industrialtest.powerAmount")>=requiredPower then + if srcSlot:get_count()>0 and meta:get_int("industrialtest.powerAmount")>=requiredPower then local output=craftResultProxy(config.method,srcSlot) if output.time>0 and inv:room_for_item("dst",output.item) then - meta:set_float("srcTime",0) - meta:set_float("maxSrcTime",output.time*config.efficiency) + if meta:get_float("maxSrcTime")<=0 then + meta:set_float("srcTime",0) + meta:set_float("maxSrcTime",output.time*config.efficiency) + end minetest.swap_node(pos,{ name="industrialtest:"..config.name.."_active", param2=minetest.get_node(pos).param2