Setup exp_scenario for commands

This commit is contained in:
Cooldude2606
2024-10-20 02:42:14 +01:00
parent 34a7879761
commit e78234898e
31 changed files with 2412 additions and 199 deletions

View File

@@ -61,11 +61,13 @@ function Commands.add_rcon_callback(name, callback)
rcon_callbacks[name] = callback
end
Commands.new("_rcon", { "exp-commands-rcon.description" })
:add_flags{ "system_only" }
Commands.new("_rcon", { "exp-commands_rcon.description" })
:argument("invocation", { "exp-commands_rcon.arg-invocation" }, Commands.types.string)
:enable_auto_concatenation()
:argument("invocation", { "exp-commands-rcon.arg-invocation" }, Commands.types.string)
:add_flags{ "system_only" }
:register(function(player, invocation_string)
--- @cast invocation_string string
-- Construct the environment the command will run within
local env = setmetatable({}, { __index = rcon_env, __newindex = rcon_env })
for name, callback in pairs(rcon_callbacks) do