added comments
This commit is contained in:
parent
893bd05801
commit
42cda036a0
@ -189,11 +189,14 @@ function standaloneChanged()
|
|||||||
self.editButton({ index = 2, label = STANDALONE_TOGGLE_LABELS[standalone] })
|
self.editButton({ index = 2, label = STANDALONE_TOGGLE_LABELS[standalone] })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- start the deck importing process
|
||||||
function loadDecks()
|
function loadDecks()
|
||||||
co = coroutine.create(loadDecksCoroutine)
|
co = coroutine.create(loadDecksCoroutine)
|
||||||
resumeLoadDecks()
|
resumeLoadDecks()
|
||||||
end
|
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()
|
function loadDecksCoroutine()
|
||||||
if not allCardsBagApi.isIndexReady() then return end
|
if not allCardsBagApi.isIndexReady() then return end
|
||||||
matsWithInvestigator = playermatApi.getUsedMatColors()
|
matsWithInvestigator = playermatApi.getUsedMatColors()
|
||||||
@ -207,8 +210,8 @@ function loadDecksCoroutine()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- resume the deck importing process
|
||||||
function resumeLoadDecks()
|
function resumeLoadDecks()
|
||||||
log("resume")
|
|
||||||
if co and coroutine.status(co) ~= "dead" then
|
if co and coroutine.status(co) ~= "dead" then
|
||||||
local status, err = coroutine.resume(co)
|
local status, err = coroutine.resume(co)
|
||||||
if not status then error(err) end
|
if not status then error(err) end
|
||||||
|
Loading…
Reference in New Issue
Block a user