(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

@@ -1261,7 +1261,7 @@ uint8 CalcPercentVehicleFilled(const Vehicle *front, StringID *colour)
if (v->cargo_cap != 0 && colour != NULL) {
unloading += HasBit(v->vehicle_flags, VF_CARGO_UNLOADING) ? 1 : 0;
loading |= !order_no_load &&
(order_full_load || HasBit(st->goods[v->cargo_type].acceptance_pickup, GoodsEntry::GES_PICKUP)) &&
(order_full_load || st->goods[v->cargo_type].HasRating()) &&
!HasBit(v->vehicle_flags, VF_LOADING_FINISHED) && !HasBit(v->vehicle_flags, VF_STOP_LOADING);
cars++;
}