From 705349f35a497b58502b7463010eea3f10550e97 Mon Sep 17 00:00:00 2001 From: Oarcinae Date: Tue, 12 Nov 2024 16:19:45 -0500 Subject: [PATCH] Fix missing migrations for other planet configs. --- changelog.txt | 5 +++++ info.json | 2 +- migrations/oarc-mod-v2.1.11.lua | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 migrations/oarc-mod-v2.1.11.lua diff --git a/changelog.txt b/changelog.txt index 0c70b01..0cee222 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.1.11 +Date: 2024-11-12 + Bugfixes: + - Fixes a crash due to a migration issue if spawns were allowed on not-yet-supported planets. +--------------------------------------------------------------------------------------------------- Version: 2.1.10 Date: 2024-11-11 Major Features: diff --git a/info.json b/info.json index 706cad6..ca071c2 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "oarc-mod", - "version": "2.1.10", + "version": "2.1.11", "factorio_version": "2.0", "title": "Oarc Multiplayer Spawn", "author": "Oarcinae", diff --git a/migrations/oarc-mod-v2.1.11.lua b/migrations/oarc-mod-v2.1.11.lua new file mode 100644 index 0000000..5a00c64 --- /dev/null +++ b/migrations/oarc-mod-v2.1.11.lua @@ -0,0 +1,20 @@ +-- For non-supported surfaces, make sure they have the default settings. +if storage.ocfg.surfaces_config["aquilo"].spawn_config.fill_tile == nil then + storage.ocfg.surfaces_config["aquilo"] = { + spawn_config = NAUVIS_SPAWN_CONFIG, + starting_items = NAUVIS_STARTER_ITEMS + } +end +if storage.ocfg.surfaces_config["vulcanus"].spawn_config.fill_tile == nil then + storage.ocfg.surfaces_config["vulcanus"] = { + spawn_config = NAUVIS_SPAWN_CONFIG, + starting_items = NAUVIS_STARTER_ITEMS + } +end +if storage.ocfg.surfaces_config["gleba"].spawn_config.fill_tile == nil then + storage.ocfg.surfaces_config["gleba"] = { + spawn_config = NAUVIS_SPAWN_CONFIG, + starting_items = NAUVIS_STARTER_ITEMS + } +end +log("Updating non-supported surfaces with default nauvis spawn_config and starting_items.") \ No newline at end of file