Added dump actor data in the debug window

This commit is contained in:
Tercio Jose
2024-08-02 13:22:57 -03:00
committed by andrew6180
parent 69b63671fc
commit 8b82b9829e
2 changed files with 44 additions and 0 deletions
+21
View File
@@ -595,6 +595,27 @@ local instanceMixins = {
instance:ResetWindow()
instance:RefreshWindow(true)
end,
---open a window with the keys and values of the actor object being shown in the line index
---this function doesn't not return the values, it will 'dump' the values in a new window by calling 'dumpt'
---@param self instance
---@param index number
GetActorInfoFromLineIndex = function(self, index)
local actor = self.barras[index] and self.barras[index].minha_tabela
if (actor) then
local tableToDump = {}
for k, v in pairs(actor) do
if (type(k) == "string") then
if (type(v) == "number" or type(v) == "string") then
tableToDump[k] = v
end
end
end
dumpt(tableToDump)
else
Details:Msg("no actor found in line index", index)
end
end,
}
---get the table with all instances, these instance could be not initialized yet, some might be open, some not in use