61 uint16 overrides_count;
83 return this->info.cargo_type;
162 void ResetToDefaultMapping();
165 static bool ResetToCurrentNewGRFConfig();
170 #define FOR_ALL_ENGINES_FROM(var, start) FOR_ALL_ITEMS_FROM(Engine, engine_index, var, start) 171 #define FOR_ALL_ENGINES(var) FOR_ALL_ENGINES_FROM(var, 0) 173 #define FOR_ALL_ENGINES_OF_TYPE(e, engine_type) FOR_ALL_ENGINES(e) if (e->type == engine_type) Information about a ship vehicle.
uint16 reliability_start
Initial reliability of the engine.
uint16 reliability
Current reliability of the engine.
uint GetDisplayDefaultCapacity(uint16 *mail_capacity=NULL) const
Determines the default cargo capacity of an engine for display purposes.
uint32 grfid
The GRF ID of the file the entity belongs to.
bool IsEnabled() const
Checks whether the engine is a valid (non-articulated part of an) engine.
StringID GetAircraftTypeText() const
Get the name of the aircraft type for display purposes.
static Titem * Get(size_t index)
Returns Titem with given index.
bool CanCarryCargo() const
Determines whether an engine can carry something.
bool IsHidden(CompanyByte c) const
Check whether the engine is hidden in the GUI for the given company.
uint16 GetRange() const
Get the range of an aircraft type.
GRFFilePropsBase< NUM_CARGO+2 > grf_prop
Properties related the the grf file.
Date intro_date
Date of introduction of the engine.
Types related to engines.
CompanyMask company_hidden
Bit for each company whether the engine is normally hidden in the build gui for that company...
static const uint NUM_DEFAULT_ENGINES
Number of default entries.
Simple vector template class.
byte flags
Flags of the engine.
Defintion of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle...
CargoID GetDefaultCargoType() const
Determines the default cargo type of an engine.
uint16 duration_phase_2
Second reliability phase in months, keeping reliability_max.
uint32 GetGRFID() const
Retrieve the GRF ID of the NewGRF the engine is tied to.
uint16 reliability_spd_dec
Speed of reliability decay between services (per day).
Money GetCost() const
Return how much a new engine costs.
Information about a vehicle.
uint16 internal_id
The internal ID within the GRF file.
VehicleType
Available vehicle types.
uint16 duration_phase_3
Third reliability phase on months, decaying to reliability_final.
Stores the mapping of EngineID to the internal id of newgrfs.
uint16 duration_phase_1
First reliability phase in months, increasing reliability from reliability_start to reliability_max...
VehicleType type
Vehicle type, ie VEH_ROAD, VEH_TRAIN, etc.
CompanyMask company_avail
Bit for each company whether the engine is available for that company.
uint16 reliability_max
Maximal reliability of the engine.
uint16 reliability_final
Final reliability of the engine.
char * name
Custom name of engine.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
Base class for all PoolItems.
Maximum number of companies.
Information about a rail vehicle.
uint GetDisplayMaxSpeed() const
Returns max speed of the engine for display purposes.
Base class for all pools.
uint DetermineCapacity(const Vehicle *v, uint16 *mail_capacity=NULL) const
Determines capacity of a given vehicle from scratch.
uint GetPower() const
Returns the power of the engine for display and sorting purposes.
byte preview_wait
Daily countdown timer for timeout of offering the engine to the preview_company company.
Information about a road vehicle.
const GRFFile * GetGRF() const
Retrieve the NewGRF the engine is tied to.
uint16 EngineID
Unique identification number of an engine.
Information about a aircraft vehicle.
CompanyMask preview_asked
Bit for each company which has already been offered a preview.
VehicleTypeByte type
The engine type.
Types related to vehicles.
uint8 substitute_id
The (original) entity ID to use if this GRF is not available (currently not used) ...
This file simplyfies and embeds a common mechanism of loading/saving and mapping of grf entities...
CompanyByte preview_company
Company which is currently being offered a preview INVALID_COMPANY means no company.
int32 Date
The type to store our dates in.
uint8 original_image_index
Original vehicle image index, thus the image index of the overridden vehicle.
bool IsGroundVehicle() const
Check if the engine is a ground vehicle.
Money GetRunningCost() const
Return how much the running costs of this engine are.
const struct GRFFile * grffile
grf file that introduced this entity
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
byte CargoID
Cargo slots to indicate a cargo type within a game.
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.
Date GetLifeLengthInDays() const
Returns the vehicle's (not model's!) life length in days.
Dynamic data of a loaded NewGRF.