OpenTTD Source 20241224-master-gf74b0cf984
|
Information about a rail vehicle. More...
#include <engine_type.h>
Data Fields | |
uint8_t | image_index |
RailVehicleTypes | railveh_type |
uint8_t | cost_factor |
Purchase cost factor; For multiheaded engines the sum of both engine prices. | |
RailType | railtype |
Railtype, mangled if elrail is disabled. | |
RailType | intended_railtype |
Intended railtype, regardless of elrail being enabled or disabled. | |
uint8_t | ai_passenger_only |
Bit value to tell AI that this engine is for passenger use only. | |
uint16_t | max_speed |
Maximum speed (1 unit = 1/1.6 mph = 1 km-ish/h) | |
uint16_t | power |
Power of engine (hp); For multiheaded engines the sum of both engine powers. | |
uint16_t | weight |
Weight of vehicle (tons); For multiheaded engines the weight of each single engine. | |
uint8_t | running_cost |
Running cost of engine; For multiheaded engines the sum of both running costs. | |
Price | running_cost_class |
EngineClass | engclass |
Class of engine for this vehicle. | |
uint8_t | capacity |
Cargo capacity of vehicle; For multiheaded engines the capacity of each single engine. | |
uint16_t | pow_wag_power |
Extra power applied to consist if wagon should be powered. | |
uint8_t | pow_wag_weight |
Extra weight applied to consist if wagon should be powered. | |
uint8_t | visual_effect |
Bitstuffed NewGRF visual effect data. | |
uint8_t | shorten_factor |
length on main map for this type is 8 - shorten_factor | |
uint8_t | tractive_effort |
Tractive effort coefficient. | |
uint8_t | air_drag |
Coefficient of air drag. | |
uint8_t | user_def_data |
Property 0x25: "User-defined bit mask" Used only for (very few) NewGRF vehicles. | |
int16_t | curve_speed_mod |
Modifier to maximum speed in curves (fixed-point binary with 8 fractional bits) | |
Information about a rail vehicle.
Definition at line 42 of file engine_type.h.
uint8_t RailVehicleInfo::ai_passenger_only |
Bit value to tell AI that this engine is for passenger use only.
Definition at line 48 of file engine_type.h.
Referenced by RailVehicleChangeInfo().
uint8_t RailVehicleInfo::air_drag |
Coefficient of air drag.
Definition at line 61 of file engine_type.h.
Referenced by Train::GetAirDrag(), and RailVehicleChangeInfo().
uint8_t RailVehicleInfo::capacity |
Cargo capacity of vehicle; For multiheaded engines the capacity of each single engine.
Definition at line 55 of file engine_type.h.
Referenced by AddArticulatedParts(), CalculateRefitMasks(), CmdBuildRailVehicle(), CmdBuildRailWagon(), and RailVehicleChangeInfo().
uint8_t RailVehicleInfo::cost_factor |
Purchase cost factor; For multiheaded engines the sum of both engine prices.
Definition at line 45 of file engine_type.h.
Referenced by RailVehicleChangeInfo().
int16_t RailVehicleInfo::curve_speed_mod |
Modifier to maximum speed in curves (fixed-point binary with 8 fractional bits)
Definition at line 63 of file engine_type.h.
Referenced by RailVehicleChangeInfo().
EngineClass RailVehicleInfo::engclass |
Class of engine for this vehicle.
Definition at line 54 of file engine_type.h.
Referenced by GetEngineLiveryScheme(), RailVehicleChangeInfo(), and Vehicle::UpdateVisualEffect().
uint8_t RailVehicleInfo::image_index |
Definition at line 43 of file engine_type.h.
RailType RailVehicleInfo::intended_railtype |
Intended railtype, regardless of elrail being enabled or disabled.
Definition at line 47 of file engine_type.h.
Referenced by AfterLoadGRFs().
uint16_t RailVehicleInfo::max_speed |
Maximum speed (1 unit = 1/1.6 mph = 1 km-ish/h)
Definition at line 49 of file engine_type.h.
Referenced by Train::ConsistChanged(), and RailVehicleChangeInfo().
uint16_t RailVehicleInfo::pow_wag_power |
Extra power applied to consist if wagon should be powered.
Definition at line 56 of file engine_type.h.
Referenced by Train::ConsistChanged(), Train::GetPoweredPartPower(), and RailVehicleChangeInfo().
uint8_t RailVehicleInfo::pow_wag_weight |
Extra weight applied to consist if wagon should be powered.
Definition at line 57 of file engine_type.h.
Referenced by Train::GetMaxWeight(), Train::GetWeight(), and RailVehicleChangeInfo().
uint16_t RailVehicleInfo::power |
Power of engine (hp); For multiheaded engines the sum of both engine powers.
Definition at line 50 of file engine_type.h.
Referenced by Train::ConsistChanged(), and RailVehicleChangeInfo().
RailType RailVehicleInfo::railtype |
Railtype, mangled if elrail is disabled.
Definition at line 46 of file engine_type.h.
Referenced by AfterLoadGame(), AfterLoadGRFs(), CheckAutoreplaceValidity(), CmdBuildRailVehicle(), CmdBuildRailWagon(), Train::ConsistChanged(), GetCompanyRailTypes(), GetEngineCategoryName(), GetNewEngine(), GetRailTypes(), IsEngineBuildable(), NewVehicleAvailable(), and ResetNewGRFData().
RailVehicleTypes RailVehicleInfo::railveh_type |
Definition at line 44 of file engine_type.h.
uint8_t RailVehicleInfo::running_cost |
Running cost of engine; For multiheaded engines the sum of both running costs.
Definition at line 52 of file engine_type.h.
Referenced by Train::GetRunningCost(), and RailVehicleChangeInfo().
Price RailVehicleInfo::running_cost_class |
Definition at line 53 of file engine_type.h.
uint8_t RailVehicleInfo::shorten_factor |
length on main map for this type is 8 - shorten_factor
Definition at line 59 of file engine_type.h.
Referenced by Train::ConsistChanged(), and RailVehicleChangeInfo().
uint8_t RailVehicleInfo::tractive_effort |
Tractive effort coefficient.
Definition at line 60 of file engine_type.h.
Referenced by RailVehicleChangeInfo().
uint8_t RailVehicleInfo::user_def_data |
Property 0x25: "User-defined bit mask" Used only for (very few) NewGRF vehicles.
Definition at line 62 of file engine_type.h.
Referenced by Train::ConsistChanged(), and RailVehicleChangeInfo().
uint8_t RailVehicleInfo::visual_effect |
Bitstuffed NewGRF visual effect data.
Definition at line 58 of file engine_type.h.
Referenced by RailVehicleChangeInfo(), and Vehicle::UpdateVisualEffect().
uint16_t RailVehicleInfo::weight |
Weight of vehicle (tons); For multiheaded engines the weight of each single engine.
Definition at line 51 of file engine_type.h.
Referenced by RailVehicleChangeInfo().