(svn r25149) -Codechange: replace 'magic' 'has rating' bitcheck by descriptive function

This commit is contained in:
rubidium
2013-04-06 12:10:16 +00:00
parent 70454b8d64
commit b2292122b6
5 changed files with 20 additions and 11 deletions

View File

@@ -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. */