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

Method HasSharedOrders

src/script/api/script_vehicle.cpp:461–467  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

459}
460
461/* static */ bool ScriptVehicle::HasSharedOrders(VehicleID vehicle_id)
462{
463 if (!IsPrimaryVehicle(vehicle_id)) return false;
464
465 const Vehicle *v = ::Vehicle::Get(vehicle_id);
466 return v->orders != nullptr && v->orders->GetNumVehicles() > 1;
467}
468
469/* static */ SQInteger ScriptVehicle::GetReliability(VehicleID vehicle_id)
470{

Callers

nothing calls this directly

Calls 1

GetNumVehiclesMethod · 0.45

Tested by

no test coverage detected