Remove GUID comparison in favor of direct object comparison

This commit is contained in:
Buhallin 2022-12-11 13:37:40 -08:00
parent cb9c4d2d44
commit 4e500a8cc5
No known key found for this signature in database
GPG Key ID: DB3C362823852294

View File

@ -147,7 +147,7 @@ function isCardOrDeck(x) return x.tag == 'Card' or x.tag == 'Deck' end
-- chaos bag during search operations to avoid this. -- chaos bag during search operations to avoid this.
function onObjectSearchStart(object, playerColor) function onObjectSearchStart(object, playerColor)
findChaosBag() findChaosBag()
if object.getGUID() == chaosbag.getGUID() then if object == chaosbag then
bagSearchers[playerColor] = true bagSearchers[playerColor] = true
end end
end end
@ -157,7 +157,7 @@ end
-- chaos bag during search operations to avoid this. -- chaos bag during search operations to avoid this.
function onObjectSearchEnd(object, playerColor) function onObjectSearchEnd(object, playerColor)
findChaosBag() findChaosBag()
if object.getGUID() == chaosbag.getGUID() then if object == chaosbag then
bagSearchers[playerColor] = nil bagSearchers[playerColor] = nil
end end
end end