Add workaround for NodeTimerRef.is_started not returning correct value

This commit is contained in:
mrkubax10 2025-03-16 11:38:43 +01:00
parent d3c9d3ed7a
commit 3a1cfad7d4

View File

@ -136,6 +136,10 @@ function industrialtest.SimpleElectricItemProcessor.shouldActivate(self,pos)
local meta=minetest.get_meta(pos)
local inv=meta:get_inventory()
if meta:get_float("maxSrcTime")>0 and meta:get_float("srcTime")>=0 then
return false
end
-- TODO: Take elapsed time into account
local requiredPower=self.opPower*industrialtest.api.getMachineSpeed(meta)
if meta:get_int("industrialtest.powerAmount")<requiredPower then