* Returns the default (non-refitted) cargo and capacity of a specific EngineID. * @param engine the EngineID of interest * @return cargo and capacity */
| 102 | * @return cargo and capacity |
| 103 | */ |
| 104 | static inline std::pair<CargoType, uint16_t> GetVehicleDefaultCapacity(EngineID engine) |
| 105 | { |
| 106 | const Engine *e = Engine::Get(engine); |
| 107 | CargoType cargo = e->CanCarryCargo() ? e->GetDefaultCargoType() : INVALID_CARGO; |
| 108 | return {cargo, IsValidCargoType(cargo) ? e->GetDisplayDefaultCapacity() : 0}; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Returns all cargoes a vehicle can carry. |
no test coverage detected