mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 07:30:41 +09:00
Port message types to TypeScript
This commit is contained in:
1 parent
15ea9a91dc
commit
2a52a82fb7
31 files changed
+2846
-4124
No files matched your search
@@ -457,7 +457,7 @@ class Host extends lib.Link {
|
||||
let instanceConnection = this.instanceConnections.get(instanceId);
|
||||
this.send(
|
||||
new lib.InstanceStatusChangedEvent(
|
||||
instanceId, instanceConnection ? instanceConnection.status : "stopped", null
|
||||
instanceId, instanceConnection ? instanceConnection.status : "stopped", undefined
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -438,7 +438,7 @@ rcon.print(game.table_to_json(players))`.replace(/\r?\n/g, " ");
|
||||
new lib.InstanceStatusChangedEvent(
|
||||
this.id,
|
||||
status,
|
||||
this.server && this.server.gamePort || this.config.get("factorio.game_port") || null,
|
||||
this.server && this.server.gamePort || this.config.get("factorio.game_port") || undefined,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -796,9 +796,11 @@ class FactorioServer extends events.EventEmitter {
|
||||
[
|
||||
"--config", this.writePath("config.ini"),
|
||||
"--create", this.writePath("saves", name),
|
||||
...(seed !== null ? ["--map-gen-seed", seed] : []),
|
||||
...(mapGenSettings !== null ? ["--map-gen-settings", this.writePath("map-gen-settings.json")] : []),
|
||||
...(mapSettings !== null ? ["--map-settings", this.writePath("map-settings.json")] : []),
|
||||
/* eslint-disable eqeqeq, no-eq-null */
|
||||
...(seed != null ? ["--map-gen-seed", seed] : []),
|
||||
...(mapGenSettings != null ? ["--map-gen-settings", this.writePath("map-gen-settings.json")] : []),
|
||||
...(mapSettings != null ? ["--map-settings", this.writePath("map-settings.json")] : []),
|
||||
/* eslint-enable eqeqeq, no-eq-null */
|
||||
...(this.verboseLogging ? ["--verbose"] : []),
|
||||
],
|
||||
{
|
||||
@@ -886,9 +888,11 @@ class FactorioServer extends events.EventEmitter {
|
||||
[
|
||||
"--config", this.writePath("config.ini"),
|
||||
"--start-server-load-scenario", scenario,
|
||||
...(seed !== null ? ["--map-gen-seed", seed] : []),
|
||||
...(mapGenSettings !== null ? ["--map-gen-settings", this.writePath("map-gen-settings.json")] : []),
|
||||
...(mapSettings !== null ? ["--map-settings", this.writePath("map-settings.json")] : []),
|
||||
/* eslint-disable eqeqeq, no-eq-null */
|
||||
...(seed != null ? ["--map-gen-seed", seed] : []),
|
||||
...(mapGenSettings != null ? ["--map-gen-settings", this.writePath("map-gen-settings.json")] : []),
|
||||
...(mapSettings != null ? ["--map-settings", this.writePath("map-settings.json")] : []),
|
||||
/* eslint-enable eqeqeq, no-eq-null */
|
||||
"--port", this.gamePort,
|
||||
"--rcon-port", this.rconPort,
|
||||
"--rcon-password", this.rconPassword,
|
||||
|
||||
Reference in new issue
Block a user