0x004B6669
| 6269 | |
| 6270 | // 0x004B6669 |
| 6271 | char* VehicleHead::generateCargoTotalString(char* buffer) |
| 6272 | { |
| 6273 | CargoTotalArray cargoTotals{}; |
| 6274 | Vehicles::Vehicle train(head); |
| 6275 | for (const auto& car : train.cars) |
| 6276 | { |
| 6277 | auto front = car.front; |
| 6278 | auto body = car.body; |
| 6279 | |
| 6280 | if (front->secondaryCargo.type != 0xFF) |
| 6281 | { |
| 6282 | cargoTotals[front->secondaryCargo.type] += front->secondaryCargo.qty; |
| 6283 | } |
| 6284 | if (body->primaryCargo.type != 0xFF) |
| 6285 | { |
| 6286 | cargoTotals[body->primaryCargo.type] += body->primaryCargo.qty; |
| 6287 | } |
| 6288 | } |
| 6289 | |
| 6290 | return cargoLUTToString(cargoTotals, buffer); |
| 6291 | } |
| 6292 | |
| 6293 | char* VehicleHead::generateCargoCapacityString(char* buffer) |
| 6294 | { |
no outgoing calls
no test coverage detected