From 39465d7f5c5e2c3cebda8187e8416138a07599a4 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 13 Aug 2024 20:49:53 +0100 Subject: [PATCH] Codefix: Move saveload of road stop tile data (#12883) So that road stop tile data is also saved/loaded for road waypoints --- src/saveload/saveload.h | 2 ++ src/saveload/station_sl.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index c75102bbf9..5918b285da 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -385,6 +385,8 @@ enum SaveLoadVersion : uint16_t { SLV_ROAD_WAYPOINTS, ///< 338 PR#12572 Road waypoints 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 }; diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp index 2f427d8d52..37f8d3c297 100644 --- a/src/saveload/station_sl.cpp +++ b/src/saveload/station_sl.cpp @@ -622,7 +622,7 @@ public: 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_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), }; inline const static SaveLoadCompatTable compat_description = _station_normal_sl_compat; @@ -687,6 +687,7 @@ static const SaveLoad _station_desc[] = { SLEG_STRUCT("waypoint", SlStationWaypoint), SLEG_CONDSTRUCTLIST("speclist", SlStationSpecList, SLV_27, SL_MAX_VERSION), SLEG_CONDSTRUCTLIST("roadstopspeclist", SlStationSpecList, SLV_NEWGRF_ROAD_STOPS, SL_MAX_VERSION), + SLEG_CONDSTRUCTLIST("roadstoptiledata", SlRoadStopTileData, SLV_ROAD_STOP_TILE_DATA, SL_MAX_VERSION), }; struct STNNChunkHandler : ChunkHandler {