Rework data table
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
---@type HeimdallData
|
|
||||||
local _, data = ...
|
local _, data = ...
|
||||||
|
---@cast data HeimdallData
|
||||||
|
|
||||||
if not data.dumpTable then
|
if not data.dumpTable then
|
||||||
---@param table table
|
---@param table table
|
||||||
---@param depth number?
|
---@param depth number?
|
||||||
data.dumpTable = function(table, depth)
|
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
|
if depth == nil then
|
||||||
depth = 0
|
depth = 0
|
||||||
end
|
end
|
||||||
|
|||||||
13
Heimdall.lua
13
Heimdall.lua
@@ -1,8 +1,19 @@
|
|||||||
---@type HeimdallData
|
|
||||||
local _, data = ...
|
local _, data = ...
|
||||||
|
---@cast data HeimdallData
|
||||||
|
|
||||||
if not Heimdall_Data then Heimdall_Data = {} end
|
if not Heimdall_Data then Heimdall_Data = {} end
|
||||||
|
|
||||||
---@class HeimdallData
|
---@class HeimdallData
|
||||||
|
---@field config HeimdallConfig
|
||||||
|
---@field raceMap table<string, string>
|
||||||
---@field dumpTable fun(table: any, depth?: number): nil
|
---@field dumpTable fun(table: any, depth?: number): nil
|
||||||
---@field messenger {queue: table<string, Message>, ticker: number}
|
---@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 = ...
|
local _, data = ...
|
||||||
|
---@cast data HeimdallData
|
||||||
|
|
||||||
---@class Message
|
---@class Message
|
||||||
---@field message string
|
---@field message string
|
||||||
|
|||||||
Reference in New Issue
Block a user