diff --git a/api/network.lua b/api/network.lua index 922eacd..7ef8b8d 100644 --- a/api/network.lua +++ b/api/network.lua @@ -64,7 +64,7 @@ function industrialtest.api.powerFlow(pos,sides,flowOverride) if endpointCount==0 then return false,false 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 roomAvailable=false for _,endpoint in ipairs(network) do