Added the resizer

This commit is contained in:
2024-05-18 20:43:35 +02:00
parent 6e4c9f1b02
commit 3ea8517ff9
3 changed files with 27 additions and 0 deletions
+10
View File
@@ -455,6 +455,16 @@ function logikraft.disconnectInCable(name,a)
then table.insert(conns,conn>=16 and 24 or 8) end
end
table.sort(conns)
return table.getkey1(logikraft.cablesconn,conns)
end
function logikraft.resizeInCable(name,a)
local conns = table.copy(logikraft.cablesconn[name])
local cindex = logikraft.cablesnbconn[name][a]
conns[cindex] = (conns[cindex] >= 16) and (conns[cindex] - 16) or (conns[cindex] + 16)
table.sort(conns)
return table.getkey1(logikraft.cablesconn,conns)
end