OpenTTD Source
12.0-beta2
|
Stores station stats for a single cargo. More...
#include <station_base.h>
Public Types | |
enum | GoodsEntryStatus { GES_ACCEPTANCE, GES_RATING, GES_EVER_ACCEPTED, GES_LAST_MONTH, GES_CURRENT_MONTH, GES_ACCEPTED_BIGTICK } |
Status of this cargo for the station. More... | |
Public Member Functions | |
bool | HasVehicleEverTriedLoading () const |
Reports whether a vehicle has ever tried to load the cargo at this station. More... | |
bool | HasRating () const |
Does this cargo have a rating at this station? More... | |
StationID | GetVia (StationID source) const |
Get the best next hop for a cargo packet from station source. More... | |
StationID | GetVia (StationID source, StationID excluded, StationID excluded2=INVALID_STATION) const |
Get the best next hop for a cargo packet from station source, optionally excluding one or two stations. More... | |
Data Fields | |
byte | status |
Status of this cargo, see GoodsEntryStatus. | |
byte | time_since_pickup |
Number of rating-intervals (up to 255) since the last vehicle tried to load this cargo. More... | |
byte | rating |
Station rating for this cargo. | |
byte | last_speed |
Maximum speed (up to 255) of the last vehicle that tried to load this cargo. More... | |
byte | last_age |
Age in years (up to 255) of the last vehicle that tried to load this cargo. More... | |
byte | amount_fract |
Fractional part of the amount in the cargo list. | |
StationCargoList | cargo |
The cargo packets of cargo waiting in this station. | |
LinkGraphID | link_graph |
Link graph this station belongs to. | |
NodeID | node |
ID of node in link graph referring to this goods entry. | |
FlowStatMap | flows |
Planned flows through this station. | |
uint | max_waiting_cargo |
Max cargo from this station waiting at any station. | |
Stores station stats for a single cargo.
Definition at line 167 of file station_base.h.
Status of this cargo for the station.
Definition at line 169 of file station_base.h.
|
inline |
Get the best next hop for a cargo packet from station source.
source | Source of the packet. |
Definition at line 280 of file station_base.h.
Referenced by StationCargoReroute::operator()(), and VehicleCargoReroute::operator()().
|
inline |
Get the best next hop for a cargo packet from station source, optionally excluding one or two stations.
source | Source of the packet. |
excluded | If this station would be chosen choose the second best one instead. |
excluded2 | Second station to be excluded, if != INVALID_STATION. |
Definition at line 294 of file station_base.h.
|
inline |
Does this cargo have a rating at this station?
Definition at line 270 of file station_base.h.
References GES_RATING, and HasBit().
Referenced by CompanyStationsWindow::StationRatingMinSorter().
|
inline |
Reports whether a vehicle has ever tried to load the cargo at this station.
This does not imply that there was cargo available for loading. Refer to GES_RATING for that.
Definition at line 264 of file station_base.h.
byte GoodsEntry::last_age |
Age in years (up to 255) of the last vehicle that tried to load this cargo.
This does not imply there was any cargo to load.
Definition at line 249 of file station_base.h.
byte GoodsEntry::last_speed |
Maximum speed (up to 255) of the last vehicle that tried to load this cargo.
This does not imply there was any cargo to load. The unit used is a special vehicle-specific speed unit for station ratings.
Definition at line 243 of file station_base.h.
byte GoodsEntry::time_since_pickup |
Number of rating-intervals (up to 255) since the last vehicle tried to load this cargo.
The unit used is STATION_RATING_TICKS. This does not imply there was any cargo to load.
Definition at line 230 of file station_base.h.