From 60615f103a24140841faa590273e13d72a6c5dd5 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Sun, 7 May 2023 00:07:35 +0200 Subject: [PATCH] Small XML Fix Forgot to change the table index to object ids Forgot getXMLElements for Frames --- Basalt/plugins/xml.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Basalt/plugins/xml.lua b/Basalt/plugins/xml.lua index 4f5200e..7dc2599 100644 --- a/Basalt/plugins/xml.lua +++ b/Basalt/plugins/xml.lua @@ -237,7 +237,7 @@ return { if(tab.properties~=nil)then tab = {tab} end for k,v in pairs(tab)do local obj = f(self, v["@id"] or uuid()) - table.insert(lastXMLReferences, obj) + lastXMLReferences[obj:getName()] = obj xmlDefaultValues(v, obj, scripts) end end @@ -306,7 +306,7 @@ return { if(tab.properties~=nil)then tab = {tab} end for k,v in pairs(tab)do local obj = f(self, v["@id"] or uuid()) - table.insert(lastXMLReferences, obj) + lastXMLReferences[obj:getName()] = obj xmlDefaultValues(v, obj, scripts) end end @@ -337,6 +337,10 @@ return { return self end, + getXMLElements = function(self) + return lastXMLReferences + end, + loadLayout = function(self, path) if(fs.exists(path))then local scripts = {}