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:

committed by
Patric Stout

parent
4600d289b5
commit
4e4720f217
@@ -32,9 +32,11 @@ extern OrderListPool _orderlist_pool;
|
||||
*/
|
||||
struct Order : OrderPool::PoolItem<&_order_pool> {
|
||||
private:
|
||||
friend SaveLoadTable GetVehicleDescription(VehicleType vt); ///< Saving and loading the current order of vehicles.
|
||||
friend void Load_VEHS(); ///< Loading of ancient vehicles.
|
||||
friend SaveLoadTable GetOrderDescription(); ///< Saving and loading of orders.
|
||||
/* So we can use private/protected variables in the saveload code */
|
||||
friend class SlVehicleCommon;
|
||||
friend class SlVehicleDisaster;
|
||||
|
||||
uint8 type; ///< The type of order + non-stop flags
|
||||
uint8 flags; ///< Load/unload types, depot order/action types.
|
||||
|
Reference in New Issue
Block a user