OpenTTD Source: src/aircraft_cmd.h File Reference

OpenTTD Source 15.0-beta1

Functions
aircraft_cmd.h File Reference

Command definitions related to aircraft. More...

`#include "command_type.h"`
`#include "engine_type.h"`
`#include "vehicle_type.h"`

Go to the source code of this file.

## Functions
CommandCost | CmdBuildAircraft (DoCommandFlag flags, TileIndex tile, const Engine *e, Vehicle **v)
| Build an aircraft.

## Detailed Description

Command definitions related to aircraft.

Definition in file aircraft_cmd.h.

## Function Documentation

## ◆ CmdBuildAircraft()

CommandCost CmdBuildAircraft | ( | DoCommandFlag | flags,
|  | TileIndex | tile,
|  | const Engine * | e,
|  | Vehicle ** | ret
| ) |  |

Build an aircraft.

Parameters

  | flags | type of operation.
  | tile | tile of the depot where aircraft is built.
  | e | the engine to build.
  [out] | ret | the vehicle that has been built.

Returns
  the cost of this operation or an error.

Definition at line 271 of file aircraft_cmd.cpp.

References _current_company, Vehicle::acceleration, AIR_AIRCRAFT, AIR_CTOL, AIR_HELICOPTER, AIR_ROTOR, AIR_SHADOW, Station::airport, Vehicle::build_year, CanVehicleUseStation(), Vehicle::cargo_cap, Vehicle::cargo_type, CMD_ERROR, TimerGameCalendar::date, TimerGameEconomy::date, Vehicle::date_of_last_service, Vehicle::date_of_last_service_newgrf, DC_EXEC, Engine::DetermineCapacity(), DIR_N, DIR_SE, Vehicle::direction, ENGINE_EXCLUSIVE_PREVIEW, Vehicle::engine_type, Engine::flags, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::Get(), BaseStation::GetByTile(), Engine::GetDefaultCargoType(), Airport::GetHangarNum(), Airport::GetHangarTile(), Engine::GetLifeLengthInDays(), GetSlopePixelZ(), GetStationIndex(), GetVehiclePosOnBuild(), HANGAR, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, Vehicle::InvalidateNewGRFCacheOfChain(), IsValidCargoID(), Vehicle::last_loading_station, Vehicle::last_station_visited, AircraftVehicleInfo::mail_capacity, Vehicle::max_age, BaseConsist::name, Vehicle::owner, AircraftVehicleInfo::passenger_capacity, Aircraft::pos, Aircraft::previous_pos, Vehicle::random_bits, Vehicle::refit_cap, Engine::reliability, Vehicle::reliability, Engine::reliability_spd_dec, Vehicle::reliability_spd_dec, ROTOR_Z_OFFSET, VehicleSpriteSeq::Set(), SetBit(), Vehicle::SetNext(), settings, Vehicle::sprite_cache, MutableSpriteCache::sprite_seq, Vehicle::spritenum, Aircraft::state, AircraftVehicleInfo::subtype, Vehicle::subtype, Aircraft::targetairport, Vehicle::tile, TILE_SIZE, TileX(), TileY(), UpdateAircraftCache(), Aircraft::UpdateDeltaXY(), Vehicle::UpdatePosition(), BaseConsist::vehicle_flags, Vehicle::vehstatus, VF_BUILT_AS_PROTOTYPE, VS_DEFPAL, VS_HIDDEN, VS_SHADOW, VS_STOPPED, VS_UNCLICKABLE, Vehicle::x_pos, Vehicle::y_pos, TimerGameCalendar::year, and Vehicle::z_pos.

Referenced by CmdBuildVehicle().