53 Price running_cost_class;
103 uint8_t running_cost;
107 uint8_t acceleration;
117 uint8_t running_cost;
118 Price running_cost_class;
156 std::variant<CargoLabel, MixedCargoType> cargo_label;
157 CargoTypes refit_mask;
205 return engine_id | (
static_cast<uint64_t
>(context) << 32) | (
static_cast<uint64_t
>(extra_data) << 40);
@ None
Tile is not animated.
Types related to cargoes...
uint8_t CargoID
Cargo slots to indicate a cargo type within a game.
Types related to the economy.
Price
Enumeration of all base prices for use with Prices.
ExtraEngineFlags
Extra engine flags for NewGRF features.
@ SyncReliability
Engine reliability will be synced with variant parent.
@ NoNews
No 'new vehicle' news will be generated.
@ JoinPreview
Engine will join exclusive preview with variant parent.
@ NoPreview
No exclusive preview will be offered.
static const uint MAX_LENGTH_ENGINE_NAME_CHARS
The maximum length of an engine name in characters including '\0'.
static const EngineID INVALID_ENGINE
Constant denoting an invalid engine.
uint16_t EngineID
Unique identification number of an engine.
AircraftSubTypeBits
AircraftVehicleInfo subtypes, bitmask type.
@ AIR_CTOL
Conventional Take Off and Landing, i.e. planes.
uint64_t PackEngineNameDParam(EngineID engine_id, EngineNameContext context, uint32_t extra_data=0)
Combine an engine ID and a name context to an engine name dparam.
EngineClass
Type of rail engine.
@ EC_DIESEL
Diesel rail engine.
@ EC_STEAM
Steam rail engine.
@ EC_MAGLEV
Maglev engine.
@ EC_ELECTRIC
Electric rail engine.
@ EC_MONORAIL
Mono rail engine.
EngineFlags
Engine.flags is a bitmask, with the following values.
@ ENGINE_EXCLUSIVE_PREVIEW
This vehicle is in the exclusive preview stage, either being used or being offered to a company.
@ ENGINE_AVAILABLE
This vehicle is available to everyone.
EngineMiscFlags
EngineInfo.misc_flags is a bitmask, with the following values.
@ EF_USES_2CC
Vehicle uses two company colours.
@ EF_RAIL_TILTS
Rail vehicle tilts in curves.
@ EF_NO_DEFAULT_CARGO_MULTIPLIER
Use the new capacity algorithm. The default cargotype of the vehicle does not affect capacity multipl...
@ EF_ROAD_TRAM
Road vehicle is a tram/light rail vehicle.
@ EF_RAIL_IS_MU
Rail vehicle is a multiple-unit (DMU/EMU)
@ EF_NO_BREAKDOWN_SMOKE
Do not show black smoke during a breakdown.
@ EF_AUTO_REFIT
Automatic refitting is allowed.
@ EF_RAIL_FLIPS
Rail vehicle has old depot-flip handling.
@ EF_SPRITE_STACK
Draw vehicle by stacking multiple sprites.
EngineNameContext
Contexts an engine name can be shown in.
@ AutoreplaceVehicleInUse
Name is show in the autoreplace window 'Vehicles in use' panel.
@ Generic
No specific context available.
@ PreviewNews
Name is shown in exclusive preview or newspaper.
@ VehicleDetails
Name is shown in the vehicle details GUI.
@ PurchaseList
Name is shown in the purchase list (including autoreplace window 'Available vehicles' panel).
RailVehicleTypes
Available types of rail vehicles.
@ RAILVEH_SINGLEHEAD
indicates a "standalone" locomotive
@ RAILVEH_WAGON
simple wagon, not motorized
@ RAILVEH_MULTIHEAD
indicates a combination of two locomotives
#define DECLARE_ENUM_AS_BIT_SET(enum_type)
Operators to allow to work with enum as with type safe bit set in C++.
The different types of rail.
RailType
Enumeration for all possible railtypes.
Enums and other types related to roads.
RoadType
The different roadtypes we support.
Types related to strings.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Information about a aircraft vehicle.
uint16_t max_speed
Maximum speed (1 unit = 8 mph = 12.8 km-ish/h)
uint8_t mail_capacity
Mail capacity (bags).
uint8_t subtype
Type of aircraft.
uint16_t passenger_capacity
Passenger capacity (persons).
uint16_t max_range
Maximum range of this aircraft.
Information about a vehicle.
uint16_t cargo_age_period
Number of ticks before carried cargo is aged.
TimerGameCalendar::Year base_life
Basic duration of engine availability (without random parts). 0xFF means infinite life.
EngineID variant_id
Engine variant ID. If set, will be treated specially in purchase lists.
uint8_t misc_flags
Miscellaneous flags.
StringID string_id
Default name of engine.
uint8_t climates
Climates supported by the engine.
TimerGameCalendar::Date base_intro
Basic date of engine introduction (without random parts).
uint16_t callback_mask
Bitmask of vehicle callbacks that have to be called.
int8_t retire_early
Number of years early to retire vehicle.
TimerGameCalendar::Year lifelength
Lifetime of a single vehicle.
Information about a rail vehicle.
uint16_t power
Power of engine (hp); For multiheaded engines the sum of both engine powers.
uint8_t user_def_data
Property 0x25: "User-defined bit mask" Used only for (very few) NewGRF vehicles.
uint8_t running_cost
Running cost of engine; For multiheaded engines the sum of both running costs.
uint8_t cost_factor
Purchase cost factor; For multiheaded engines the sum of both engine prices.
uint8_t shorten_factor
length on main map for this type is 8 - shorten_factor
RailType intended_railtype
Intended railtype, regardless of elrail being enabled or disabled.
uint16_t pow_wag_power
Extra power applied to consist if wagon should be powered.
uint16_t max_speed
Maximum speed (1 unit = 1/1.6 mph = 1 km-ish/h)
int16_t curve_speed_mod
Modifier to maximum speed in curves (fixed-point binary with 8 fractional bits)
uint16_t weight
Weight of vehicle (tons); For multiheaded engines the weight of each single engine.
uint8_t capacity
Cargo capacity of vehicle; For multiheaded engines the capacity of each single engine.
uint8_t visual_effect
Bitstuffed NewGRF visual effect data.
uint8_t air_drag
Coefficient of air drag.
EngineClass engclass
Class of engine for this vehicle.
uint8_t ai_passenger_only
Bit value to tell AI that this engine is for passenger use only.
RailType railtype
Railtype, mangled if elrail is disabled.
uint8_t tractive_effort
Tractive effort coefficient.
uint8_t pow_wag_weight
Extra weight applied to consist if wagon should be powered.
Information about a road vehicle.
uint8_t tractive_effort
Coefficient of tractive effort.
uint16_t max_speed
Maximum speed (1 unit = 1/3.2 mph = 0.5 km-ish/h)
uint8_t air_drag
Coefficient of air drag.
uint8_t power
Power in 10hp units.
RoadType roadtype
Road type.
uint8_t weight
Weight in 1/4t units.
uint8_t shorten_factor
length on main map for this type is 8 - shorten_factor
uint8_t visual_effect
Bitstuffed NewGRF visual effect data.
Information about a ship vehicle.
bool old_refittable
Is ship refittable; only used during initialisation. Later use EngineInfo::refit_mask.
uint8_t ocean_speed_frac
Fraction of maximum speed for ocean tiles.
uint ApplyWaterClassSpeedFrac(uint raw_speed, bool is_ocean) const
Apply ocean/canal speed fraction to a velocity.
uint8_t visual_effect
Bitstuffed NewGRF visual effect data.
uint16_t max_speed
Maximum speed (1 unit = 1/3.2 mph = 0.5 km-ish/h)
uint8_t acceleration
Acceleration (1 unit = 1/3.2 mph per tick = 0.5 km-ish/h per tick)
uint8_t canal_speed_frac
Fraction of maximum speed for canal/river tiles.
Templated helper to make a type-safe 'typedef' representing a single POD value.
Definition of the game-calendar-timer.