Codechange: remove the special station/vehicle code from SaveLoad

With the new SLEG_STRUCT it is much easier to embed a struct
in a struct, where the sub-struct has limitations on when it is
being used.
This makes both the code easier to read (less magic) and avoids
the SaveLoad needing to know all these things about Stations
and Vehicles.
This commit is contained in:
Patric Stout
2021-06-06 16:03:56 +02:00
committed by Patric Stout
parent 4600d289b5
commit 4e4720f217
8 changed files with 381 additions and 256 deletions

View File

@@ -305,8 +305,8 @@ public:
friend class StationCargoList;
/** The super class ought to know what it's doing. */
friend class CargoList<VehicleCargoList, CargoPacketList>;
/** The vehicles have a cargo list (and we want that saved). */
friend SaveLoadTable GetVehicleDescription(VehicleType vt);
/* So we can use private/protected variables in the saveload code */
friend class SlVehicleCommon;
friend class CargoShift;
friend class CargoTransfer;