diff --git a/CHANGELOG.md b/CHANGELOG.md index 5013726a..ca5d4e2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ - Added support for `color-settings` Mod settings (#568)[https://github.com/clusterio/clusterio/issues/568]. +### Changes + +- Fixed generated systemd file for clusteriohost not enabling source maps. +- Fixed ctl not exporting types used for adding commands to ctl plugins. +- Fixed controller only plugins throwing an error about missing a config field on startup out when added to hosts. +- Fixed installer incorrectly claiming the options --factorio-dir and --no-download-headless conflicts with each other. + ## Version 2.0.0-alpha.14 diff --git a/packages/create/create.js b/packages/create/create.js index 7fcc62bc..c222ab04 100755 --- a/packages/create/create.js +++ b/packages/create/create.js @@ -488,6 +488,7 @@ Group=${await groupIdToName(os.userInfo().gid)} WorkingDirectory=${process.cwd()} KillMode=mixed KillSignal=SIGINT +Environment=NODE_OPTIONS=--enable-source-maps ExecStart=${process.cwd()}/node_modules/.bin/clusteriohost run --log-level=warn --can-restart Restart=on-failure RestartPreventExitStatus=8 @@ -611,7 +612,7 @@ async function inquirerMissingArgs(args) { }, ], answers); - if (answers.downloadHeadless) { + if (!answers.factorioDir && answers.downloadHeadless) { answers.factorioDir = "factorio"; } } @@ -759,7 +760,7 @@ async function main() { "Can be set to false using --no-download-headless.", type: "boolean", }) - .conflicts("factorio-dir", "download-headless"); + ; } args = args.argv; @@ -779,6 +780,9 @@ async function main() { let answers = await inquirerMissingArgs(args); if (answers.downloadHeadless) { + if (answers.factorioDir !== "factorio") { + throw new InstallError("--download-headless option requires --factorio-dir to be set to factorio"); + } await downloadLinuxServer(); } diff --git a/packages/ctl/index.ts b/packages/ctl/index.ts index 6a70dd21..54bd5f27 100644 --- a/packages/ctl/index.ts +++ b/packages/ctl/index.ts @@ -1,4 +1,5 @@ import { bootstrap } from "./ctl"; +export * from "./ctl"; export { default as BaseCtlPlugin } from "./src/BaseCtlPlugin"; if (module === require.main) { diff --git a/packages/host/src/Host.ts b/packages/host/src/Host.ts index 5ecfb5bd..7381ad36 100644 --- a/packages/host/src/Host.ts +++ b/packages/host/src/Host.ts @@ -377,7 +377,10 @@ export default class Host extends lib.Link { async loadPlugins() { for (let pluginInfo of this.pluginInfos) { - if (!this.config.get(`${pluginInfo.name}.load_plugin` as keyof lib.HostConfigFields)) { + if ( + !pluginInfo.hostEntrypoint && !pluginInfo.instanceEntrypoint + || !this.config.get(`${pluginInfo.name}.load_plugin` as keyof lib.HostConfigFields) + ) { continue; }