* Draw the details capacity tab for the given vehicle at the given position * * @param item Data to draw * @param left The left most coordinate to draw * @param right The right most coordinate to draw * @param y The y coordinate */
| 250 | * @param y The y coordinate |
| 251 | */ |
| 252 | static void TrainDetailsCapacityTab(const CargoSummaryItem *item, int left, int right, int y) |
| 253 | { |
| 254 | std::string str; |
| 255 | if (!IsValidCargoType(item->cargo)) { |
| 256 | /* Draw subtype only */ |
| 257 | str = GetString(STR_VEHICLE_INFO_NO_CAPACITY, item->subtype); |
| 258 | } else if (FreightWagonMult(item->cargo) > 1) { |
| 259 | str = GetString(STR_VEHICLE_INFO_CAPACITY_MULT, item->cargo, item->capacity, item->subtype, _settings_game.vehicle.freight_trains); |
| 260 | } else { |
| 261 | str = GetString(STR_VEHICLE_INFO_CAPACITY, item->cargo, item->capacity, item->subtype); |
| 262 | } |
| 263 | DrawString(left, right, y, str); |
| 264 | } |
| 265 | |
| 266 | /** |
| 267 | * Collects the cargo transported |
no test coverage detected