mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-11 01:49:50 +00:00
Fix #12912: CompanyProperties::inaugurated_year_calendar not saved
This commit is contained in:
parent
8962ea8bcc
commit
3ea4d1d4fc
@ -3320,7 +3320,7 @@ bool AfterLoadGame()
|
||||
ScriptObject::InitializeRandomizers();
|
||||
}
|
||||
|
||||
if (IsSavegameVersionBefore(SLV_COMPANY_INAUGURATED_PERIOD)) {
|
||||
if (IsSavegameVersionBefore(SLV_COMPANY_INAUGURATED_PERIOD_V2)) {
|
||||
for (Company *c : Company::Iterate()) {
|
||||
c->inaugurated_year_calendar = _settings_game.game_creation.starting_year;
|
||||
}
|
||||
|
@ -490,6 +490,7 @@ static const SaveLoad _company_desc[] = {
|
||||
SLE_CONDVAR(CompanyProperties, last_build_coordinate, SLE_UINT32, SLV_6, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(CompanyProperties, inaugurated_year, SLE_FILE_U8 | SLE_VAR_I32, SL_MIN_VERSION, SLV_31),
|
||||
SLE_CONDVAR(CompanyProperties, inaugurated_year, SLE_INT32, SLV_31, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(CompanyProperties, inaugurated_year_calendar, SLE_INT32, SLV_COMPANY_INAUGURATED_PERIOD_V2, SL_MAX_VERSION),
|
||||
|
||||
SLE_CONDVAR(CompanyProperties, num_valid_stat_ent, SLE_UINT8, SL_MIN_VERSION, SLV_SAVELOAD_LIST_LENGTH),
|
||||
|
||||
|
@ -395,6 +395,7 @@ enum SaveLoadVersion : uint16_t {
|
||||
SLV_PATH_CACHE_FORMAT, ///< 346 PR#12345 Vehicle path cache format changed.
|
||||
SLV_ANIMATED_TILE_STATE_IN_MAP, ///< 347 PR#13082 Animated tile state saved for improved performance.
|
||||
SLV_INCREASE_HOUSE_LIMIT, ///< 348 PR#12288 Increase house limit to 4096.
|
||||
SLV_COMPANY_INAUGURATED_PERIOD_V2, ///< 349 PR#13448 Fix savegame storage for company inaugurated year in wallclock mode.
|
||||
|
||||
SL_MAX_VERSION, ///< Highest possible saveload version
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user