Add workaround for NodeTimerRef.is_started
not returning correct value
This commit is contained in:
parent
d3c9d3ed7a
commit
3a1cfad7d4
@ -136,6 +136,10 @@ function industrialtest.SimpleElectricItemProcessor.shouldActivate(self,pos)
|
|||||||
local meta=minetest.get_meta(pos)
|
local meta=minetest.get_meta(pos)
|
||||||
local inv=meta:get_inventory()
|
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
|
-- TODO: Take elapsed time into account
|
||||||
local requiredPower=self.opPower*industrialtest.api.getMachineSpeed(meta)
|
local requiredPower=self.opPower*industrialtest.api.getMachineSpeed(meta)
|
||||||
if meta:get_int("industrialtest.powerAmount")<requiredPower then
|
if meta:get_int("industrialtest.powerAmount")<requiredPower then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user