mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Update all code styles
This commit is contained in:
@@ -10,16 +10,16 @@ local Commands = require("modules/exp_commands")
|
||||
local Clustorio = require("modules/clusterio/api")
|
||||
|
||||
Commands.new("_ipc", "Send an IPC message on the selected channel")
|
||||
:add_flags{ "system_only" }
|
||||
:enable_auto_concatenation()
|
||||
:argument("channel", "string")
|
||||
:argument("message", "string")
|
||||
:register(function(_, channel, message)
|
||||
local tbl = game.json_to_table(message)
|
||||
if tbl == nil then
|
||||
return Commands.status.invalid_input("Invalid json string")
|
||||
else
|
||||
Clustorio.send_json(channel, tbl)
|
||||
return Commands.status.success()
|
||||
end
|
||||
end)
|
||||
:add_flags{ "system_only" }
|
||||
:enable_auto_concatenation()
|
||||
:argument("channel", "string")
|
||||
:argument("message", "string")
|
||||
:register(function(_, channel, message)
|
||||
local tbl = game.json_to_table(message)
|
||||
if tbl == nil then
|
||||
return Commands.status.invalid_input("Invalid json string")
|
||||
else
|
||||
Clustorio.send_json(channel, tbl)
|
||||
return Commands.status.success()
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user