Go to the documentation of this file.
59 uint16 overrides_count;
81 return this->info.cargo_type;
uint GetDisplayDefaultCapacity(uint16 *mail_capacity=nullptr) const
Determines the default cargo capacity of an engine for display purposes.
uint32 GetGRFID() const
Retrieve the GRF ID of the NewGRF the engine is tied to.
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 bool ResetToCurrentNewGRFConfig()
Tries to reset the engine mapping to match the current NewGRF configuration.
static Titem * Get(size_t index)
Returns Titem with given index.
void ResetToDefaultMapping()
Initializes the EngineOverrideManager with the default engines.
uint32 grfid
The GRF ID of the file the entity belongs to.
uint16 reliability_max
Maximal reliability of the engine.
uint16 duration_phase_3
Third reliability phase in months, decaying to reliability_final.
uint16 reliability_spd_dec
Speed of reliability decay between services (per day).
CompanyMask company_avail
Bit for each company whether the engine is available for that company.
uint GetDisplayMaxTractiveEffort() const
Returns the tractive effort of the engine for display purposes.
Tindex index
Index of this pool item.
uint16 duration_phase_1
First reliability phase in months, increasing reliability from reliability_start to reliability_max.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
Money GetRunningCost() const
Return how much the running costs of this engine are.
uint16 reliability_start
Initial reliability of the engine.
CompanyID preview_company
Company which is currently being offered a preview INVALID_COMPANY means no company.
Date GetLifeLengthInDays() const
Returns the vehicle's (not model's!) life length in days.
Information about a vehicle.
@ VEH_ROAD
Road vehicle type.
uint16 internal_id
The internal ID within the GRF file.
CargoID GetDefaultCargoType() const
Determines the default cargo type of an engine.
CompanyMask company_hidden
Bit for each company whether the engine is normally hidden in the build gui for that company.
Owner
Enum for all companies/owners.
EngineID GetID(VehicleType type, uint16 grf_local_id, uint32 grfid)
Looks up an EngineID in the EngineOverrideManager.
const GRFFile * GetGRF() const
Retrieve the NewGRF the engine is tied to.
uint GetDisplayMaxSpeed() const
Returns max speed of the engine for display purposes.
uint16 EngineID
Unique identification number of an engine.
Information about a rail vehicle.
Information about a road vehicle.
int32 Date
The type to store our dates in.
CompanyMask preview_asked
Bit for each company which has already been offered a preview.
uint GetDisplayWeight() const
Returns the weight of the engine for display purposes.
@ MAX_COMPANIES
Maximum number of companies.
uint8 substitute_id
The (original) entity ID to use if this GRF is not available (currently not used)
Money GetCost() const
Return how much a new engine costs.
VehicleType
Available vehicle types.
uint16 reliability_final
Final reliability of the engine.
bool IsGroundVehicle() const
Check if the engine is a ground vehicle.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
std::string name
Custom name of engine.
Base class for all pools.
bool IsHidden(CompanyID c) const
Check whether the engine is hidden in the GUI for the given company.
bool CanCarryCargo() const
Determines whether an engine can carry something.
uint GetPower() const
Returns the power of the engine for display and sorting purposes.
Stores the mapping of EngineID to the internal id of newgrfs.
Information about a ship vehicle.
byte preview_wait
Daily countdown timer for timeout of offering the engine to the preview_company company.
uint8 original_image_index
Original vehicle image index, thus the image index of the overridden vehicle.
uint DetermineCapacity(const Vehicle *v, uint16 *mail_capacity=nullptr) const
Determines capacity of a given vehicle from scratch.
byte CargoID
Cargo slots to indicate a cargo type within a game.
bool IsEnabled() const
Checks whether the engine is a valid (non-articulated part of an) engine.
GRFFilePropsBase< NUM_CARGO+2 > grf_prop
Properties related the the grf file.
@ VEH_TRAIN
Train vehicle type.
const struct GRFFile * grffile
grf file that introduced this entity
uint16 GetRange() const
Get the range of an aircraft type.
VehicleType type
The engine type.
byte flags
Flags of the engine.
Information about a aircraft vehicle.
Base class for all PoolItems.
Date intro_date
Date of introduction of the engine.
StringID GetAircraftTypeText() const
Get the name of the aircraft type for display purposes.
static const uint NUM_DEFAULT_ENGINES
Number of default entries.
Dynamic data of a loaded NewGRF.
uint16 reliability
Current reliability of the engine.
VehicleType type
Vehicle type, ie VEH_ROAD, VEH_TRAIN, etc.
uint16 duration_phase_2
Second reliability phase in months, keeping reliability_max.