Rework data table
This commit is contained in:
@@ -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
|
||||
|
||||
13
Heimdall.lua
13
Heimdall.lua
@@ -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
|
||||
@@ -1,5 +1,5 @@
|
||||
---@type HeimdallData
|
||||
local _, data = ...
|
||||
---@cast data HeimdallData
|
||||
|
||||
---@class Message
|
||||
---@field message string
|
||||
|
||||
Reference in New Issue
Block a user