plugin: Add debugging function for InstanceMap state

This commit is contained in:
Lucien Greathouse
2019-10-03 17:12:43 -07:00
parent 1ee679395d
commit b72e6e54e6

View File

@@ -18,6 +18,16 @@ function InstanceMap.new()
return setmetatable(self, InstanceMap)
end
function InstanceMap:debugState()
local buffer = {}
for id, instance in pairs(self.fromIds) do
table.insert(buffer, string.format("- %s: %s", id, instance:GetFullName()))
end
return table.concat(buffer, "\n")
end
function InstanceMap:insert(id, instance)
self.fromIds[id] = instance
self.fromInstances[instance] = id