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

Method IsGotoStationOrder

src/script/api/script_order.cpp:114–120  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

112}
113
114/* static */ bool ScriptOrder::IsGotoStationOrder(VehicleID vehicle_id, OrderPosition order_position)
115{
116 if (!IsValidVehicleOrder(vehicle_id, order_position)) return false;
117
118 const Order *order = ::ResolveOrder(vehicle_id, order_position);
119 return order != nullptr && order->GetType() == OT_GOTO_STATION;
120}
121
122/* static */ bool ScriptOrder::IsGotoDepotOrder(VehicleID vehicle_id, OrderPosition order_position)
123{

Callers

nothing calls this directly

Calls 2

ResolveOrderFunction · 0.85
GetTypeMethod · 0.45

Tested by

no test coverage detected