Merge branch 'order_occupancy-sx' into jgrpp
This commit is contained in:
@@ -278,6 +278,8 @@ public:
|
||||
byte running_ticks; ///< Number of ticks this vehicle was not stopped this day
|
||||
|
||||
byte vehstatus; ///< Status
|
||||
|
||||
uint8 order_occupancy_average; ///< NOSAVE: order occupancy average. 0 = invalid, 1 = n/a, 16-116 = 0-100%
|
||||
Order current_order; ///< The current order (+ status, like: loading)
|
||||
|
||||
union {
|
||||
@@ -704,6 +706,14 @@ public:
|
||||
return (this->orders.list == NULL) ? INVALID_STATION : this->orders.list->GetNextStoppingStation(this);
|
||||
}
|
||||
|
||||
void RecalculateOrderOccupancyAverage();
|
||||
|
||||
inline uint8 GetOrderOccupancyAverage() const
|
||||
{
|
||||
if (order_occupancy_average == 0) const_cast<Vehicle *>(this)->RecalculateOrderOccupancyAverage();
|
||||
return this->order_occupancy_average;
|
||||
}
|
||||
|
||||
void ResetRefitCaps();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user