Stores station stats for a single cargo. More...
#include <station_base.h>
Public Types | |
enum | GoodsEntryStatus { GES_ACCEPTANCE, GES_PICKUP, 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. | |
uint | GetSumFlowVia (StationID via) const |
Get the sum of flows via a specific station from this GoodsEntry. | |
StationID | GetVia (StationID source, StationID excluded=INVALID_STATION) const |
Get the best next hop for a cargo packet from station source, optionally excluding a specific next station. | |
Data Fields | |
byte | acceptance_pickup |
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. | |
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. | |
byte | last_age |
Age in years (up to 255) of the last vehicle that tried to load this cargo. | |
byte | amount_fract |
Fractional part of the amount in the cargo list. | |
StationCargoList | cargo |
The cargo packets of cargo waiting in this station. | |
uint | supply |
Cargo supplied last month. | |
uint | supply_new |
Cargo supplied so far this month. | |
FlowStatMap | flows |
Planned flows through this station. | |
LinkStatMap | link_stats |
Capacities and usage statistics for outgoing links. | |
LinkGraphComponentID | last_component |
Component this station was last part of in this cargo's link graph. | |
uint | max_waiting_cargo |
Max cargo from this station waiting at any station. |
Stores station stats for a single cargo.
Definition at line 226 of file station_base.h.
Status of this cargo for the station.
Definition at line 228 of file station_base.h.
uint GoodsEntry::GetSumFlowVia | ( | StationID | via | ) | const |
Get the sum of flows via a specific station from this GoodsEntry.
via | Remote station to look for. |
Definition at line 4030 of file station_cmd.cpp.
References flows.
Referenced by LinkGraphOverlay::AddLinks().
StationID GoodsEntry::GetVia | ( | StationID | source, | |
StationID | excluded = INVALID_STATION | |||
) | const [inline] |
Get the best next hop for a cargo packet from station source, optionally excluding a specific next station.
source | Source of the packet. | |
exclude | If != INVALID_STATION and this station would be chosen, choose the second best one instead. |
Definition at line 336 of file station_base.h.
References flows.
Referenced by StationCargoList::RerouteStalePackets().
bool GoodsEntry::HasVehicleEverTriedLoading | ( | ) | const [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_PICKUP for that.
Definition at line 325 of file station_base.h.
References last_speed.
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 307 of file station_base.h.
Referenced by LoadUnloadVehicle().
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 301 of file station_base.h.
Referenced by AfterLoadGame(), HasVehicleEverTriedLoading(), and LoadUnloadVehicle().
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 288 of file station_base.h.
Referenced by LoadUnloadVehicle().