Make sure to properly distribute available power across all endpoints
This commit is contained in:
parent
4698266b33
commit
70dacf9a8c
@ -64,7 +64,7 @@ function industrialtest.api.powerFlow(pos,sides,flowOverride)
|
|||||||
if endpointCount==0 then
|
if endpointCount==0 then
|
||||||
return false,false
|
return false,false
|
||||||
end
|
end
|
||||||
local powerDistribution=math.floor((flowOverride and flowOverride or meta:get_int("industrialtest.powerFlow"))/endpointCount)
|
local powerDistribution=math.floor((flowOverride and flowOverride or math.min(meta:get_int("industrialtest.powerAmount"),meta:get_int("industrialtest.powerFlow")))/endpointCount)
|
||||||
local transferred=false
|
local transferred=false
|
||||||
local roomAvailable=false
|
local roomAvailable=false
|
||||||
for _,endpoint in ipairs(network) do
|
for _,endpoint in ipairs(network) do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user