OpenTTD Source 20241224-master-gf74b0cf984
|
Data Structures | |
struct | EngineTypeFilter |
Public Member Functions | |
Engine (VehicleType type, EngineID base) | |
bool | IsEnabled () const |
Checks whether the engine is a valid (non-articulated part of an) engine. | |
CargoID | GetDefaultCargoType () const |
Determines the default cargo type of an engine. | |
uint | DetermineCapacity (const Vehicle *v, uint16_t *mail_capacity=nullptr) const |
Determines capacity of a given vehicle from scratch. | |
bool | CanCarryCargo () const |
Determines whether an engine can carry something. | |
uint | GetDisplayDefaultCapacity (uint16_t *mail_capacity=nullptr) const |
Determines the default cargo capacity of an engine for display purposes. | |
Money | GetRunningCost () const |
Return how much the running costs of this engine are. | |
Money | GetCost () const |
Return how much a new engine costs. | |
uint | GetDisplayMaxSpeed () const |
Returns max speed of the engine for display purposes. | |
uint | GetPower () const |
Returns the power of the engine for display and sorting purposes. | |
uint | GetDisplayWeight () const |
Returns the weight of the engine for display purposes. | |
uint | GetDisplayMaxTractiveEffort () const |
Returns the tractive effort of the engine for display purposes. | |
TimerGameCalendar::Date | GetLifeLengthInDays () const |
Returns the vehicle's (not model's!) life length in days. | |
uint16_t | GetRange () const |
Get the range of an aircraft type. | |
StringID | GetAircraftTypeText () const |
Get the name of the aircraft type for display purposes. | |
bool | IsHidden (CompanyID c) const |
Check whether the engine is hidden in the GUI for the given company. | |
const Engine * | GetDisplayVariant () const |
Get the last display variant for an engine. | |
bool | IsVariantHidden (CompanyID c) const |
Check whether the engine variant chain is hidden in the GUI for the given company. | |
bool | IsGroundVehicle () const |
Check if the engine is a ground vehicle. | |
const GRFFile * | GetGRF () const |
Retrieve the NewGRF the engine is tied to. | |
uint32_t | GetGRFID () const |
Retrieve the GRF ID of the NewGRF the engine is tied to. | |
Public Member Functions inherited from Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool > | |
void * | operator new (size_t size) |
Allocates space for new Titem. | |
void * | operator new (size_t size, size_t index) |
Allocates space for new Titem with given index. | |
void * | operator new (size_t, void *ptr) |
Allocates space for new Titem at given memory address. | |
void | operator delete (void *p) |
Marks Titem as free. | |
Static Public Member Functions | |
static Pool::IterateWrapperFiltered< Engine, EngineTypeFilter > | IterateType (VehicleType vt, size_t from=0) |
Returns an iterable ensemble of all valid engines of the given type. | |
Static Public Member Functions inherited from Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool > | |
static bool | CanAllocateItem (size_t n=1) |
Helper functions so we can use PoolItem::Function() instead of _poolitem_pool.Function() | |
static bool | CleaningPool () |
Returns current state of pool cleaning - yes or no. | |
static bool | IsValidID (size_t index) |
Tests whether given index can be used to get valid (non-nullptr) Titem. | |
static Titem * | Get (size_t index) |
Returns Titem with given index. | |
static Titem * | GetIfValid (size_t index) |
Returns Titem with given index. | |
static size_t | GetPoolSize () |
Returns first unused index. | |
static size_t | GetNumItems () |
Returns number of valid items in the pool. | |
static void | PostDestructor (size_t index) |
Dummy function called after destructor of each member. | |
static Pool::IterateWrapper< Titem > | Iterate (size_t from=0) |
Returns an iterable ensemble of all valid Titem. | |
Data Fields | ||
CompanyMask | company_avail | |
Bit for each company whether the engine is available for that company. | ||
CompanyMask | company_hidden | |
Bit for each company whether the engine is normally hidden in the build gui for that company. | ||
CompanyMask | preview_asked | |
Bit for each company which has already been offered a preview. | ||
std::string | name | |
Custom name of engine. | ||
TimerGameCalendar::Date | intro_date | |
Date of introduction of the engine. | ||
int32_t | age | |
Age of the engine in months. | ||
uint16_t | reliability | |
Current reliability of the engine. | ||
uint16_t | reliability_spd_dec | |
Speed of reliability decay between services (per day). | ||
uint16_t | reliability_start | |
Initial reliability of the engine. | ||
uint16_t | reliability_max | |
Maximal reliability of the engine. | ||
uint16_t | reliability_final | |
Final reliability of the engine. | ||
uint16_t | duration_phase_1 | |
First reliability phase in months, increasing reliability from reliability_start to reliability_max. | ||
uint16_t | duration_phase_2 | |
Second reliability phase in months, keeping reliability_max. | ||
uint16_t | duration_phase_3 | |
Third reliability phase in months, decaying to reliability_final. | ||
uint8_t | flags | |
Flags of the engine. | ||
CompanyID | preview_company | |
Company which is currently being offered a preview INVALID_COMPANY means no company. | ||
uint8_t | preview_wait | |
Daily countdown timer for timeout of offering the engine to the preview_company company. | ||
uint8_t | original_image_index | |
Original vehicle image index, thus the image index of the overridden vehicle. | ||
VehicleType | type | |
Vehicle type, ie VEH_ROAD, VEH_TRAIN, etc. | ||
EngineDisplayFlags | display_flags | |
NOSAVE client-side-only display flags for build engine list. | ||
EngineID | display_last_variant | |
NOSAVE client-side-only last variant selected. | ||
EngineInfo | info | |
union { | ||
RailVehicleInfo rail | ||
RoadVehicleInfo road | ||
ShipVehicleInfo ship | ||
AircraftVehicleInfo air | ||
} | u | |
uint16_t | list_position | |
GRFFilePropsBase< NUM_CARGO+2 > | grf_prop | |
Properties related the the grf file. | ||
std::vector< WagonOverride > | overrides | |
Data Fields inherited from Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool > | ||
Tindex | index | |
Index of this pool item. | ||
Additional Inherited Members | |
Public Types inherited from Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool > | |
typedef struct Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero > | Pool |
Type of the pool this item is going to be part of. | |
Definition at line 37 of file engine_base.h.
|
inline |
Definition at line 85 of file engine_base.h.
Engine::Engine | ( | VehicleType | type, |
EngineID | base | ||
) |
Definition at line 71 of file engine.cpp.
bool Engine::CanCarryCargo | ( | ) | const |
Determines whether an engine can carry something.
A vehicle cannot carry anything if its capacity is zero, or none of the possible cargoes is available in the climate.
Definition at line 168 of file engine.cpp.
References GetDefaultCargoType(), IsValidCargoID(), VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, and VEH_TRAIN.
Referenced by AddArticulatedParts(), CmdCloneVehicle(), DetermineCapacity(), GetAvailableVehicleCargoTypes(), GetBestFittingSubType(), GetCargoSummaryOfArticulatedVehicle(), GetCargoTypesOfArticulatedVehicle(), GetNewCargoTypeForReplace(), GetVehicleDefaultCapacity(), IsEngineRefittable(), and RefitVehicle().
uint Engine::DetermineCapacity | ( | const Vehicle * | v, |
uint16_t * | mail_capacity = nullptr |
||
) | const |
Determines capacity of a given vehicle from scratch.
For aircraft the main capacity is determined. Mail might be present as well.
v | Vehicle of interest; nullptr in purchase list |
mail_capacity | returns secondary cargo (mail) capacity of aircraft |
Definition at line 201 of file engine.cpp.
References CALLBACK_FAILED, EngineInfo::callback_mask, CanCarryCargo(), Vehicle::cargo_subtype, Vehicle::cargo_type, CBID_VEHICLE_REFIT_CAPACITY, CBM_VEHICLE_REFIT_CAPACITY, CC_PASSENGERS, CT_PASSENGERS, EF_NO_DEFAULT_CARGO_MULTIPLIER, Vehicle::engine_type, CargoSpec::Get(), GetDefaultCargoType(), GetVehicleCallback(), HasBit(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool >::index, IsCargoInClass(), IsValidCargoID(), EngineInfo::misc_flags, CargoSpec::multiplier, PROP_AIRCRAFT_MAIL_CAPACITY, PROP_AIRCRAFT_PASSENGER_CAPACITY, PROP_ROADVEH_CARGO_CAPACITY, PROP_SHIP_CARGO_CAPACITY, PROP_TRAIN_CARGO_CAPACITY, RAILVEH_MULTIHEAD, VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, and VEH_TRAIN.
Referenced by CmdBuildAircraft(), CmdBuildShip(), Train::ConsistChanged(), GetDisplayDefaultCapacity(), LinkRefresher::HandleRefit(), and RefitVehicle().
StringID Engine::GetAircraftTypeText | ( | ) | const |
Get the name of the aircraft type for display purposes.
Definition at line 467 of file engine.cpp.
References AIR_CTOL, and VEH_AIRCRAFT.
Referenced by DrawAircraftPurchaseInfo(), and VehicleDetailsWindow::DrawWidget().
Money Engine::GetCost | ( | ) | const |
Return how much a new engine costs.
Definition at line 318 of file engine.cpp.
References GetGRF(), GetPrice(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool >::index, PROP_AIRCRAFT_COST_FACTOR, PROP_ROADVEH_COST_FACTOR, PROP_SHIP_COST_FACTOR, PROP_TRAIN_COST_FACTOR, RAILVEH_WAGON, VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, and VEH_TRAIN.
Referenced by CmdBuildVehicle(), and DrawAircraftPurchaseInfo().
|
inline |
Determines the default cargo type of an engine.
Usually a valid cargo is returned, even though the vehicle has zero capacity, and can therefore not carry anything. But the cargotype is still used for livery selection etc..
Vehicles with INVALID_CARGO as default cargo are usually not available, but it can appear as default cargo of articulated parts.
Definition at line 100 of file engine_base.h.
Referenced by AddArticulatedParts(), CanCarryCargo(), CmdBuildAircraft(), CmdBuildRailVehicle(), CmdBuildRailWagon(), CmdBuildRoadVehicle(), CmdBuildShip(), CmdBuildVehicle(), CmdCloneVehicle(), DetermineCapacity(), GetAvailableVehicleCargoTypes(), GetEngineLiveryScheme(), VehicleScopeResolver::GetVariable(), GetVehicleDefaultCapacity(), and IsEngineRefittable().
|
inline |
Determines the default cargo capacity of an engine for display purposes.
For planes carrying both passenger and mail this is the passenger capacity. For multiheaded engines this is the capacity of both heads. For articulated engines use GetCapacityOfArticulatedParts
mail_capacity | returns secondary cargo (mail) capacity of aircraft |
Definition at line 120 of file engine_base.h.
References DetermineCapacity().
Referenced by AircraftEngineCargoSorter(), CmdBuildVehicle(), GetVehicleDefaultCapacity(), and ShipEngineCapacitySorter().
uint Engine::GetDisplayMaxSpeed | ( | ) | const |
Returns max speed of the engine for display purposes.
Definition at line 358 of file engine.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool >::index, PROP_AIRCRAFT_SPEED, PROP_ROADVEH_SPEED, PROP_SHIP_SPEED, PROP_TRAIN_SPEED, VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, and VEH_TRAIN.
Referenced by DrawAircraftPurchaseInfo().
uint Engine::GetDisplayMaxTractiveEffort | ( | ) | const |
Returns the tractive effort of the engine for display purposes.
For dual-headed train-engines this is the tractive effort of both heads
Definition at line 426 of file engine.cpp.
References GetDisplayWeight(), GROUND_ACCELERATION, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool >::index, PROP_ROADVEH_TRACTIVE_EFFORT, PROP_TRAIN_TRACTIVE_EFFORT, VEH_ROAD, and VEH_TRAIN.
|
inline |
Get the last display variant for an engine.
Definition at line 149 of file engine_base.h.
References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool >::Get(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool >::index, and INVALID_ENGINE.
Referenced by IsVariantHidden().
uint Engine::GetDisplayWeight | ( | ) | const |
Returns the weight of the engine for display purposes.
For dual-headed train-engines this is the weight of both heads
Definition at line 408 of file engine.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool >::index, PROP_ROADVEH_WEIGHT, PROP_TRAIN_WEIGHT, RAILVEH_MULTIHEAD, VEH_ROAD, and VEH_TRAIN.
Referenced by GetDisplayMaxTractiveEffort().
|
inline |
Retrieve the NewGRF the engine is tied to.
This is the GRF providing the Action 3.
Definition at line 171 of file engine_base.h.
References GRFFilePropsBase< Tcnt >::grffile.
Referenced by AfterLoadGRFs(), CalculateRefitMasks(), Train::ConsistChanged(), DrawTrainDetails(), FinaliseEngineArray(), GetCost(), Train::GetDisplayImageWidth(), GetEngineGrfFile(), Vehicle::GetGRF(), GetGRFID(), GetLoadAmount(), GetNextArticulatedPart(), GetRefitCost(), GetRefitCostFactor(), GetRoadVehLength(), GetRunningCost(), Aircraft::GetRunningCost(), RoadVehicle::GetRunningCost(), Ship::GetRunningCost(), Train::GetRunningCost(), and Vehicle::UpdateVisualEffect().
uint32_t Engine::GetGRFID | ( | ) | const |
Retrieve the GRF ID of the NewGRF the engine is tied to.
This is the GRF providing the Action 3.
Definition at line 157 of file engine.cpp.
References GetGRF().
Referenced by Train::ConsistChanged(), DrawVehiclePurchaseInfo(), Vehicle::GetGRFID(), GetLoadAmount(), GetRoadVehLength(), ShowNewGrfVehicleError(), StartupOneEngine(), and Vehicle::UpdateVisualEffect().
TimerGameCalendar::Date Engine::GetLifeLengthInDays | ( | ) | const |
Returns the vehicle's (not model's!) life length in days.
Definition at line 443 of file engine.cpp.
References _settings_game, TimerGameConst< struct Calendar >::DAYS_IN_LEAP_YEAR, VehicleSettings::extend_vehicle_life, EngineInfo::lifelength, and GameSettings::vehicle.
Referenced by CmdBuildAircraft(), CmdBuildRailVehicle(), CmdBuildRoadVehicle(), CmdBuildShip(), and DrawVehiclePurchaseInfo().
uint Engine::GetPower | ( | ) | const |
Returns the power of the engine for display and sorting purposes.
Only trains and road vehicles have power
Definition at line 390 of file engine.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool >::index, PROP_ROADVEH_POWER, PROP_TRAIN_POWER, VEH_ROAD, and VEH_TRAIN.
Referenced by EnginePowerVsRunningCostSorter().
uint16_t Engine::GetRange | ( | ) | const |
Get the range of an aircraft type.
Definition at line 453 of file engine.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool >::index, PROP_AIRCRAFT_RANGE, and VEH_AIRCRAFT.
Referenced by DrawAircraftPurchaseInfo().
Money Engine::GetRunningCost | ( | ) | const |
Return how much the running costs of this engine are.
Definition at line 281 of file engine.cpp.
References GetGRF(), GetPrice(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool >::index, PROP_AIRCRAFT_RUNNING_COST_FACTOR, PROP_ROADVEH_RUNNING_COST_FACTOR, PROP_SHIP_RUNNING_COST_FACTOR, PROP_TRAIN_RUNNING_COST_FACTOR, VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, and VEH_TRAIN.
Referenced by DrawAircraftPurchaseInfo(), and EnginePowerVsRunningCostSorter().
bool Engine::IsEnabled | ( | ) | const |
Checks whether the engine is a valid (non-articulated part of an) engine.
Definition at line 147 of file engine.cpp.
References _settings_game, EngineInfo::climates, GameSettings::game_creation, HasBit(), GameCreationSettings::landscape, and EngineInfo::string_id.
Referenced by IsEngineBuildable().
|
inline |
Check if the engine is a ground vehicle.
Definition at line 161 of file engine_base.h.
References VEH_ROAD, and VEH_TRAIN.
Referenced by GetArticulatedRefitMasks(), GetCapacityOfArticulatedParts(), GetCargoTypesOfArticulatedParts(), and IsArticulatedVehicleRefittable().
|
inline |
Check whether the engine is hidden in the GUI for the given company.
c | Company to check. |
true
iff the engine is hidden in the GUI for the given company. Definition at line 140 of file engine_base.h.
References HasBit(), and MAX_COMPANIES.
Referenced by IsVariantHidden().
bool Engine::IsVariantHidden | ( | CompanyID | c | ) | const |
Check whether the engine variant chain is hidden in the GUI for the given company.
c | Company to check. |
true
iff the engine variant chain is hidden in the GUI for the given company. Definition at line 487 of file engine.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_engine_pool >::Get(), GetDisplayVariant(), INVALID_ENGINE, IsHidden(), MAX_COMPANIES, and EngineInfo::variant_id.
|
inlinestatic |
Returns an iterable ensemble of all valid engines of the given type.
vt | the VehicleType for engines to be valid |
from | index of the first engine to consider |
Definition at line 190 of file engine_base.h.
Referenced by AcceptEnginePreview(), AfterLoadGRFs(), CanBuildVehicleInfrastructure(), CheckValidVehicles(), ClearLastVariant(), ReplaceVehicleWindow::GenerateReplaceVehList(), GetCompanyRailTypes(), GetCompanyRoadTypes(), GetRailTypes(), GetRoadTypes(), InitDepotWindowBlockSizes(), and ResetNewGRFData().
int32_t Engine::age |
Age of the engine in months.
Definition at line 45 of file engine_base.h.
Referenced by CalcEngineReliability(), CopyTempEngineData(), FixTTOEngines(), and StartupOneEngine().
AircraftVehicleInfo Engine::air |
Definition at line 70 of file engine_base.h.
CompanyMask Engine::company_avail |
Bit for each company whether the engine is available for that company.
Definition at line 38 of file engine_base.h.
Referenced by AgeVehicle(), CalcEngineReliability(), CopyTempEngineData(), DisableEngineForCompany(), EnableEngineForCompany(), FixTTOEngines(), IsEngineBuildable(), NewVehicleAvailable(), and StartupOneEngine().
CompanyMask Engine::company_hidden |
Bit for each company whether the engine is normally hidden in the build gui for that company.
Definition at line 39 of file engine_base.h.
Referenced by CmdSetVehicleVisibility(), CopyTempEngineData(), DrawEngineList(), and StartupOneEngine().
EngineDisplayFlags Engine::display_flags |
NOSAVE client-side-only display flags for build engine list.
Definition at line 62 of file engine_base.h.
Referenced by ReplaceVehicleWindow::OnClick(), and BuildVehicleWindow::OnClick().
EngineID Engine::display_last_variant |
NOSAVE client-side-only last variant selected.
Definition at line 63 of file engine_base.h.
Referenced by GUIEngineListAddChildren().
uint16_t Engine::duration_phase_1 |
First reliability phase in months, increasing reliability from reliability_start to reliability_max.
Definition at line 52 of file engine_base.h.
Referenced by CalcEngineReliability(), CopyTempEngineData(), FixTTOEngines(), and StartupOneEngine().
uint16_t Engine::duration_phase_2 |
Second reliability phase in months, keeping reliability_max.
Definition at line 53 of file engine_base.h.
Referenced by CalcEngineReliability(), CopyTempEngineData(), FixTTOEngines(), and StartupOneEngine().
uint16_t Engine::duration_phase_3 |
Third reliability phase in months, decaying to reliability_final.
Definition at line 54 of file engine_base.h.
Referenced by CalcEngineReliability(), CopyTempEngineData(), FixTTOEngines(), and StartupOneEngine().
uint8_t Engine::flags |
Flags of the engine.
Definition at line 55 of file engine_base.h.
Referenced by CmdBuildAircraft(), CmdBuildRailVehicle(), CmdBuildRoadVehicle(), CmdBuildShip(), CmdWantEnginePreview(), CopyTempEngineData(), FixTTOEngines(), IsEngineBuildable(), ENGNChunkHandler::Load(), NewVehicleAvailable(), and StartupOneEngine().
GRFFilePropsBase<NUM_CARGO + 2> Engine::grf_prop |
Properties related the the grf file.
NUM_CARGO real cargo plus two pseudo cargo sprite groups. Used for obtaining the sprite offset of custom sprites, and for evaluating callbacks.
Definition at line 82 of file engine_base.h.
Referenced by CommitVehicleListOrderChanges(), EnginePreSort(), FinaliseEngineArray(), GetNewEngine(), SetEngineGRF(), VehicleLengthChanged(), and VehicleResolverObject::VehicleResolverObject().
EngineInfo Engine::info |
Definition at line 64 of file engine_base.h.
TimerGameCalendar::Date Engine::intro_date |
Date of introduction of the engine.
Definition at line 44 of file engine_base.h.
Referenced by CopyTempEngineData(), DrawVehiclePurchaseInfo(), FixTTOEngines(), and StartupOneEngine().
uint16_t Engine::list_position |
Definition at line 73 of file engine_base.h.
std::string Engine::name |
Custom name of engine.
Definition at line 42 of file engine_base.h.
Referenced by CmdRenameEngine(), CopyTempEngineData(), FixTTOEngines(), and ENGSChunkHandler::Load().
uint8_t Engine::original_image_index |
Original vehicle image index, thus the image index of the overridden vehicle.
Definition at line 59 of file engine_base.h.
Referenced by Aircraft::GetImage(), RoadVehicle::GetImage(), Ship::GetImage(), and Train::GetImage().
std::vector<WagonOverride> Engine::overrides |
Definition at line 83 of file engine_base.h.
CompanyMask Engine::preview_asked |
Bit for each company which has already been offered a preview.
Definition at line 40 of file engine_base.h.
Referenced by AcceptEnginePreview(), CopyTempEngineData(), FixTTOEngines(), GetPreviewCompany(), and ENGNChunkHandler::Load().
CompanyID Engine::preview_company |
Company which is currently being offered a preview INVALID_COMPANY
means no company.
Definition at line 57 of file engine_base.h.
Referenced by AcceptEnginePreview(), CmdWantEnginePreview(), CopyTempEngineData(), FixTTOEngines(), and ENGNChunkHandler::Load().
uint8_t Engine::preview_wait |
Daily countdown timer for timeout of offering the engine to the preview_company company.
Definition at line 58 of file engine_base.h.
Referenced by CopyTempEngineData(), and FixTTOEngines().
RailVehicleInfo Engine::rail |
Definition at line 67 of file engine_base.h.
uint16_t Engine::reliability |
Current reliability of the engine.
Definition at line 47 of file engine_base.h.
Referenced by AircraftEventHandler_AtTerminal(), CalcEngineReliability(), CmdBuildAircraft(), CmdBuildRailVehicle(), CmdBuildRoadVehicle(), CmdBuildShip(), CopyTempEngineData(), DrawVehiclePurchaseInfo(), FixTTOEngines(), ProcessConditionalOrder(), and VehicleServiceInDepot().
uint16_t Engine::reliability_final |
Final reliability of the engine.
Definition at line 51 of file engine_base.h.
Referenced by CalcEngineReliability(), CopyTempEngineData(), FixTTOEngines(), and StartupOneEngine().
uint16_t Engine::reliability_max |
Maximal reliability of the engine.
Definition at line 50 of file engine_base.h.
Referenced by CalcEngineReliability(), CopyTempEngineData(), FixTTOEngines(), and StartupOneEngine().
uint16_t Engine::reliability_spd_dec |
Speed of reliability decay between services (per day).
Definition at line 48 of file engine_base.h.
Referenced by CmdBuildAircraft(), CmdBuildRailVehicle(), CmdBuildRoadVehicle(), CmdBuildShip(), CopyTempEngineData(), FixTTOEngines(), and StartupOneEngine().
uint16_t Engine::reliability_start |
Initial reliability of the engine.
Definition at line 49 of file engine_base.h.
Referenced by CalcEngineReliability(), CopyTempEngineData(), FixTTOEngines(), and StartupOneEngine().
RoadVehicleInfo Engine::road |
Definition at line 68 of file engine_base.h.
ShipVehicleInfo Engine::ship |
Definition at line 69 of file engine_base.h.
VehicleType Engine::type |
Vehicle type, ie VEH_ROAD, VEH_TRAIN, etc.
Definition at line 60 of file engine_base.h.
Referenced by AcceptEnginePreview(), CalcEngineReliability(), CalculateRefitMasks(), CanVehicleUseStation(), CheckAutoreplaceValidity(), CmdBuildVehicle(), CmdSetVehicleVisibility(), CommitVehicleListOrderChanges(), DisableEngineForCompany(), DrawAircraftPurchaseInfo(), DrawVehicleEngine(), DrawVehiclePurchaseInfo(), EnableEngineForCompany(), EnginePreSort(), FinaliseEngineArray(), GetEngineCategoryName(), GetEngineInfoString(), GetEngineLiveryScheme(), GetGroupNumEngines(), GetNextArticulatedPart(), GetPreviewCompany(), GetRefitCost(), IsEngineBuildable(), IsWagon(), NewVehicleAvailable(), StartupOneEngine(), GroupStatistics::UpdateAutoreplace(), and Vehicle::UpdateVisualEffect().