This commit is contained in:
Chr1Z93 2024-06-28 01:11:53 +02:00
parent 55aaf7df51
commit b4f63bf1f4

View File

@ -22,11 +22,12 @@ local campaignLog
local RESET_VALUES = {} local RESET_VALUES = {}
local loadingFailedBefore = false local loadingFailedBefore = false
local optionsVisible = false local optionsVisible = false
local options = {
local options = {} ["importTrauma"] = true,
options["importTrauma"] = true ["tidyPlayermats"] = true,
options["tidyPlayermats"] = true ["removeDrawnLines"] = false
options["removeDrawnLines"] = false }
local removeIgnoreLater = {}
-- don't clean playermats for preludes -- don't clean playermats for preludes
local scenarioName local scenarioName
@ -285,8 +286,8 @@ function maybeIgnoreTekeliliCards()
local tekeliliHelper = getTekeliliHelper() local tekeliliHelper = getTekeliliHelper()
if tekeliliHelper then if tekeliliHelper then
local searchResult = searchLib.onObject(tekeliliHelper, "isCardOrDeck") removeIgnoreLater = searchLib.onObject(tekeliliHelper, "isCardOrDeck")
for _, obj in ipairs(searchResult) do for _, obj in ipairs(removeIgnoreLater) do
obj.addTag(IGNORE_TAG) obj.addTag(IGNORE_TAG)
end end
end end
@ -360,7 +361,7 @@ function tidyPlayerMatCoroutine()
mat.setVar("activeInvestigatorClass", "Neutral") mat.setVar("activeInvestigatorClass", "Neutral")
mat.call("updateTexture") mat.call("updateTexture")
for k = 1, 10 do for k = 1, 5 do
coroutine.yield(0) coroutine.yield(0)
end end
@ -381,12 +382,14 @@ function tidyPlayerMatCoroutine()
end end
-- maybe remove ignore tag from cards / decks on the tekelili helper -- maybe remove ignore tag from cards / decks on the tekelili helper
if tekeliliHelper then if removeIgnoreLater then
local searchResult = searchLib.onObject(tekeliliHelper, "isCardOrDeck") for _, obj in ipairs(removeIgnoreLater) do
for _, obj in ipairs(searchResult) do if obj ~= nil then
obj.removeTag(IGNORE_TAG) obj.removeTag(IGNORE_TAG)
end end
end end
removeIgnoreLater = {}
end
-- reset spawned data -- reset spawned data
tokenSpawnTrackerApi.resetAll() tokenSpawnTrackerApi.resetAll()
@ -402,10 +405,11 @@ end
-- used to detect the "Tekeli-li Helper" for Edge of the Earth -- used to detect the "Tekeli-li Helper" for Edge of the Earth
function getTekeliliHelper() function getTekeliliHelper()
for _, obj in ipairs(getObjects()) do for _, obj in ipairs(getObjects()) do
if obj.getName() == "Tekeli-li Helper" then if obj ~= nil and obj.getName() == "Tekeli-li Helper" then
return obj return obj
end end
end end
return nil
end end
function maybeTrashObject(obj, trash) function maybeTrashObject(obj, trash)