Switch to sp/mp init events (#404)

This commit is contained in:
Cooldude2606
2025-08-30 20:39:54 +01:00
committed by GitHub
parent 82c2c7f23c
commit 8bcb65101b
7 changed files with 15 additions and 23 deletions

View File

@@ -10,6 +10,9 @@ local Clustorio = require("modules/clusterio/api")
local json_to_table = helpers.json_to_table
Commands.add_rcon_static("Clustorio", Clustorio)
Commands.add_rcon_static("ipc", Clustorio.send_json)
Commands.new("_ipc", { "exp-commands_ipc.description" })
:argument("channel", { "exp-commands_ipc.arg-channel" }, Commands.types.string)
:argument("message", { "exp-commands_ipc.arg-message" }, Commands.types.string)

View File

@@ -11,7 +11,6 @@ System command which runs arbitrary code within a custom (not sandboxed) environ
local ExpUtil = require("modules/exp_util")
local Async = require("modules/exp_util/async")
local Storage = require("modules/exp_util/storage")
local Clustorio = require("modules/clusterio/api")
local Commands = require("modules/exp_commands") --- @class Commands
@@ -26,9 +25,7 @@ setmetatable(rcon_env, { __index = rcon_static })
rcon_static.Async = Async
rcon_static.ExpUtil = ExpUtil
rcon_static.Commands = Commands
rcon_static.Clustorio = Clustorio
rcon_static.print = Commands.print
rcon_static.ipc = Clustorio.send_json
--- @diagnostic enable: name-style-check
--- Some common callback values which are useful when a player uses the command