* Get the range of an aircraft type. * @return Range of the aircraft type in tiles or 0 if unlimited range. */
| 450 | * @return Range of the aircraft type in tiles or 0 if unlimited range. |
| 451 | */ |
| 452 | uint16_t Engine::GetRange() const |
| 453 | { |
| 454 | switch (this->type) { |
| 455 | case VEH_AIRCRAFT: |
| 456 | return GetEngineProperty(this->index, PROP_AIRCRAFT_RANGE, this->VehInfo<AircraftVehicleInfo>().max_range); |
| 457 | |
| 458 | default: NOT_REACHED(); |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | /** |
| 463 | * Get the name of the aircraft type for display purposes. |
no test coverage detected