From b6ce12a66878da0daf6cdd06e2f87d549ea7c8a3 Mon Sep 17 00:00:00 2001 From: mrkubax10 <mrkubax10@onet.pl> Date: Sat, 29 Mar 2025 14:25:03 +0100 Subject: [PATCH] Fix machine side IO lookups --- api/network.lua | 2 +- api/side.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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