This commit is contained in:
dscarpac 2024-04-17 18:07:14 -05:00
parent b28c9c08cd
commit 4955c09e65

View File

@ -317,8 +317,8 @@ function drawChaosToken(params)
end end
local token local token
-- resolve a sealed token from a card
if params.guidToBeResolved then -- resolve a sealed token from a card if params.guidToBeResolved then
token = getObjectFromGUID(params.guidToBeResolved) token = getObjectFromGUID(params.guidToBeResolved)
token.setPositionSmooth(tokenPosition) token.setPositionSmooth(tokenPosition)
local guid = token.getGUID() local guid = token.getGUID()
@ -327,7 +327,8 @@ function drawChaosToken(params)
blessCurseManagerApi.releasedToken(tokenType, guid) blessCurseManagerApi.releasedToken(tokenType, guid)
end end
tokenArrangerApi.layout() tokenArrangerApi.layout()
else -- take a token from the bag, either specified or random -- take a token from the bag, either specified or random
else
local takeParameters = { local takeParameters = {
position = tokenPosition, position = tokenPosition,
rotation = tokenRotation rotation = tokenRotation
@ -345,6 +346,8 @@ function drawChaosToken(params)
end end
-- get data for token description -- get data for token description
local name = token.getName() local name = token.getName()
if name == "" then name = "Custom" end
local tokenData = mythosAreaApi.returnTokenData().tokenData or {} local tokenData = mythosAreaApi.returnTokenData().tokenData or {}
local specificData = tokenData[name] or {} local specificData = tokenData[name] or {}
token.setDescription(specificData.description or "") token.setDescription(specificData.description or "")