more updates

This commit is contained in:
dscarpac 2024-07-31 07:33:40 -05:00
parent ec315a2b3a
commit 6c8b362483

View File

@ -185,9 +185,6 @@ function readBag()
end
end
-- save state when going into bags / decks
function onDestroy() updateSave() end
function resetSealedTokens()
sealedTokens = {}
updateSave()
@ -234,6 +231,7 @@ function sealToken(name, playerColor)
end
end
updateStackSize()
updateSave()
end
})
return
@ -250,6 +248,7 @@ function releaseOneToken(playerColor)
else
printToColor("Releasing token", playerColor)
putTokenAway(table.remove(sealedTokens))
updateSave()
end
end
@ -268,6 +267,7 @@ function releaseMultipleTokens(playerColor)
for i = 1, numRemoved do
putTokenAway(table.remove(sealedTokens))
end
updateSave()
printToColor("Releasing " .. numRemoved .. " tokens", playerColor)
end
@ -292,6 +292,7 @@ function returnMultipleTokens(playerColor)
for i = 1, SHOW_MULTI_RETURN do
returnToken(table.remove(sealedTokens))
end
updateSave()
printToColor("Returning " .. SHOW_MULTI_RETURN .. " tokens", playerColor)
else
printToColor("Not enough tokens sealed.", playerColor)
@ -338,11 +339,11 @@ function resolveSealed()
local resolvedToken = getObjectFromGUID(guidToBeResolved)
resolvedToken.UI.setXml("")
updateStackSize()
updateSave()
chaosBagApi.drawChaosToken(mat, true, _, guidToBeResolved)
end
function updateStackSize()
updateSave()
if MAX_SEALED == 1 then return end
if #sealedTokens == 0 then return end
-- get topmost sealed token