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