Merge branch 'main' into victory-display

This commit is contained in:
Chr1Z93 2023-02-02 12:22:56 +01:00
commit b5519334f9
3 changed files with 11 additions and 8 deletions

View File

@ -47,7 +47,7 @@
"posY": 1.884,
"posZ": 8.88,
"rotX": 0,
"rotY": 0,
"rotY": 180,
"rotZ": 180,
"scaleX": 0.25,
"scaleY": 1,

View File

@ -160,7 +160,7 @@ end
-- main function
---------------------------------------------------------
function cleanUp()
function cleanUp(_, color)
printToAll("------------------------------", "White")
printToAll("Clean up started!", "Orange")
printToAll("Resetting counters...", "White")
@ -172,7 +172,7 @@ function cleanUp()
updateCounters(CLUE_CLICKER_GUIDS, 0, "Clue clickers")
resetSkillTrackers()
resetDoomCounter()
removeBlessCurse()
removeBlessCurse(color)
removeLines()
discardHands()
tokenSpawnTrackerApi.resetAll()
@ -232,8 +232,8 @@ end
-- gets the GUID of a custom data helper (if present) and adds it to the ignore list
function ignoreCustomDataHelper()
local playArea = getObjectFromGUID("721ba2")
local guid = playArea.getVar("customDataHelper")
if guid then table.insert(IGNORE_GUIDS, guid) end
local customDataHelper = playArea.getVar("customDataHelper")
if customDataHelper then table.insert(IGNORE_GUIDS, customDataHelper.getGUID()) end
end
-- read values for trauma from campaign log if enabled
@ -272,11 +272,11 @@ function getTrauma()
end
-- get rid of bless/curse tokens via bless/curse manager
function removeBlessCurse()
function removeBlessCurse(color)
local BlessCurseManager = getObjectFromGUID("5933fb")
if BlessCurseManager ~= nil then
BlessCurseManager.call("doRemove", "White")
BlessCurseManager.call("doRemove", color)
else
printToAll("Bless / Curse manager could not be found and thus bless/curse tokens were skipped.", "Yellow")
end

View File

@ -84,7 +84,10 @@ function updateSurface(newURL)
playArea.setCustomObject(customInfo)
-- get custom data helper and call the playarea with it after reloading
local guid = playArea.getVar("customDataHelper")
local customDataHelper = playArea.getVar("customDataHelper")
local guid
if customDataHelper then guid = customDataHelper.getGUID() end
playArea = playArea.reload()
if guid ~= nil then