From bfe523ac458d9db8ba4b2722e274004be4a983bd Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 15 Feb 2023 20:28:46 +0100 Subject: [PATCH] Fix disabled mods still being loaded The format of mod-list.json written on syncMods would incorrectly write a base mod without an enableds key which is required, causing Factorio to ignore the file entirerly. Furthermore the enabled status was not written causing all mods to be loaded even if they were disabled in the mod pack. --- packages/slave/src/Instance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/slave/src/Instance.js b/packages/slave/src/Instance.js index 930d8916..1b50144b 100644 --- a/packages/slave/src/Instance.js +++ b/packages/slave/src/Instance.js @@ -649,7 +649,7 @@ rcon.print(game.table_to_json(players))`.replace(/\r?\n/g, " "); // Write mod-list.json await fs.outputFile(this.path("mods", "mod-list.json"), JSON.stringify({ - mods: [{ name: "base" }, ...this.activeModPack.mods.values()].map(m => ({ name: m.name, enabled: true })), + mods: [...this.activeModPack.mods.values()], }, null, 2)); // Write mod-settings.dat