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