removed GUID reference from Token Spawn Tracker

This commit is contained in:
Chr1Z93 2023-09-30 01:17:57 +02:00
parent 0fedc74ded
commit b1cff2fc28
2 changed files with 13 additions and 8 deletions

View File

@ -24,6 +24,7 @@
"LuaScript": "require(\"core/token/TokenSpawnTracker\")",
"LuaScriptState": "{\"cards\":[]}",
"MeasureMovement": false,
"Memo": "{\"matColor\":\"Mythos\",\"type\":\"TokenSpawnTracker\"}",
"Name": "Checker_white",
"Nickname": "Token Spawn Tracker",
"Snap": true,

View File

@ -1,29 +1,33 @@
do
local TokenSpawnTracker = {}
local SPAWN_TRACKER_GUID = "e3ffc9"
local internal = {}
internal.getSpawnTracker = function()
return Global.call("getObjectFromMemo", {matColor = "Mythos", type = "TokenSpawnTracker"})
end
TokenSpawnTracker.hasSpawnedTokens = function(cardGuid)
return getObjectFromGUID(SPAWN_TRACKER_GUID).call("hasSpawnedTokens", cardGuid)
return internal.getSpawnTracker().call("hasSpawnedTokens", cardGuid)
end
TokenSpawnTracker.markTokensSpawned = function(cardGuid)
return getObjectFromGUID(SPAWN_TRACKER_GUID).call("markTokensSpawned", cardGuid)
return internal.getSpawnTracker().call("markTokensSpawned", cardGuid)
end
TokenSpawnTracker.resetTokensSpawned = function(cardGuid)
return getObjectFromGUID(SPAWN_TRACKER_GUID).call("resetTokensSpawned", cardGuid)
return internal.getSpawnTracker().call("resetTokensSpawned", cardGuid)
end
TokenSpawnTracker.resetAllAssetAndEvents = function()
return getObjectFromGUID(SPAWN_TRACKER_GUID).call("resetAllAssetAndEvents")
return internal.getSpawnTracker().call("resetAllAssetAndEvents")
end
TokenSpawnTracker.resetAllLocations = function()
return getObjectFromGUID(SPAWN_TRACKER_GUID).call("resetAllLocations")
return internal.getSpawnTracker().call("resetAllLocations")
end
TokenSpawnTracker.resetAll = function()
return getObjectFromGUID(SPAWN_TRACKER_GUID).call("resetAll")
return internal.getSpawnTracker().call("resetAll")
end
return TokenSpawnTracker