From 03d5613570b9c32e27c82a16c49b8fafcb68e8c9 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Tue, 25 Jun 2024 19:42:21 +0200 Subject: [PATCH] more bugfixes --- src/core/Global.ttslua | 3 +-- src/playercards/CardsThatRedrawTokens.ttslua | 8 ++++++++ src/playercards/CardsWithHelper.ttslua | 2 -- src/playercards/cards/BookofLivingMyths.ttslua | 6 ++---- xml/playercards/BookofLivingMyths.xml | 10 +++++----- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index 21db7507..dc909387 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -1335,8 +1335,7 @@ function contentDownloadCallback(request, params) if pos then spawnTable.position = pos else - broadcastToAll( - "Please make space in the area below the tentacle stand in the upper middle of the table and try again.", "Red") + broadcastToAll("Please make space in the area below the tentacle stand in the upper middle of the table and try again.", "Red") return end end diff --git a/src/playercards/CardsThatRedrawTokens.ttslua b/src/playercards/CardsThatRedrawTokens.ttslua index d58bdb2a..479dc55a 100644 --- a/src/playercards/CardsThatRedrawTokens.ttslua +++ b/src/playercards/CardsThatRedrawTokens.ttslua @@ -96,6 +96,14 @@ function createHelperXML() self.UI.setXmlTable(xmlTable) end +function shutOff() + self.UI.hide("Helper") +end + +function initialize() + self.UI.show("Helper") +end + function triggerXMLTokenLabelCreation() Global.call("activeRedrawEffect", { VALID_TOKENS = VALID_TOKENS, diff --git a/src/playercards/CardsWithHelper.ttslua b/src/playercards/CardsWithHelper.ttslua index 523ab264..b0f1cfd1 100644 --- a/src/playercards/CardsWithHelper.ttslua +++ b/src/playercards/CardsWithHelper.ttslua @@ -29,12 +29,10 @@ end function actualDisplayUpdate() if isHelperEnabled then - self.UI.show("Helper") self.clearContextMenu() self.addContextMenuItem("Disable Helper", toggleHelper) if initialize then initialize() end else - self.UI.hide("Helper") self.clearContextMenu() self.addContextMenuItem("Enable Helper", toggleHelper) if shutOff then shutOff() end diff --git a/src/playercards/cards/BookofLivingMyths.ttslua b/src/playercards/cards/BookofLivingMyths.ttslua index 277ddb09..97ce1a01 100644 --- a/src/playercards/cards/BookofLivingMyths.ttslua +++ b/src/playercards/cards/BookofLivingMyths.ttslua @@ -26,8 +26,7 @@ end -- hide buttons and stop monitoring function shutOff() - self.UI.setAttribute("inactives", "active", false) - self.UI.setAttribute("actives", "active", false) + self.UI.hide("Helper") if loopId then Wait.stop(loopId) end loopId = nil updateSave() @@ -35,8 +34,7 @@ end -- show buttons and begin monitoring chaos bag for curse and bless tokens function initialize() - self.UI.setAttribute("inactives", "active", true) - self.UI.setAttribute("actives", "active", true) + self.UI.show("Helper") loopId = Wait.time(maybeUpdateButtonState, 1, -1) updateSave() end diff --git a/xml/playercards/BookofLivingMyths.xml b/xml/playercards/BookofLivingMyths.xml index 547a057a..dae6e2b6 100644 --- a/xml/playercards/BookofLivingMyths.xml +++ b/xml/playercards/BookofLivingMyths.xml @@ -13,8 +13,7 @@ onClick="resolveToken" textColor="white" active="false"/> - - - + +