added some debug commands

This commit is contained in:
ZioPao
2023-11-12 22:45:35 +01:00
parent d1aef1f67d
commit 30f343a7de
4 changed files with 53 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
local CommandsData = require("TOC/CommandsData")
local DebugCommands = {}
---comment
---@param playerObj IsoPlayer
---@param args {username : string}
function DebugCommands.PrintTocData(playerObj, args)
local data = ModData.get(CommandsData.GetKey(args.username))
TOC_DEBUG.printTable(data)
end
--------------------
local function OnClientDebugCommand(module, command, playerObj, args)
if module == CommandsData.modules.TOC_DEBUG and DebugCommands[command] then
DebugCommands[command](playerObj, args)
end
end
Events.OnClientCommand.Add(OnClientDebugCommand)