From ec6f2ab58538f27172d8d05c3ea37507eba08948 Mon Sep 17 00:00:00 2001 From: Buhallin Date: Mon, 9 Jan 2023 16:26:59 -0800 Subject: [PATCH] Fix two timing-related bugs in MythosArea - Using a frame delay in onObjectEnterContainer was causing errors. Unclear why, but removing the delay fixes it - Add a delay to the scenario splash screen, as load lag when placing large scenarios was causing the show to be janky --- src/core/MythosArea.ttslua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/MythosArea.ttslua b/src/core/MythosArea.ttslua index 94933d64..79a02fa4 100644 --- a/src/core/MythosArea.ttslua +++ b/src/core/MythosArea.ttslua @@ -44,10 +44,6 @@ end -- Listens for cards entering the encounter deck or encounter discard, and resets the spawn state -- for the cards when they do. function onObjectEnterContainer(container, object) - Wait.frames(function() resetTokensIfInDeckZone(container, object) end, 1) -end - -function resetTokensIfInDeckZone(container, object) local localPos = self.positionToLocal(container.getPosition()) if inArea(localPos, ENCOUNTER_DECK_AREA) or inArea(localPos, ENCOUNTER_DISCARD_AREA) then tokenSpawnTracker.resetTokensSpawned(object.getGUID()) @@ -55,7 +51,7 @@ function resetTokensIfInDeckZone(container, object) end function fireScenarioChangedEvent() - Global.call('titleSplash', currentScenario) + Wait.frames(function() Global.call('titleSplash', currentScenario) end, 20) playArea.onScenarioChanged(currentScenario) end