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

Method IsGotoDepotOrder

src/script/api/script_order.cpp:122–128  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

120}
121
122/* static */ bool ScriptOrder::IsGotoDepotOrder(VehicleID vehicle_id, OrderPosition order_position)
123{
124 if (!IsValidVehicleOrder(vehicle_id, order_position)) return false;
125
126 const Order *order = ::ResolveOrder(vehicle_id, order_position);
127 return order != nullptr && order->GetType() == OT_GOTO_DEPOT;
128}
129
130/* static */ bool ScriptOrder::IsGotoWaypointOrder(VehicleID vehicle_id, OrderPosition order_position)
131{

Callers

nothing calls this directly

Calls 2

ResolveOrderFunction · 0.85
GetTypeMethod · 0.45

Tested by

no test coverage detected