MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetGRFID

Method GetGRFID

src/engine.cpp:156–160  ·  view source on GitHub ↗

* Retrieve the GRF ID of the NewGRF the engine is tied to. * This is the GRF providing the Action 3. * @return GRF ID of the associated NewGRF. */

Source from the content-addressed store, hash-verified

154 * @return GRF ID of the associated NewGRF.
155 */
156uint32_t Engine::GetGRFID() const
157{
158 const GRFFile *file = this->GetGRF();
159 return file == nullptr ? 0 : file->grfid;
160}
161
162/**
163 * Determines whether an engine can carry something.

Callers 12

OnClickMethod · 0.45
GetVariableMethod · 0.45
ConsistChangedMethod · 0.45
CheckTrainAttachmentFunction · 0.45
CmdStartStopVehicleFunction · 0.45
GetRoadVehLengthFunction · 0.45
GetLoadAmountFunction · 0.45
DrawVehiclePurchaseInfoFunction · 0.45
GetCargoSubtypeTextFunction · 0.45
VehicleGetVariableFunction · 0.45
StartupOneEngineFunction · 0.45
GetMethod · 0.45

Calls 1

GetGRFMethod · 0.95

Tested by

no test coverage detected