diff --git a/api/network.lua b/api/network.lua index 7ef8b8d..7ce6d6c 100644 --- a/api/network.lua +++ b/api/network.lua @@ -309,7 +309,7 @@ function industrialtest.api.getConnections(pos,direction) local powerOutput=(sourceDef.groups._industrialtest_cable or industrialtest.api.isPowerOutput(sourceMeta,normalizedKey)) local powerInput=(sourceDef.groups._industrialtest_cable or industrialtest.api.isPowerInput(sourceMeta,normalizedKey)) if def.groups._industrialtest_cable or industrialtest.api.hasPowerStorage(meta) then - local side=industrialtest.api.normalizeSide(conn,industrialtest.api.getOppositeSide(normalizedKey)) + local side=industrialtest.api.normalizeSide(conn,industrialtest.api.getOppositeSide(key)) if (powerOutput and directionInput and (def.groups._industrialtest_cable or industrialtest.api.isPowerInput(meta,side))) or ((def.groups._industrialtest_cable or industrialtest.api.isPowerOutput(meta,side)) and powerInput and directionOutput) then table.insert(result,conn) end diff --git a/api/side.lua b/api/side.lua index 3b764a6..8aef2d3 100644 --- a/api/side.lua +++ b/api/side.lua @@ -26,13 +26,13 @@ function industrialtest.api.normalizeSide(pos,side) 1,2,3,4,5,6 }, [1]={ - 5,6,3,4,2,1 + 5,6,3,4,1,2 }, [2]={ 2,1,3,4,6,5 }, [3]={ - 6,5,3,4,1,2 + 6,5,3,4,2,1 } } if node.param2>3 then