Bump savegame version, copy town to city multipliers for old savegames

This commit is contained in:
Jonathan G Rennison
2021-04-12 20:08:05 +01:00
parent bfb57bf6a2
commit 737b538492
3 changed files with 10 additions and 0 deletions

View File

@@ -3895,6 +3895,14 @@ bool AfterLoadGame()
}
}
if (SlXvIsFeatureMissing(XSLFI_CUSTOM_TOWN_ZONE)) {
_settings_game.economy.city_zone_0_mult = _settings_game.economy.town_zone_0_mult;
_settings_game.economy.city_zone_1_mult = _settings_game.economy.town_zone_1_mult;
_settings_game.economy.city_zone_2_mult = _settings_game.economy.town_zone_2_mult;
_settings_game.economy.city_zone_3_mult = _settings_game.economy.town_zone_3_mult;
_settings_game.economy.city_zone_4_mult = _settings_game.economy.town_zone_4_mult;
}
InitializeRoadGUI();
/* This needs to be done after conversion. */

View File

@@ -148,6 +148,7 @@ const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
{ XSLFI_INFLATION_FIXED_DATES, XSCF_IGNORABLE_ALL, 1, 1, "inflation_fixed_dates", nullptr, nullptr, nullptr },
{ XSLFI_WATER_FLOODING, XSCF_NULL, 1, 1, "water_flooding", nullptr, nullptr, nullptr },
{ XSLFI_MORE_HOUSES, XSCF_NULL, 1, 1, "more_houses", nullptr, nullptr, nullptr },
{ XSLFI_CUSTOM_TOWN_ZONE, XSCF_IGNORABLE_UNKNOWN, 1, 1, "custom_town_zone", nullptr, nullptr, nullptr },
{ XSLFI_NULL, XSCF_NULL, 0, 0, nullptr, nullptr, nullptr, nullptr },// This is the end marker
};

View File

@@ -102,6 +102,7 @@ enum SlXvFeatureIndex {
XSLFI_INFLATION_FIXED_DATES, ///< Inflation is applied between fixed dates
XSLFI_WATER_FLOODING, ///< Water flooding map bit
XSLFI_MORE_HOUSES, ///< More house types
XSLFI_CUSTOM_TOWN_ZONE, ///< Custom town zones
XSLFI_RIFF_HEADER_60_BIT, ///< Size field in RIFF chunk header is 60 bit
XSLFI_HEIGHT_8_BIT, ///< Map tile height is 8 bit instead of 4 bit, but savegame version may be before this became true in trunk