Fix some issues with power flowing
This commit is contained in:
@@ -241,7 +241,6 @@ reactor.activeOnTimer=function(pos,elapsed,meta,inv)
|
||||
inv:set_stack("fuel",coolant,coolantStack)
|
||||
end
|
||||
if heat>200 then
|
||||
-- TODO: Explode
|
||||
minetest.remove_node(pos)
|
||||
industrialtest.internal.explode(pos,#maxCluster*4)
|
||||
return false,false
|
||||
|
||||
@@ -32,20 +32,16 @@ transformer.onTimer=function(pos,elapsed,meta)
|
||||
local afterFlowLower=false
|
||||
local afterFlowUpper=false
|
||||
if powerAmount>=def._industrialtest_lowerFlow then
|
||||
meta:set_int("industrialtest.powerFlow",def._industrialtest_lowerFlow)
|
||||
afterFlowLower,_=industrialtest.api.powerFlow(pos,{
|
||||
[1]=true,
|
||||
[2]=true,
|
||||
[3]=true,
|
||||
[4]=true,
|
||||
[6]=true
|
||||
})
|
||||
meta:set_int("industrialtest.powerFlow",industrialtest.api.ivPowerFlow)
|
||||
},def._industrialtest_lowerFlow)
|
||||
end
|
||||
if powerAmount>=def._industrialtest_upperFlow then
|
||||
meta:set_int("industrialtest.powerFlow",def._industrialtest_upperFlow)
|
||||
afterFlowUpper,_=industrialtest.api.powerFlow(pos,{[5]=true})
|
||||
meta:set_int("industrialtest.powerFlow",industrialtest.api.ivPowerFlow)
|
||||
afterFlowUpper,_=industrialtest.api.powerFlow(pos,{[5]=true},def._industrialtest_upperFlow)
|
||||
end
|
||||
return powerAmount>0 and (afterFlowLower or afterFlowUpper),false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user