Support enemy_expansion.build_base_unit_dispatch_cooldown in exchange strings

Factorio 2.1.13 added build_base_unit_dispatch_cooldown as the last
field of enemy_expansion in the map exchange string, and rejects map
settings without it. Track the full version in the reader state and
read the field for 2.1.13 and later. Adds a fixture string generated
with 2.1.14 and uses it in the load-scenario integration test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Fable 5 committed 2026-08-18 22:21:28 +00:00
1 parent 0be4fd77e5
commit 021ee1725b
5 files changed
+59 -6

No files matched your search

+9
View File
@@ -615,6 +615,14 @@ const modified_v2_1_map_settings = {
},
};
const modified_v2_1_13_map_settings = {
...modified_v2_1_map_settings,
"enemy_expansion": {
...modified_v2_1_map_settings.enemy_expansion,
"build_base_unit_dispatch_cooldown": 1234,
},
};
const modified_space_age_map_gen_settings = {
autoplace_controls: {
"aquilo_crude_oil": { frequency: 1, size: 1, richness: 1 },
@@ -703,5 +711,6 @@ module.exports = {
modified_v2_map_settings,
modified_v2_1_map_gen_settings,
modified_v2_1_map_settings,
modified_v2_1_13_map_settings,
modified_space_age_map_gen_settings,
};