resolving review comments
This commit is contained in:
parent
6f795dfc82
commit
2a1033c5c4
@ -134,8 +134,8 @@ function doRemove(color)
|
||||
|
||||
broadcastToColor("Removed " .. count.Bless .. " Bless and " ..
|
||||
count.Curse .. " Curse tokens from the chaos bag.", color, "White")
|
||||
broadcastToColor("Removed " .. removeType("Bless") .. " Bless and " ..
|
||||
removeType("Curse") .. " Curse tokens from play.", color, "White")
|
||||
broadcastToColor("Removed " .. removeTakenTokens("Bless") .. " Bless and " ..
|
||||
removeTakenTokens("Curse") .. " Curse tokens from play.", color, "White")
|
||||
|
||||
doReset(color)
|
||||
end
|
||||
@ -150,7 +150,7 @@ function doReset(color)
|
||||
end
|
||||
|
||||
-- removing tokens that were 'taken'
|
||||
function removeType(type)
|
||||
function removeTakenTokens(type)
|
||||
local count = 0
|
||||
for _, guid in ipairs(tokensTaken[type]) do
|
||||
local token = getObjectFromGUID(guid)
|
||||
@ -268,10 +268,10 @@ function releasedToken(param)
|
||||
end
|
||||
if not updating then
|
||||
updating = true
|
||||
Wait.time(function()
|
||||
Wait.frames(function()
|
||||
broadcastCount(param.type)
|
||||
updating = false
|
||||
end, 0.1)
|
||||
end, 1)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -69,7 +69,7 @@ local blessCurseManagerApi = require("chaosbag/BlessCurseManagerApi")
|
||||
local tokenArrangerApi = require("accessories/TokenArrangerApi")
|
||||
local sealedTokens = {}
|
||||
local ID_URL_MAP = {}
|
||||
tokensInBag = {}
|
||||
local tokensInBag = {}
|
||||
|
||||
function onSave() return JSON.encode(sealedTokens) end
|
||||
|
||||
@ -189,6 +189,7 @@ function releaseMultipleTokens(playerColor)
|
||||
printToColor("Not enough " .. name .. " tokens sealed.", playerColor)
|
||||
end
|
||||
end
|
||||
|
||||
-- releases all sealed tokens
|
||||
function releaseAllTokens(playerColor)
|
||||
if not Global.call("canTouchChaosTokens") then return end
|
||||
|
Loading…
Reference in New Issue
Block a user