From 3299554e27b4d500d8777bc794b2d574119f5131 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 2 Nov 2024 10:23:59 +0100 Subject: [PATCH] Fixed XML creation --- .../cards/DreamEnhancingSerum.ttslua | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/playercards/cards/DreamEnhancingSerum.ttslua b/src/playercards/cards/DreamEnhancingSerum.ttslua index 8df18363..804e0543 100644 --- a/src/playercards/cards/DreamEnhancingSerum.ttslua +++ b/src/playercards/cards/DreamEnhancingSerum.ttslua @@ -1,10 +1,10 @@ require("playercards/CardsWithHelper") -local playermatApi = require("playermat/PlayermatApi") +local playermatApi = require("playermat/PlayermatApi") local matColor, handColor, loopId -- intentionally global -hasXML = true -isHelperEnabled = false +hasXML = true +isHelperEnabled = false function updateSave() self.script_state = JSON.encode({ isHelperEnabled = isHelperEnabled, loopId = loopId }) @@ -17,10 +17,10 @@ function onLoad(savedData) loopId = loadedData.loopId end updateColors() - + createHelperXML() + if isHelperEnabled then updateDisplay() - createHelperXML() end end @@ -53,7 +53,7 @@ function createHelperXML() children = { { tag = "Panel", attributes = { - preferredHeight="300" + preferredHeight = "300" }, children = { { tag = "Text", @@ -63,26 +63,26 @@ function createHelperXML() font = "font_teutonic-arkham", fontsize = "200" } - }} + } } }, - { - tag = "Panel", - attributes = { - preferredHeight="900" - }, - children = { { - tag = "Text", + { + tag = "Panel", attributes = { - id = "Count", - fontSize = "700", - scale = "2.2 2.2 1", - color = "Green", - font = "font_teutonic-arkham", - text = 0 - } - }} + preferredHeight = "900" + }, + children = { { + tag = "Text", + attributes = { + id = "Count", + fontSize = "700", + scale = "2.2 2.2 1", + color = "Green", + font = "font_teutonic-arkham", + text = 0 + } + } } + } } - } } } self.UI.setXmlTable(xmlTable) end