Second Linker Upgrade

This commit is contained in:
2024-05-20 19:56:30 +02:00
parent 2c8f51f8ba
commit dbb30f0634
3 changed files with 39 additions and 27 deletions
+4 -3
View File
@@ -105,7 +105,7 @@ end
If a or b is nil, we consider that
--]]
function logikraft.connectContiguousCable(namea,posa,a,nameb,posb,b)
print("Connecting "..tostring(namea).." with "..tostring(nameb))
print("Connecting "..tostring(namea).."("..tostring(a)..") with "..tostring(nameb).."("..tostring(b)..")")
local dira = (posa.y == posb.y) and (
(posa.z + 1 == posb.z and posa.x == posb.x and 3) or
(posa.x + 1 == posb.x and posa.z == posb.z and 2) or
@@ -116,8 +116,6 @@ function logikraft.connectContiguousCable(namea,posa,a,nameb,posb,b)
then return nil
end
print(dira)
print(logikraft.rotate4dir(4,math.fmod(dira,4)))
if not namea
then
namea = logikraft.cableFromConns({logikraft.rotate4dir(4,6-dira)})
@@ -163,8 +161,11 @@ function logikraft.connectContiguousCable(namea,posa,a,nameb,posb,b)
cib = logikraft.cables[nameb].nbToConn[b]
end
print(dira)
print(namea)
print(cia)
print(nameb)
print(cib)
local connsa = table.copy(logikraft.cables[namea].conns)
local connsb = table.copy(logikraft.cables[nameb].conns)