bugfix
This commit is contained in:
parent
55aaf7df51
commit
b4f63bf1f4
@ -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,11 +382,13 @@ 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
|
||||||
|
removeIgnoreLater = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
-- reset spawned data
|
-- reset spawned data
|
||||||
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user