Codefix: Move saveload of road stop tile data (#12883)

So that road stop tile data is also saved/loaded for road waypoints
This commit is contained in:
Jonathan G Rennison 2024-08-13 20:49:53 +01:00 committed by GitHub
parent 1ff35cb6f9
commit 39465d7f5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -385,6 +385,8 @@ enum SaveLoadVersion : uint16_t {
SLV_ROAD_WAYPOINTS, ///< 338 PR#12572 Road waypoints SLV_ROAD_WAYPOINTS, ///< 338 PR#12572 Road waypoints
SLV_COMPANY_INAUGURATED_PERIOD, ///< 339 PR#12798 Companies show the period inaugurated in wallclock mode. SLV_COMPANY_INAUGURATED_PERIOD, ///< 339 PR#12798 Companies show the period inaugurated in wallclock mode.
SLV_ROAD_STOP_TILE_DATA, ///< 340 PR#12883 Move storage of road stop tile data, also save for road waypoints.
SL_MAX_VERSION, ///< Highest possible saveload version SL_MAX_VERSION, ///< Highest possible saveload version
}; };

View File

@ -622,7 +622,7 @@ public:
SLE_REFLIST(Station, loading_vehicles, REF_VEHICLE), SLE_REFLIST(Station, loading_vehicles, REF_VEHICLE),
SLE_CONDVAR(Station, always_accepted, SLE_FILE_U32 | SLE_VAR_U64, SLV_127, SLV_EXTEND_CARGOTYPES), SLE_CONDVAR(Station, always_accepted, SLE_FILE_U32 | SLE_VAR_U64, SLV_127, SLV_EXTEND_CARGOTYPES),
SLE_CONDVAR(Station, always_accepted, SLE_UINT64, SLV_EXTEND_CARGOTYPES, SL_MAX_VERSION), SLE_CONDVAR(Station, always_accepted, SLE_UINT64, SLV_EXTEND_CARGOTYPES, SL_MAX_VERSION),
SLEG_CONDSTRUCTLIST("speclist", SlRoadStopTileData, SLV_NEWGRF_ROAD_STOPS, SL_MAX_VERSION), SLEG_CONDSTRUCTLIST("speclist", SlRoadStopTileData, SLV_NEWGRF_ROAD_STOPS, SLV_ROAD_STOP_TILE_DATA),
SLEG_STRUCTLIST("goods", SlStationGoods), SLEG_STRUCTLIST("goods", SlStationGoods),
}; };
inline const static SaveLoadCompatTable compat_description = _station_normal_sl_compat; inline const static SaveLoadCompatTable compat_description = _station_normal_sl_compat;
@ -687,6 +687,7 @@ static const SaveLoad _station_desc[] = {
SLEG_STRUCT("waypoint", SlStationWaypoint), SLEG_STRUCT("waypoint", SlStationWaypoint),
SLEG_CONDSTRUCTLIST("speclist", SlStationSpecList<StationSpec>, SLV_27, SL_MAX_VERSION), SLEG_CONDSTRUCTLIST("speclist", SlStationSpecList<StationSpec>, SLV_27, SL_MAX_VERSION),
SLEG_CONDSTRUCTLIST("roadstopspeclist", SlStationSpecList<RoadStopSpec>, SLV_NEWGRF_ROAD_STOPS, SL_MAX_VERSION), SLEG_CONDSTRUCTLIST("roadstopspeclist", SlStationSpecList<RoadStopSpec>, SLV_NEWGRF_ROAD_STOPS, SL_MAX_VERSION),
SLEG_CONDSTRUCTLIST("roadstoptiledata", SlRoadStopTileData, SLV_ROAD_STOP_TILE_DATA, SL_MAX_VERSION),
}; };
struct STNNChunkHandler : ChunkHandler { struct STNNChunkHandler : ChunkHandler {