OpenTTD Source 20241224-master-gf74b0cf984
EngineInfo Struct Reference

Information about a vehicle. More...

#include <engine_type.h>

Data Fields

TimerGameCalendar::Date base_intro
 Basic date of engine introduction (without random parts).
 
TimerGameCalendar::Year lifelength
 Lifetime of a single vehicle.
 
TimerGameCalendar::Year base_life
 Basic duration of engine availability (without random parts). 0xFF means infinite life.
 
uint8_t decay_speed
 
uint8_t load_amount
 
uint8_t climates
 Climates supported by the engine.
 
CargoID cargo_type
 
std::variant< CargoLabel, MixedCargoTypecargo_label
 
CargoTypes refit_mask
 
uint8_t refit_cost
 
uint8_t misc_flags
 Miscellaneous flags.
 
uint16_t callback_mask
 Bitmask of vehicle callbacks that have to be called.
 
int8_t retire_early
 Number of years early to retire vehicle.
 
ExtraEngineFlags extra_flags
 
StringID string_id
 Default name of engine.
 
uint16_t cargo_age_period
 Number of ticks before carried cargo is aged.
 
EngineID variant_id
 Engine variant ID. If set, will be treated specially in purchase lists.
 

Detailed Description

Information about a vehicle.

See also
table/engines.h

Definition at line 148 of file engine_type.h.

Field Documentation

◆ base_intro

TimerGameCalendar::Date EngineInfo::base_intro

Basic date of engine introduction (without random parts).

Definition at line 149 of file engine_type.h.

Referenced by AircraftVehicleChangeInfo(), CommonVehicleChangeInfo(), RailVehicleChangeInfo(), RoadVehicleChangeInfo(), SetYearEngineAgingStops(), ShipVehicleChangeInfo(), and StartupOneEngine().

◆ base_life

TimerGameCalendar::Year EngineInfo::base_life

Basic duration of engine availability (without random parts). 0xFF means infinite life.

Definition at line 151 of file engine_type.h.

Referenced by CalcEngineReliability(), CommonVehicleChangeInfo(), and StartupOneEngine().

◆ callback_mask

◆ cargo_age_period

uint16_t EngineInfo::cargo_age_period

◆ cargo_label

std::variant<CargoLabel, MixedCargoType> EngineInfo::cargo_label

Definition at line 156 of file engine_type.h.

◆ cargo_type

CargoID EngineInfo::cargo_type

Definition at line 155 of file engine_type.h.

◆ climates

◆ decay_speed

uint8_t EngineInfo::decay_speed

Definition at line 152 of file engine_type.h.

◆ extra_flags

ExtraEngineFlags EngineInfo::extra_flags

Definition at line 162 of file engine_type.h.

◆ lifelength

TimerGameCalendar::Year EngineInfo::lifelength

Lifetime of a single vehicle.

Definition at line 150 of file engine_type.h.

Referenced by CommonVehicleChangeInfo(), Engine::GetLifeLengthInDays(), SetYearEngineAgingStops(), and StartupOneEngine().

◆ load_amount

uint8_t EngineInfo::load_amount

Definition at line 153 of file engine_type.h.

◆ misc_flags

◆ refit_cost

uint8_t EngineInfo::refit_cost

Definition at line 158 of file engine_type.h.

◆ refit_mask

CargoTypes EngineInfo::refit_mask

Definition at line 157 of file engine_type.h.

◆ retire_early

int8_t EngineInfo::retire_early

Number of years early to retire vehicle.

Definition at line 161 of file engine_type.h.

Referenced by AircraftVehicleChangeInfo(), CalcEngineReliability(), RailVehicleChangeInfo(), RoadVehicleChangeInfo(), ShipVehicleChangeInfo(), and StartupOneEngine().

◆ string_id

StringID EngineInfo::string_id

Default name of engine.

Definition at line 163 of file engine_type.h.

Referenced by FinaliseEngineArray(), and Engine::IsEnabled().

◆ variant_id

EngineID EngineInfo::variant_id

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