MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetAircraftTypeText

Method GetAircraftTypeText

src/engine.cpp:466–479  ·  view source on GitHub ↗

* Get the name of the aircraft type for display purposes. * @return Aircraft type string. */

Source from the content-addressed store, hash-verified

464 * @return Aircraft type string.
465 */
466StringID Engine::GetAircraftTypeText() const
467{
468 switch (this->type) {
469 case VEH_AIRCRAFT:
470 switch (this->VehInfo<AircraftVehicleInfo>().subtype) {
471 case AIR_HELI: return STR_LIVERY_HELICOPTER;
472 case AIR_CTOL: return STR_LIVERY_SMALL_PLANE;
473 case AIR_CTOL | AIR_FAST: return STR_LIVERY_LARGE_PLANE;
474 default: NOT_REACHED();
475 }
476
477 default: NOT_REACHED();
478 }
479}
480
481/**
482 * Check whether the engine variant chain is hidden in the GUI for the given company.

Callers 3

DrawAircraftPurchaseInfoFunction · 0.80
DrawWidgetMethod · 0.80

Calls 1

NOT_REACHEDFunction · 0.85

Tested by

no test coverage detected