mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-24 14:45:56 +00:00
plugin: Add debugging function for InstanceMap state
This commit is contained in:
@@ -18,6 +18,16 @@ function InstanceMap.new()
|
|||||||
return setmetatable(self, InstanceMap)
|
return setmetatable(self, InstanceMap)
|
||||||
end
|
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)
|
function InstanceMap:insert(id, instance)
|
||||||
self.fromIds[id] = instance
|
self.fromIds[id] = instance
|
||||||
self.fromInstances[instance] = id
|
self.fromInstances[instance] = id
|
||||||
|
|||||||
Reference in New Issue
Block a user