Add setting for inflation dates mode

This commit is contained in:
Jonathan G Rennison
2021-01-30 19:59:00 +00:00
parent 39df1c49a1
commit 33d9e48bcf
8 changed files with 24 additions and 2 deletions

View File

@@ -3831,6 +3831,10 @@ bool AfterLoadGame()
UpdateAllAnimatedTileSpeeds();
}
if (SlXvIsFeatureMissing(XSLFI_INFLATION_FIXED_DATES)) {
_settings_game.economy.inflation_fixed_dates = !IsSavegameVersionBefore(SLV_GS_INDUSTRY_CONTROL);
}
InitializeRoadGUI();
/* This needs to be done after conversion. */

View File

@@ -144,6 +144,7 @@ const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
{ XSLFI_NEWGRF_INFO_EXTRA, XSCF_NULL, 1, 1, "newgrf_info_extra", nullptr, nullptr, nullptr },
{ XSLFI_INDUSTRY_CARGO_ADJ, XSCF_IGNORABLE_UNKNOWN, 1, 1, "industry_cargo_adj", nullptr, nullptr, nullptr },
{ XSLFI_REALISTIC_TRAIN_BRAKING,XSCF_NULL, 1, 1, "realistic_train_braking", nullptr, nullptr, "VLKA" },
{ XSLFI_INFLATION_FIXED_DATES, XSCF_IGNORABLE_ALL, 1, 1, "inflation_fixed_dates", nullptr, nullptr, nullptr },
{ XSLFI_NULL, XSCF_NULL, 0, 0, nullptr, nullptr, nullptr, nullptr },// This is the end marker
};

View File

@@ -98,6 +98,7 @@ enum SlXvFeatureIndex {
XSLFI_NEWGRF_INFO_EXTRA, ///< Extra NewGRF info in savegame
XSLFI_INDUSTRY_CARGO_ADJ, ///< Industry cargo adjustment patch
XSLFI_REALISTIC_TRAIN_BRAKING, ///< Realistic train braking
XSLFI_INFLATION_FIXED_DATES, ///< Inflation is applied between fixed dates
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