Files
The-Only-Cure/media/lua/server/TOC/DebugCommands.lua
2023-11-12 22:45:35 +01:00

24 lines
590 B
Lua

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)