Saveload: Support upstream wider station type field size version

This commit is contained in:
Jonathan G Rennison 2024-08-17 22:01:29 +01:00
parent 782840a62b
commit 591fe96a71
2 changed files with 2 additions and 1 deletions

View File

@ -1134,7 +1134,7 @@ bool AfterLoadGame()
}
}
if (SlXvIsFeatureMissing(XSLFI_MORE_STATION_TYPES)) {
if (SlXvIsFeatureMissing(XSLFI_MORE_STATION_TYPES) && IsSavegameVersionBefore(SLV_INCREASE_STATION_TYPE_FIELD_SIZE)) {
/* Expansion of station type field in m6 */
for (TileIndex t = 0; t < MapSize(); t++) {
if (IsTileType(t, MP_STATION)) {

View File

@ -395,6 +395,7 @@ enum SaveLoadVersion : uint16_t {
SLV_COMPANY_ALLOW_LIST, ///< 335 PR#12337 Saving of list of client keys that are allowed to join this company.
SLV_GROUP_NUMBERS, ///< 336 PR#12297 Add per-company group numbers.
SLV_INCREASE_STATION_TYPE_FIELD_SIZE, ///< 337 PR#12572 Increase size of StationType field in map array
SL_MAX_VERSION, ///< Highest possible saveload version