Merge pull request #228 from argonui/loc-link-pickup-bug

Handle duplicate connections
This commit is contained in:
Chr1Z 2023-03-08 20:14:44 +01:00 committed by GitHub
commit 4863ba585e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -309,7 +309,8 @@ function buildConnection(cardId, iconCardList, locData)
for _, connectedGuid in ipairs(iconCardList[icon]) do for _, connectedGuid in ipairs(iconCardList[icon]) do
-- If the reciprocal exists, convert it to BiDi, otherwise add as a one-way -- If the reciprocal exists, convert it to BiDi, otherwise add as a one-way
if locationConnections[connectedGuid] ~= nil if locationConnections[connectedGuid] ~= nil
and locationConnections[connectedGuid][cardId] == ONE_WAY then and (locationConnections[connectedGuid][cardId] == ONE_WAY
or locationConnections[connectedGuid][cardId] == BIDIRECTIONAL) then
locationConnections[connectedGuid][cardId] = BIDIRECTIONAL locationConnections[connectedGuid][cardId] = BIDIRECTIONAL
locationConnections[cardId][connectedGuid] = nil locationConnections[cardId][connectedGuid] = nil
else else