From 42cda036a0820b70fe8dc4ad700d045ac701b304 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 22:17:59 +0200 Subject: [PATCH] added comments --- src/arkhamdb/DeckImporter.ttslua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/arkhamdb/DeckImporter.ttslua b/src/arkhamdb/DeckImporter.ttslua index 5bcebb3a..4d878aa2 100644 --- a/src/arkhamdb/DeckImporter.ttslua +++ b/src/arkhamdb/DeckImporter.ttslua @@ -189,11 +189,14 @@ function standaloneChanged() self.editButton({ index = 2, label = STANDALONE_TOGGLE_LABELS[standalone] }) end +-- start the deck importing process function loadDecks() co = coroutine.create(loadDecksCoroutine) resumeLoadDecks() end +-- perform the deck importing (with a pause after each deck load) +-- this pause will for example allow weaknesses to be spawned so that the RBW drawing can detect them function loadDecksCoroutine() if not allCardsBagApi.isIndexReady() then return end matsWithInvestigator = playermatApi.getUsedMatColors() @@ -207,8 +210,8 @@ function loadDecksCoroutine() end end +-- resume the deck importing process function resumeLoadDecks() - log("resume") if co and coroutine.status(co) ~= "dead" then local status, err = coroutine.resume(co) if not status then error(err) end