From 433b4688c43f5d9503129fdee0e7cc98da433a37 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 15 Aug 2024 16:44:04 +0200 Subject: [PATCH] Updated load function for CardsWithHelper --- src/playercards/CardsWithHelper.ttslua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/playercards/CardsWithHelper.ttslua b/src/playercards/CardsWithHelper.ttslua index 5b1ea3c0..9b0f8e0f 100644 --- a/src/playercards/CardsWithHelper.ttslua +++ b/src/playercards/CardsWithHelper.ttslua @@ -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)