#include <engine_base.h>
Public Member Functions | |
void | ResetToDefaultMapping () |
Initializes the EngineOverrideManager with the default engines. | |
EngineID | GetID (VehicleType type, uint16 grf_local_id, uint32 grfid) |
Looks up an EngineID in the EngineOverrideManager. | |
Static Public Attributes | |
static const uint | NUM_DEFAULT_ENGINES = _engine_counts[VEH_TRAIN] + _engine_counts[VEH_ROAD] + _engine_counts[VEH_SHIP] + _engine_counts[VEH_AIRCRAFT] |
Number of default entries. |
Note: This is not part of Engine, as the data in the EngineOverrideManager and the engine pool get resetted in different cases.
Definition at line 97 of file engine_base.h.
EngineID EngineOverrideManager::GetID | ( | VehicleType | type, | |
uint16 | grf_local_id, | |||
uint32 | grfid | |||
) |
Looks up an EngineID in the EngineOverrideManager.
type | Vehicle type | |
grf_local_id | The local id in the newgrf | |
grfid | The GrfID that defines the scope of grf_local_id. If a newgrf overrides the engines of another newgrf, the "scope grfid" is the ID of the overridden newgrf. If dynnamic_engines is disabled, all newgrf share the same ID scope identified by INVALID_GRFID. |
Definition at line 375 of file engine.cpp.
References SmallVector< EngineIDMapping, 256 >::Begin(), and SmallVector< EngineIDMapping, 256 >::End().
Referenced by GetNewEngine().