mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
plugin: Add debugging function for InstanceMap state
This commit is contained in:
parent
1ee679395d
commit
b72e6e54e6
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue