mythos area bugfix

This commit is contained in:
Chr1Z93 2023-10-11 19:39:05 +02:00
parent 34fa7ea7e8
commit edc2cc6fab
2 changed files with 51 additions and 47 deletions

View File

@ -113,7 +113,12 @@ local tokenDrawingStats = {
---------------------------------------------------------
-- saving state of optionPanel to restore later
function onSave() return JSON.encode({ optionPanel = optionPanel, acknowledgedUpgradeVersions = acknowledgedUpgradeVersions }) end
function onSave()
return JSON.encode({
optionPanel = optionPanel,
acknowledgedUpgradeVersions = acknowledgedUpgradeVersions
})
end
function onLoad(savedData)
if savedData then
@ -490,7 +495,6 @@ function getChaosBagState()
end
return tokens
end
-- respawns the chaos bag with a new state of tokens
@ -675,7 +679,8 @@ function update_list(objects)
for _, v in ipairs(objects) do
local s = JSON.encode(v);
table.insert(update_children.children,
{ tag = 'Text',
{
tag = 'Text',
value = v.name,
attributes = { onClick = 'onClick_select(' .. urlencode(JSON.encode(v)) .. ')', alignment = 'MiddleLeft' }
})
@ -1043,7 +1048,6 @@ end
-- splash scenario title on setup
function titleSplash(scenarioName)
if optionPanel['showTitleSplash'] then
-- if there's any ongoing title being displayed, hide it and cancel the waiting function
if hideTitleSplashWaitFunctionId then
Wait.stop(hideTitleSplashWaitFunctionId)

View File

@ -8,7 +8,7 @@ do
-- returns the chaos token metadata (if provided through scenario reference card)
MythosAreaApi.returnTokenData = function()
getMythosArea().call("returnTokenData")
return getMythosArea().call("returnTokenData")
end
-- draw an encounter card to the requested position/rotation