diff options
author | Patric Stout <truebrain@openttd.org> | 2021-06-06 16:03:56 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-06-14 21:58:05 +0200 |
commit | 4e4720f2178c9e0faf7233e55bec71e6ae19f9ad (patch) | |
tree | af474483110fca7fd7c617e052d1d381991e1179 /src/order_base.h | |
parent | 4600d289b5d12389137d36e57bfda09c26ed6caf (diff) | |
download | openttd-4e4720f2178c9e0faf7233e55bec71e6ae19f9ad.tar.xz |
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.
Diffstat (limited to 'src/order_base.h')
-rw-r--r-- | src/order_base.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/order_base.h b/src/order_base.h index c510bd3e0..84f5289ec 100644 --- a/src/order_base.h +++ b/src/order_base.h @@ -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. |