(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

@@ -423,7 +423,7 @@ uint32 Station::GetNewGRFVariable(const ResolverObject *object, byte variable, b
switch (variable) {
case 0x60: return min(ge->cargo.Count(), 4095);
case 0x61: return ge->HasVehicleEverTriedLoading() ? ge->time_since_pickup : 0;
case 0x62: return HasBit(ge->acceptance_pickup, GoodsEntry::GES_PICKUP) ? ge->rating : 0xFFFFFFFF;
case 0x62: return ge->HasRating() ? ge->rating : 0xFFFFFFFF;
case 0x63: return ge->cargo.DaysInTransit();
case 0x64: return ge->HasVehicleEverTriedLoading() ? ge->last_speed | (ge->last_age << 8) : 0xFF00;
case 0x65: return GB(ge->acceptance_pickup, GoodsEntry::GES_ACCEPTANCE, 1) << 3;