diff options
author | rubidium <rubidium@openttd.org> | 2013-04-06 12:10:16 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-04-06 12:10:16 +0000 |
commit | b2292122b660372f253a8e0813e24366cbd049dc (patch) | |
tree | d193e255d20344603b30278857f3be3211d93eda /src/station_base.h | |
parent | 70454b8d64ee2469859c9153b74f4d26b47c898c (diff) | |
download | openttd-b2292122b660372f253a8e0813e24366cbd049dc.tar.xz |
(svn r25149) -Codechange: replace 'magic' 'has rating' bitcheck by descriptive function
Diffstat (limited to 'src/station_base.h')
-rw-r--r-- | src/station_base.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/station_base.h b/src/station_base.h index 07d1d2294..322a7dc8e 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -114,6 +114,15 @@ struct GoodsEntry { * @return true if vehicle tried to load. */ bool HasVehicleEverTriedLoading() const { return this->last_speed != 0; } + + /** + * Does this cargo have a rating at this station? + * @return true if the cargo has a rating, i.e. pickup has been attempted. + */ + inline bool HasRating() const + { + return HasBit(this->acceptance_pickup, GES_PICKUP); + } }; /** All airport-related information. Only valid if tile != INVALID_TILE. */ |