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

Method IsEnabled

src/engine.cpp:146–149  ·  view source on GitHub ↗

* Checks whether the engine is a valid (non-articulated part of an) engine. * @return true if enabled */

Source from the content-addressed store, hash-verified

144 * @return true if enabled
145 */
146bool Engine::IsEnabled() const
147{
148 return this->info.string_id != STR_NEWGRF_INVALID_ENGINE && this->info.climates.Test(_settings_game.game_creation.landscape);
149}
150
151/**
152 * Retrieve the GRF ID of the NewGRF the engine is tied to.

Callers 14

FinaliseObjectsArrayFunction · 0.45
FormatStringFunction · 0.45
IsInvalidEngineNewsFunction · 0.45
InitBlocksizeForVehiclesFunction · 0.45
DrawTile_ObjectFunction · 0.45
GetFoundation_ObjectFunction · 0.45
TerraformTile_ObjectFunction · 0.45
BindToClassesMethod · 0.45
IsEngineBuildableFunction · 0.45
CheckEnginesFunction · 0.45

Calls 1

TestMethod · 0.80

Tested by

no test coverage detected