Take into account machine ioConfig when transferring power
This commit is contained in:
2
api.lua
2
api.lua
@@ -64,7 +64,7 @@ industrialtest.api.powerFlow=function(pos)
|
||||
end
|
||||
local neighboursContainingPower=0
|
||||
for key,value in ipairs(neighbours) do
|
||||
if industrialtest.api.hasPowerStorage(value) then
|
||||
if industrialtest.api.hasPowerStorage(value) and value:get_string("industrialtest.ioConfig")[key%2==0 and key+1 or key-1]=="i" then
|
||||
neighboursContainingPower=neighboursContainingPower+1
|
||||
else
|
||||
neighbourPositions[key]=nil
|
||||
|
||||
Reference in New Issue
Block a user