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 = {}