hypothesis bugfix

This commit is contained in:
Chr1Z93 2024-06-29 18:45:32 +02:00
parent fb5c6cd51f
commit c45f8e5846
4 changed files with 5 additions and 5 deletions

View File

@ -63,9 +63,8 @@ function onLoad(savedData)
local loadedData = JSON.decode(savedData)
isHelperEnabled = loadedData.isHelperEnabled
end
checkOptionPanel()
createHelperXML()
updateDisplay()
checkOptionPanel()
end
function createHelperXML()

View File

@ -5,6 +5,8 @@ function checkOptionPanel()
local options = optionPanelApi.getOptions()
if options.enableCardHelpers then
setHelperState(true)
else
updateDisplay()
end
end

View File

@ -16,7 +16,6 @@ function onLoad(savedData)
isHelperEnabled = loadedData.isHelperEnabled
end
checkOptionPanel()
updateDisplay()
end
-- hide buttons and stop monitoring

View File

@ -46,7 +46,6 @@ function onLoad(savedData)
activeButtonIndex = loadedData.activeButtonIndex
end
checkOptionPanel()
updateDisplay()
if activeButtonIndex > 0 then
selectButton(activeButtonIndex)
@ -89,6 +88,7 @@ function createButtons()
local upgradeSheet = findUpgradeSheet()
if upgradeSheet then
for i = 1, 4 do
log(4)
if upgradeSheet.call("isUpgradeActive", i) then
table.insert(hypothesisList, customizableList[i])
end
@ -110,7 +110,7 @@ end
function findUpgradeSheet()
local matColor = playermatApi.getMatColorByPosition(self.getPosition())
local result = playermatApi.searchAroundPlaymat(matColor, "isCard")
local result = playermatApi.searchAroundPlayermat(matColor, "isCard")
for j, card in ipairs(result) do
local metadata = JSON.decode(card.getGMNotes()) or {}
if metadata.id == "09041-c" then