summaryrefslogtreecommitdiff
path: root/src/vehicle_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicle_base.h')
-rw-r--r--src/vehicle_base.h9
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.