added deselect features

This commit is contained in:
dscarpac 2024-08-31 19:19:21 -05:00
parent 8d732e7162
commit 98f4fee537

View File

@ -250,6 +250,7 @@ function releaseOneToken(playerColor)
putTokenAway(table.remove(sealedTokens)) putTokenAway(table.remove(sealedTokens))
updateSave() updateSave()
end end
Player[playerColor].clearSelectedObjects()
end end
-- release up to multiple tokens at once with no minimum -- release up to multiple tokens at once with no minimum
@ -269,6 +270,7 @@ function releaseMultipleTokens(playerColor)
end end
updateSave() updateSave()
printToColor("Releasing " .. numRemoved .. " tokens", playerColor) printToColor("Releasing " .. numRemoved .. " tokens", playerColor)
Player[playerColor].clearSelectedObjects()
end end
-- releases all sealed tokens -- releases all sealed tokens
@ -284,6 +286,7 @@ function releaseAllTokens(playerColor)
sealedTokens = {} sealedTokens = {}
updateSave() updateSave()
end end
Player[playerColor].clearSelectedObjects()
end end
-- returns multiple tokens at once to the token pool -- returns multiple tokens at once to the token pool
@ -297,6 +300,7 @@ function returnMultipleTokens(playerColor)
else else
printToColor("Not enough tokens sealed.", playerColor) printToColor("Not enough tokens sealed.", playerColor)
end end
Player[playerColor].clearSelectedObjects()
end end
-- returns the token (referenced by GUID) to the chaos bag -- returns the token (referenced by GUID) to the chaos bag
@ -328,7 +332,7 @@ function returnToken(guid)
end end
-- resolves sealed token as if it came from the chaos bag -- resolves sealed token as if it came from the chaos bag
function resolveSealed() function resolveSealed(playerColor)
if #sealedTokens == 0 then if #sealedTokens == 0 then
broadcastToAll("No tokens sealed.", "Red") broadcastToAll("No tokens sealed.", "Red")
return return
@ -341,6 +345,7 @@ function resolveSealed()
updateStackSize() updateStackSize()
updateSave() updateSave()
chaosBagApi.drawChaosToken(mat, true, _, guidToBeResolved) chaosBagApi.drawChaosToken(mat, true, _, guidToBeResolved)
Player[playerColor].clearSelectedObjects()
end end
function updateStackSize() function updateStackSize()