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

Method IsVoidOrder

src/script/api/script_order.cpp:148–156  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

146}
147
148/* static */ bool ScriptOrder::IsVoidOrder(VehicleID vehicle_id, OrderPosition order_position)
149{
150 if (order_position == ORDER_CURRENT) return false;
151 if (!IsValidVehicleOrder(vehicle_id, order_position)) return false;
152
153 const Order *order = ::ResolveOrder(vehicle_id, order_position);
154 assert(order != nullptr);
155 return order->GetType() == OT_DUMMY;
156}
157
158/* static */ bool ScriptOrder::IsRefitOrder(VehicleID vehicle_id, OrderPosition order_position)
159{

Callers

nothing calls this directly

Calls 2

ResolveOrderFunction · 0.85
GetTypeMethod · 0.45

Tested by

no test coverage detected