mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
Factorio 2.1.18 removed PollutionSettings::max_pollution_to_restore_trees, but readPollution still read it for every version, so every map setting after it was read 9 bytes late: enemy_attack_pollution_consumption_modifier came out as garbage, the enemy_evolution factors shifted by one field and enemy_expansion.enabled and both expansion distances came out null. Read the field only for strings older than 2.1.18. Add modified_v2_1_17 and modified_v2_1_18 fixtures generated with headless 2.1.17 and 2.1.18 from the modified 2.1 settings (base game only), unit tests asserting their full decoded output, and use the 2.1.18 string for the load-scenario integration test on 2.1.18 and later. Fixes #1131 Co-authored-by: ColumbusLabs <287001685+ColumbusLabs@users.noreply.github.com> Co-authored-by: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com>