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

Method GetMaximumOrderDistance

src/script/api/script_engine.cpp:280–286  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

278}
279
280/* static */ SQInteger ScriptEngine::GetMaximumOrderDistance(EngineID engine_id)
281{
282 if (!IsValidEngine(engine_id)) return 0;
283 if (GetVehicleType(engine_id) != ScriptVehicle::VT_AIR) return 0;
284
285 return (SQInteger)::Engine::Get(engine_id)->GetRange() * ::Engine::Get(engine_id)->GetRange();
286}
287
288/* static */ bool ScriptEngine::EnableForCompany(EngineID engine_id, ScriptCompany::CompanyID company)
289{

Callers

nothing calls this directly

Calls 1

GetRangeMethod · 0.45

Tested by

no test coverage detected