mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 23:24:52 +09:00
Order fromConfig arguments config first
Controller.fromConfig and Host.fromConfig now take the config, then the plugin infos, then the logger or connector. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ee097bfa6f
commit
3a81cfd94b
6 files changed
+9
-9
No files matched your search
@@ -475,9 +475,9 @@ async function startup() {
|
||||
}
|
||||
|
||||
controller = await Controller.fromConfig(
|
||||
clusterLogger,
|
||||
pluginInfos,
|
||||
controllerConfig,
|
||||
pluginInfos,
|
||||
clusterLogger,
|
||||
Boolean(args.canRestart),
|
||||
Boolean(args.recovery),
|
||||
);
|
||||
|
||||
@@ -150,9 +150,9 @@ export default class Controller {
|
||||
|
||||
/** Create a controller with its datastores and mod store loaded from disk */
|
||||
static async fromConfig(
|
||||
clusterLogger: winston.Logger,
|
||||
pluginInfos: lib.PluginNodeEnvInfo[],
|
||||
config: lib.ControllerConfig,
|
||||
pluginInfos: lib.PluginNodeEnvInfo[],
|
||||
clusterLogger: winston.Logger,
|
||||
canRestart = false,
|
||||
recoveryMode = false,
|
||||
) {
|
||||
|
||||
@@ -234,9 +234,9 @@ async function startHost() {
|
||||
|
||||
let hostConnector = new HostConnector(hostConfig, pluginInfos);
|
||||
host = await Host.fromConfig(
|
||||
hostConnector,
|
||||
hostConfig,
|
||||
pluginInfos,
|
||||
hostConnector,
|
||||
Boolean(args.canRestart),
|
||||
Boolean(args.recovery),
|
||||
);
|
||||
|
||||
@@ -331,9 +331,9 @@ export default class Host extends lib.Link {
|
||||
|
||||
/** Create a host with its mod store loaded from disk */
|
||||
static async fromConfig(
|
||||
connector: HostConnector,
|
||||
hostConfig: lib.HostConfig,
|
||||
pluginInfos: lib.PluginNodeEnvInfo[],
|
||||
connector: HostConnector,
|
||||
canRestart = false,
|
||||
recoveryMode = false,
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user