OpenTTD Source: src/ship_cmd.h File Reference

OpenTTD Source 15.0-RC2

Functions
ship_cmd.h File Reference

Command definitions related to ships. More...

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

Go to the source code of this file.

## Functions
CommandCost | CmdBuildShip (DoCommandFlags flags, TileIndex tile, const Engine *e, Vehicle **v)
| Build a ship.

## Detailed Description

Command definitions related to ships.

Definition in file ship_cmd.h.

## Function Documentation

## ◆ CmdBuildShip()

CommandCost CmdBuildShip | ( | DoCommandFlags | flags,
|  | TileIndex | tile,
|  | const Engine * | e,
|  | Vehicle ** | ret
| ) |  |

Build a ship.

Parameters

  | flags | type of operation.
  | tile | tile of the depot where ship 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 865 of file ship_cmd.cpp.

References _current_company, ShipVehicleInfo::acceleration, BuiltAsPrototype, TimerGameCalendar::date, TimerGameEconomy::date, DefaultPalette, Engine::DetermineCapacity(), DiagDirToDir(), ExclusivePreview, Execute, Engine::flags, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Get(), Engine::GetDefaultCargoType(), Engine::GetLifeLengthInDays(), GetShipDepotDirection(), GetShipDepotNorthTile(), GetSlopePixelZ(), Hidden, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, IsValidCargoType(), Vehicle::owner, Random, Engine::reliability, Engine::reliability_spd_dec, settings, Stopped, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TILE_SIZE, TileX(), TileY(), TRACK_BIT_DEPOT, and TimerGameCalendar::year.

Referenced by CmdBuildVehicle().