Merge pull request #268 from argonui/mythos-exit

added removal of Mythos data onCollisionExit
This commit is contained in:
Chr1Z 2023-04-19 11:02:48 +02:00 committed by GitHub
commit ecfd765806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,6 +77,19 @@ function onCollisionEnter(collisionInfo)
end
end
-- TTS event handler. Handles scenario name event triggering
function onCollisionExit(collisionInfo)
if not collisionEnabled then return end
local object = collisionInfo.collision_object
-- reset token metadata if scenario reference card is removed
if object.getName() == "Scenario" then
tokenData = {}
useFrontData = nil
fireTokenDataChangedEvent()
end
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)