OpenTTD Source: VehicleSettings Struct Reference

OpenTTD Source 15.0-RC2

Data Fields
VehicleSettings Struct Reference

Settings related to vehicles. More...

`#include <settings_type.h>`

## Data Fields
uint8_t | max_train_length
| maximum length for trains
uint8_t | smoke_amount
| amount of smoke/sparks locomotives produce
uint8_t | train_acceleration_model
| realistic acceleration for trains
uint8_t | roadveh_acceleration_model
| realistic acceleration for road vehicles
uint8_t | train_slope_steepness
| Steepness of hills for trains when using realistic acceleration.
uint8_t | roadveh_slope_steepness
| Steepness of hills for road vehicles when using realistic acceleration.
bool | wagon_speed_limits
| enable wagon speed limits
bool | disable_elrails
| when true, the elrails are disabled
UnitID | max_trains
| max trains in game per company
UnitID | max_roadveh
| max trucks in game per company
UnitID | max_aircraft
| max planes in game per company
UnitID | max_ships
| max ships in game per company
uint8_t | plane_speed
| divisor for speed of aircraft
uint8_t | freight_trains
| value to multiply the weight of cargo by
bool | dynamic_engines
| enable dynamic allocation of engine data
bool | never_expire_vehicles
| never expire vehicles
uint8_t | extend_vehicle_life
| extend vehicle life by this many years
uint8_t | road_side
| the side of the road vehicles drive on
uint8_t | plane_crashes
| number of plane crashes, 0 = none, 1 = reduced, 2 = normal

## Detailed Description

Settings related to vehicles.

Definition at line 517 of file settings_type.h.

## Field Documentation

## ◆ disable_elrails

bool VehicleSettings::disable_elrails

when true, the elrails are disabled

Definition at line 525 of file settings_type.h.

Referenced by AfterLoadGame(), CmdConvertRail(), GetGlobalVariable(), HasRailCatenaryDrawn(), InitializePatchFlags(), and ParamSet().

## ◆ dynamic_engines

bool VehicleSettings::dynamic_engines

enable dynamic allocation of engine data

Definition at line 532 of file settings_type.h.

Referenced by AfterLoadGame(), GetNewEngine(), GetNewEngineID(), InitializePatchFlags(), and ParamSet().

## ◆ extend_vehicle_life

uint8_t VehicleSettings::extend_vehicle_life

extend vehicle life by this many years

Definition at line 534 of file settings_type.h.

Referenced by Engine::GetLifeLengthInDays().

## ◆ freight_trains

uint8_t VehicleSettings::freight_trains

value to multiply the weight of cargo by

Definition at line 531 of file settings_type.h.

Referenced by DrawTrainDetails(), FreightWagonMult(), InitializePatchFlags(), TrainDetailsCapacityTab(), and TrainDetailsCargoTab().

## ◆ max_aircraft

UnitID VehicleSettings::max_aircraft

max planes in game per company

Definition at line 528 of file settings_type.h.

Referenced by CanBuildVehicleInfrastructure(), CheckTakeoverVehicleLimit(), GetFreeUnitNumber(), and IsVehicleTypeDisabled().

## ◆ max_roadveh

UnitID VehicleSettings::max_roadveh

max trucks in game per company

Definition at line 527 of file settings_type.h.

Referenced by CanBuildVehicleInfrastructure(), CheckTakeoverVehicleLimit(), GetFreeUnitNumber(), and IsVehicleTypeDisabled().

## ◆ max_ships

UnitID VehicleSettings::max_ships

max ships in game per company

Definition at line 529 of file settings_type.h.

Referenced by CanBuildVehicleInfrastructure(), CheckTakeoverVehicleLimit(), GetFreeUnitNumber(), and IsVehicleTypeDisabled().

## ◆ max_train_length

uint8_t VehicleSettings::max_train_length

maximum length for trains

Definition at line 518 of file settings_type.h.

Referenced by AfterLoadGame(), CheckTrainAttachment(), and ReplaceChain().

## ◆ max_trains

UnitID VehicleSettings::max_trains

max trains in game per company

Definition at line 526 of file settings_type.h.

Referenced by CanBuildVehicleInfrastructure(), CheckNewTrain(), CheckTakeoverVehicleLimit(), GetFreeUnitNumber(), and IsVehicleTypeDisabled().

## ◆ never_expire_vehicles

bool VehicleSettings::never_expire_vehicles

never expire vehicles

Definition at line 533 of file settings_type.h.

Referenced by CalcEngineReliability(), and InitializePatchFlags().

## ◆ plane_crashes

uint8_t VehicleSettings::plane_crashes

number of plane crashes, 0 = none, 1 = reduced, 2 = normal

Definition at line 536 of file settings_type.h.

Referenced by AfterLoadGame(), and MaybeCrashAirplane().

## ◆ plane_speed

uint8_t VehicleSettings::plane_speed

divisor for speed of aircraft

Definition at line 530 of file settings_type.h.

Referenced by AfterLoadGame(), AircraftController(), and UpdateAircraftSpeed().

## ◆ road_side

uint8_t VehicleSettings::road_side

the side of the road vehicles drive on

Definition at line 535 of file settings_type.h.

Referenced by AfterLoadGame(), LinkGraphOverlay::DrawContent(), and GetGlobalVariable().

## ◆ roadveh_acceleration_model

uint8_t VehicleSettings::roadveh_acceleration_model

realistic acceleration for road vehicles

Definition at line 521 of file settings_type.h.

Referenced by AfterLoadGame(), AfterLoadVehiclesPhase2(), CmdBuildRoadVehicle(), CmdRefitVehicle(), DisplayVehicleSortDropDown(), VehicleDetailsWindow::DrawWidget(), RoadVehicle::GetCurrentMaxSpeed(), BuildVehicleWindow::OnInvalidateData(), RoadVehAccelerationModelChanged(), and RoadVehicle::UpdateSpeed().

## ◆ roadveh_slope_steepness

uint8_t VehicleSettings::roadveh_slope_steepness

Steepness of hills for road vehicles when using realistic acceleration.

Definition at line 523 of file settings_type.h.

Referenced by AfterLoadGame(), and RoadVehicle::GetSlopeSteepness().

## ◆ smoke_amount

uint8_t VehicleSettings::smoke_amount

amount of smoke/sparks locomotives produce

Definition at line 519 of file settings_type.h.

Referenced by Vehicle::ShowVisualEffect().

## ◆ train_acceleration_model

uint8_t VehicleSettings::train_acceleration_model

realistic acceleration for trains

Definition at line 520 of file settings_type.h.

Referenced by AffectSpeedByZChange(), AfterLoadGame(), CmdReverseTrainDirection(), DisplayVehicleSortDropDown(), VehicleDetailsWindow::DrawWidget(), Train::GetCurrentMaxSpeed(), Train::GetCurveSpeedLimit(), TrainController(), and Train::UpdateSpeed().

## ◆ train_slope_steepness

uint8_t VehicleSettings::train_slope_steepness

Steepness of hills for trains when using realistic acceleration.

Definition at line 522 of file settings_type.h.

Referenced by AfterLoadGame(), and Train::GetSlopeSteepness().

## ◆ wagon_speed_limits

bool VehicleSettings::wagon_speed_limits

enable wagon speed limits

Definition at line 524 of file settings_type.h.

Referenced by Train::ConsistChanged(), and InitializePatchFlags().

The documentation for this struct was generated from the following file:

- src/settings_type.h