Skip to content

Commit

Permalink
Merge pull request #851 from dscarpac/deselect
Browse files Browse the repository at this point in the history
Unselect object after using sealed tokens context menus
  • Loading branch information
Chr1Z93 authored Sep 1, 2024
2 parents b1cba9c + 98f4fee commit fa3a846
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/playercards/CardsThatSealTokens.ttslua
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ function releaseOneToken(playerColor)
putTokenAway(table.remove(sealedTokens))
updateSave()
end
Player[playerColor].clearSelectedObjects()
end

-- release up to multiple tokens at once with no minimum
Expand All @@ -269,6 +270,7 @@ function releaseMultipleTokens(playerColor)
end
updateSave()
printToColor("Releasing " .. numRemoved .. " tokens", playerColor)
Player[playerColor].clearSelectedObjects()
end

-- releases all sealed tokens
Expand All @@ -284,6 +286,7 @@ function releaseAllTokens(playerColor)
sealedTokens = {}
updateSave()
end
Player[playerColor].clearSelectedObjects()
end

-- returns multiple tokens at once to the token pool
Expand All @@ -297,6 +300,7 @@ function returnMultipleTokens(playerColor)
else
printToColor("Not enough tokens sealed.", playerColor)
end
Player[playerColor].clearSelectedObjects()
end

-- returns the token (referenced by GUID) to the chaos bag
Expand Down Expand Up @@ -328,7 +332,7 @@ function returnToken(guid)
end

-- resolves sealed token as if it came from the chaos bag
function resolveSealed()
function resolveSealed(playerColor)
if #sealedTokens == 0 then
broadcastToAll("No tokens sealed.", "Red")
return
Expand All @@ -341,6 +345,7 @@ function resolveSealed()
updateStackSize()
updateSave()
chaosBagApi.drawChaosToken(mat, true, _, guidToBeResolved)
Player[playerColor].clearSelectedObjects()
end

function updateStackSize()
Expand Down

0 comments on commit fa3a846

Please sign in to comment.