Merge pull request #821 from argonui/helper-loading
Updated load function for CardsWithHelper
This commit is contained in:
commit
1ef6c641a1
@ -18,6 +18,16 @@ local GlobalApi = require("core/GlobalApi")
|
||||
-- if the respective option is enabled in onLoad(), enable the helper
|
||||
function syncDisplayWithOptionPanel()
|
||||
self.addTag("CardWithHelper")
|
||||
|
||||
-- check if this card is in a hand zone (because we're loading a saved game)
|
||||
for _, zone in ipairs(self.getZones()) do
|
||||
if zone.type == "Hand" then
|
||||
setHelperState(false)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- get state of the option panel
|
||||
local options = GlobalApi.getOptionPanelState()
|
||||
if options.enableCardHelpers then
|
||||
setHelperState(true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user