hypothesis bugfix
This commit is contained in:
parent
fb5c6cd51f
commit
c45f8e5846
@ -63,9 +63,8 @@ function onLoad(savedData)
|
|||||||
local loadedData = JSON.decode(savedData)
|
local loadedData = JSON.decode(savedData)
|
||||||
isHelperEnabled = loadedData.isHelperEnabled
|
isHelperEnabled = loadedData.isHelperEnabled
|
||||||
end
|
end
|
||||||
checkOptionPanel()
|
|
||||||
createHelperXML()
|
createHelperXML()
|
||||||
updateDisplay()
|
checkOptionPanel()
|
||||||
end
|
end
|
||||||
|
|
||||||
function createHelperXML()
|
function createHelperXML()
|
||||||
|
@ -5,6 +5,8 @@ function checkOptionPanel()
|
|||||||
local options = optionPanelApi.getOptions()
|
local options = optionPanelApi.getOptions()
|
||||||
if options.enableCardHelpers then
|
if options.enableCardHelpers then
|
||||||
setHelperState(true)
|
setHelperState(true)
|
||||||
|
else
|
||||||
|
updateDisplay()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ function onLoad(savedData)
|
|||||||
isHelperEnabled = loadedData.isHelperEnabled
|
isHelperEnabled = loadedData.isHelperEnabled
|
||||||
end
|
end
|
||||||
checkOptionPanel()
|
checkOptionPanel()
|
||||||
updateDisplay()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- hide buttons and stop monitoring
|
-- hide buttons and stop monitoring
|
||||||
|
@ -46,7 +46,6 @@ function onLoad(savedData)
|
|||||||
activeButtonIndex = loadedData.activeButtonIndex
|
activeButtonIndex = loadedData.activeButtonIndex
|
||||||
end
|
end
|
||||||
checkOptionPanel()
|
checkOptionPanel()
|
||||||
updateDisplay()
|
|
||||||
|
|
||||||
if activeButtonIndex > 0 then
|
if activeButtonIndex > 0 then
|
||||||
selectButton(activeButtonIndex)
|
selectButton(activeButtonIndex)
|
||||||
@ -89,6 +88,7 @@ function createButtons()
|
|||||||
local upgradeSheet = findUpgradeSheet()
|
local upgradeSheet = findUpgradeSheet()
|
||||||
if upgradeSheet then
|
if upgradeSheet then
|
||||||
for i = 1, 4 do
|
for i = 1, 4 do
|
||||||
|
log(4)
|
||||||
if upgradeSheet.call("isUpgradeActive", i) then
|
if upgradeSheet.call("isUpgradeActive", i) then
|
||||||
table.insert(hypothesisList, customizableList[i])
|
table.insert(hypothesisList, customizableList[i])
|
||||||
end
|
end
|
||||||
@ -110,7 +110,7 @@ end
|
|||||||
|
|
||||||
function findUpgradeSheet()
|
function findUpgradeSheet()
|
||||||
local matColor = playermatApi.getMatColorByPosition(self.getPosition())
|
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
|
for j, card in ipairs(result) do
|
||||||
local metadata = JSON.decode(card.getGMNotes()) or {}
|
local metadata = JSON.decode(card.getGMNotes()) or {}
|
||||||
if metadata.id == "09041-c" then
|
if metadata.id == "09041-c" then
|
||||||
|
Loading…
Reference in New Issue
Block a user