mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-06 00:23:49 +02:00
Update server.lua
Added new command. Server.stop_scenario()
This commit is contained in:
parent
25adfe5279
commit
202aca5b52
@ -41,6 +41,7 @@ local discord_embed_raw_tag = '[DISCORD-EMBED-RAW]'
|
|||||||
local discord_admin_embed_tag = '[DISCORD-ADMIN-EMBED]'
|
local discord_admin_embed_tag = '[DISCORD-ADMIN-EMBED]'
|
||||||
local discord_admin_embed_raw_tag = '[DISCORD-ADMIN-EMBED-RAW]'
|
local discord_admin_embed_raw_tag = '[DISCORD-ADMIN-EMBED-RAW]'
|
||||||
local start_scenario_tag = '[START-SCENARIO]'
|
local start_scenario_tag = '[START-SCENARIO]'
|
||||||
|
local stop_scenario_tag = '[STOP-SCENARIO]'
|
||||||
local ping_tag = '[PING]'
|
local ping_tag = '[PING]'
|
||||||
local data_set_tag = '[DATA-SET]'
|
local data_set_tag = '[DATA-SET]'
|
||||||
local data_get_tag = '[DATA-GET]'
|
local data_get_tag = '[DATA-GET]'
|
||||||
@ -155,6 +156,16 @@ function Public.start_scenario(scenario_name)
|
|||||||
raw_print(message)
|
raw_print(message)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Stops and saves the factorio server.
|
||||||
|
-- @usage
|
||||||
|
-- local Server = require 'utils.server'
|
||||||
|
-- Server.stop_scenario()
|
||||||
|
function Public.stop_scenario()
|
||||||
|
local message = stop_scenario_tag
|
||||||
|
|
||||||
|
raw_print(message)
|
||||||
|
end
|
||||||
|
|
||||||
local default_ping_token =
|
local default_ping_token =
|
||||||
Token.register(
|
Token.register(
|
||||||
function(sent_tick)
|
function(sent_tick)
|
||||||
|
Loading…
Reference in New Issue
Block a user