Merge pull request #1014 from bbassie/feature/patched-scenario

Add create-scenario command to clusteriohost
This commit is contained in:
Cooldude2606 authored and GitHub committed 2026-10-06 16:37:16 +01:00
commit b07c25aa7e
11 files changed
+496 -36

No files matched your search

+11
View File
@@ -24,6 +24,7 @@ import * as lib from "@clusterio/lib";
import { ConsoleTransport, levels, logger } from "@clusterio/lib";
import Host from "./src/Host.js";
import { createScenarioCommand, handleCreateScenarioCommand } from "./src/create_scenario.js";
let host: Host | undefined;
@@ -119,6 +120,11 @@ async function startHost() {
.option("bypass-lock-file", { hidden: true, type: "boolean", nargs: 0, default: false })
.command("plugin", "Manage available plugins", lib.pluginCommand)
.command("config", "Manage Host config", lib.configCommand)
.command(
"create-scenario <output>",
"Create a scenario patched with modules for use outside Clusterio",
createScenarioCommand,
)
.command("run", "Run host", yargs => {
yargs.option("can-restart", {
type: "boolean", nargs: 0, default: false,
@@ -185,6 +191,11 @@ async function startHost() {
return;
}
if (command === "create-scenario") {
await handleCreateScenarioCommand(args, hostConfig, pluginInfos);
return;
}
// From this point on the host should run
await hostConfigLock.acquire();