Take into account machine ioConfig when transferring power

This commit is contained in:
2023-03-01 21:19:00 +01:00
parent 174798262b
commit 319d3102f6
2 changed files with 2 additions and 2 deletions

View File

@@ -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