From 34bf53e66c588c941f70e94237e598d3e5660def Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Tue, 25 Feb 2025 09:09:32 +0100 Subject: [PATCH] Small and quick fixes: - setTheme, getTheme and loadTheme changed the wrong reference - XML changed number properties to be usable with reactive values --- src/plugins/theme.lua | 6 +++--- src/plugins/xml.lua | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/theme.lua b/src/plugins/theme.lua index d7b1132..bfdef62 100644 --- a/src/plugins/theme.lua +++ b/src/plugins/theme.lua @@ -185,14 +185,14 @@ local themeAPI = {} --- @shortDescription Sets a new theme --- @param newTheme table The theme configuration to set function themeAPI.setTheme(newTheme) - defaultTheme = newTheme + themes.default = newTheme end --- Gets the current theme configuration --- @shortDescription Gets the current theme --- @return table theme The current theme configuration function themeAPI.getTheme() - return defaultTheme + return themes.default end --- Loads a theme from a JSON file @@ -203,7 +203,7 @@ function themeAPI.loadTheme(path) if file then local content = file.readAll() file.close() - defaultTheme = textutils.unserializeJSON(content) + themes.default = textutils.unserializeJSON(content) end end diff --git a/src/plugins/xml.lua b/src/plugins/xml.lua index 59cb903..9e658e5 100644 --- a/src/plugins/xml.lua +++ b/src/plugins/xml.lua @@ -20,7 +20,6 @@ local function parseXML(self, xmlString) for line in xmlString:gmatch("[^\r\n]+") do line = line:match("^%s*(.-)%s*$") - self.basalt.LOGGER.debug("Parsing line: " .. line) if line:match("^