diff options
author | Erich Eckner <git@eckner.net> | 2018-10-30 11:13:12 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-10-30 15:28:03 +0100 |
commit | a34d095259409cf1454d9777deabbc00bcdb9407 (patch) | |
tree | 9e7c37ed33f5bd6b3c2f41cf248dcb656b2a4afa /src/vehicle_base.h | |
parent | 6647cb917963c4e0d6d633b7a92af78167050893 (diff) | |
download | openttd-underground-plus-others-original.tar.xz |
underground patch appliedunderground-plus-others-original
Diffstat (limited to 'src/vehicle_base.h')
-rw-r--r-- | src/vehicle_base.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vehicle_base.h b/src/vehicle_base.h index f0502a218..9d34cb6b0 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -21,6 +21,7 @@ #include "order_func.h" #include "transport_type.h" #include "group_type.h" +#include "timetable.h" #include "base_consist.h" /** Vehicle status bits in #Vehicle::vehstatus. */ @@ -103,6 +104,7 @@ enum GroundVehicleSubtypeFlags { /** Cached often queried values common to all vehicles. */ struct VehicleCache { + uint32 cached_cargo_mask; ///< Mask of all cargoes carried by the consist. uint16 cached_max_speed; ///< Maximum speed of the consist (minimum of the max speed of all vehicles in the consist). uint16 cached_cargo_age_period; ///< Number of ticks before carried cargo is aged. @@ -211,6 +213,8 @@ public: byte waiting_triggers; ///< Triggers to be yet matched before rerandomizing the random bits. StationID last_station_visited; ///< The last station we stopped at. + StationID last_station_loaded; ///< Last station the vehicle loaded cargo at. + OrderID last_order_id; ///< Order id which caused the vehicle to arrive at the last loading station. CargoID cargo_type; ///< type of cargo this vehicle is carrying byte cargo_subtype; ///< Used for livery refits (NewGRF variations) @@ -218,6 +222,7 @@ public: VehicleCargoList cargo; ///< The cargo this vehicle is carrying uint16 cargo_age_counter; ///< Ticks till cargo is aged next. + uint32 travel_time; ///< Ticks since last loading byte day_counter; ///< Increased by one for each day byte tick_counter; ///< Increased by one for each tick byte running_ticks; ///< Number of ticks this vehicle was not stopped this day @@ -243,7 +248,7 @@ public: /** We want to 'destruct' the right class. */ virtual ~Vehicle(); - void BeginLoading(); + void BeginLoading(StationID station); void LeaveStation(); GroundVehicleCache *GetGroundVehicleCache(); @@ -761,6 +766,8 @@ public: bool HasEngineType() const; bool HasDepotOrder() const; void HandlePathfindingResult(bool path_found); + void MarkSeparationInvalid(); + void SetSepSettings(TTSepMode Mode, uint Parameter); /** * Check if the vehicle is a front engine. |