Change: Extend entity override manager and station spec lists to support 16 bit IDs.

This commit is contained in:
Peter Nelson
2023-04-17 23:19:30 +01:00
committed by PeterN
parent e5c9a3e527
commit 912eb68981
10 changed files with 30 additions and 25 deletions

View File

@@ -205,8 +205,9 @@ static void SwapPackets(GoodsEntry *ge)
class SlStationSpecList : public DefaultSaveLoadHandler<SlStationSpecList, BaseStation> {
public:
inline static const SaveLoad description[] = {
SLE_CONDVAR(StationSpecList, grfid, SLE_UINT32, SLV_27, SL_MAX_VERSION),
SLE_CONDVAR(StationSpecList, localidx, SLE_UINT8, SLV_27, SL_MAX_VERSION),
SLE_CONDVAR(StationSpecList, grfid, SLE_UINT32, SLV_27, SL_MAX_VERSION),
SLE_CONDVAR(StationSpecList, localidx, SLE_FILE_U8 | SLE_VAR_U16, SLV_27, SLV_EXTEND_ENTITY_MAPPING),
SLE_CONDVAR(StationSpecList, localidx, SLE_UINT16, SLV_EXTEND_ENTITY_MAPPING, SL_MAX_VERSION),
};
inline const static SaveLoadCompatTable compat_description = _station_spec_list_sl_compat;
@@ -236,8 +237,9 @@ uint8 SlStationSpecList::last_num_specs;
class SlRoadStopSpecList : public DefaultSaveLoadHandler<SlRoadStopSpecList, BaseStation> {
public:
inline static const SaveLoad description[] = {
SLE_VAR(RoadStopSpecList, grfid, SLE_UINT32),
SLE_VAR(RoadStopSpecList, localidx, SLE_UINT8),
SLE_VAR(RoadStopSpecList, grfid, SLE_UINT32),
SLE_CONDVAR(RoadStopSpecList, localidx, SLE_FILE_U8 | SLE_VAR_U16, SLV_27, SLV_EXTEND_ENTITY_MAPPING),
SLE_CONDVAR(RoadStopSpecList, localidx, SLE_UINT16, SLV_EXTEND_ENTITY_MAPPING, SL_MAX_VERSION),
};
inline const static SaveLoadCompatTable compat_description = _station_road_stop_spec_list_sl_compat;