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.
This commit is contained in:
Hornwitser committed 2023-02-15 20:31:02 +01:00
1 parent fda2d7f574
commit bfe523ac45
1 file changed
+1 -1
+1 -1
View File
@@ -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