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

Method GetMaxTractiveEffort

src/script/api/script_engine.cpp:163–170  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

161}
162
163/* static */ SQInteger ScriptEngine::GetMaxTractiveEffort(EngineID engine_id)
164{
165 if (!IsValidEngine(engine_id)) return -1;
166 if (GetVehicleType(engine_id) != ScriptVehicle::VT_RAIL && GetVehicleType(engine_id) != ScriptVehicle::VT_ROAD) return -1;
167 if (IsWagon(engine_id)) return -1;
168
169 return ::Engine::Get(engine_id)->GetDisplayMaxTractiveEffort() / 1000;
170}
171
172/* static */ ScriptDate::Date ScriptEngine::GetDesignDate(EngineID engine_id)
173{

Callers

nothing calls this directly

Calls 2

IsWagonFunction · 0.85

Tested by

no test coverage detected