OpenTTD Source 20251019-master-g9f7f314f81
|
Command definitions related to road vehicles. More...
Go to the source code of this file.
Functions | |
bool | RoadVehLeaveDepot (RoadVehicle *v, bool first) |
bool | IndividualRoadVehicleController (RoadVehicle *v, const RoadVehicle *prev) |
bool | RoadVehiclesAreBuilt () |
Verify whether a road vehicle is available. | |
CommandCost | CmdBuildRoadVehicle (DoCommandFlags flags, TileIndex tile, const Engine *e, Vehicle **v) |
Build a road vehicle. | |
CommandCost | CmdTurnRoadVeh (DoCommandFlags flags, VehicleID veh_id) |
Turn a roadvehicle around. | |
Command definitions related to road vehicles.
Definition in file roadveh_cmd.h.
CommandCost CmdBuildRoadVehicle | ( | DoCommandFlags | flags, |
TileIndex | tile, | ||
const Engine * | e, | ||
Vehicle ** | ret | ||
) |
Build a road vehicle.
flags | type of operation. | |
tile | tile of the depot where road vehicle is built. | |
e | the engine to build. | |
[out] | ret | the vehicle that has been built. |
Definition at line 262 of file roadveh_cmd.cpp.
References _current_company, _settings_game, AddArticulatedParts(), BuiltAsPrototype, CheckConsistencyOfArticulatedVehicle(), TimerGameCalendar::date, TimerGameEconomy::date, DefaultPalette, DiagDirToDir(), Vehicle::direction, ExclusivePreview, Execute, Engine::flags, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Get(), Engine::GetDefaultCargoType(), Engine::GetLifeLengthInDays(), GetRoadDepotDirection(), GetRoadTypeInfo(), GetSlopePixelZ(), HasTileAnyRoadType(), Hidden, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, IsValidCargoType(), SpecializedVehicle< T, Type >::Next(), Random, Engine::reliability, Engine::reliability_spd_dec, VehicleSettings::roadveh_acceleration_model, RoadVehUpdateCache(), RVSB_IN_DEPOT, settings, Stopped, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TILE_SIZE, TileX(), TileY(), GameSettings::vehicle, VEHICLE_LENGTH, and TimerGameCalendar::year.
Referenced by CmdBuildVehicle().
CommandCost CmdTurnRoadVeh | ( | DoCommandFlags | flags, |
VehicleID | veh_id | ||
) |
Turn a roadvehicle around.
flags | operation to perform |
veh_id | vehicle ID to turn |
Definition at line 362 of file roadveh_cmd.cpp.
References BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any(), Vehicle::breakdown_ctr, CheckOwnership(), CMD_ERROR, Vehicle::current_order, Vehicle::direction, DirToDiagDir(), DRD_NONE, Execute, CommandCost::Failed(), GetDisallowedRoadDirections(), SpecializedVehicle< T, Type >::GetIfValid(), GetTunnelBridgeDirection(), RoadVehicle::IsInDepot(), IsNormalRoadTile(), RoadVehicle::IsPrimaryVehicle(), IsTileType(), Order::IsType(), MP_TUNNELBRIDGE, RoadVehicle::overtaking, Vehicle::owner, BaseConsist::ResetDepotUnbunching(), RVSB_WORMHOLE, RoadVehicle::state, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), Vehicle::tile, and Vehicle::vehstatus.
bool IndividualRoadVehicleController | ( | RoadVehicle * | v, |
const RoadVehicle * | prev | ||
) |
Definition at line 1143 of file roadveh_cmd.cpp.
bool RoadVehiclesAreBuilt | ( | ) |
Verify whether a road vehicle is available.
true
if at least one road vehicle is available, false
if not Definition at line 169 of file road_cmd.cpp.
References SpecializedVehicle< T, Type >::Iterate().
Referenced by CheckRoadSide().
bool RoadVehLeaveDepot | ( | RoadVehicle * | v, |
bool | first | ||
) |
Definition at line 1010 of file roadveh_cmd.cpp.