Rework data table

This commit is contained in:
2024-12-12 13:03:20 +01:00
parent af2bb157bd
commit f812aed6eb
3 changed files with 18 additions and 4 deletions

View File

@@ -1,11 +1,14 @@
---@type HeimdallData
local _, data = ...
---@cast data HeimdallData
if not data.dumpTable then
---@param table table
---@param depth number?
data.dumpTable = function(table, depth)
if not table then print(tostring(table)) return end
if not table then
print(tostring(table))
return
end
if depth == nil then
depth = 0
end

View File

@@ -1,8 +1,19 @@
---@type HeimdallData
local _, data = ...
---@cast data HeimdallData
if not Heimdall_Data then Heimdall_Data = {} end
---@class HeimdallData
---@field config HeimdallConfig
---@field raceMap table<string, string>
---@field dumpTable fun(table: any, depth?: number): nil
---@field messenger {queue: table<string, Message>, ticker: number}
---@class HeimdallConfig
---@field spotter HeimdallSpotterConfig
---@class HeimdallSpotterConfig
---@field allyOnly boolean
---@field stinkyOnly boolean
data.raceMap

View File

@@ -1,5 +1,5 @@
---@type HeimdallData
local _, data = ...
---@cast data HeimdallData
---@class Message
---@field message string