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

Method IsConditionalOrder

src/script/api/script_order.cpp:138–146  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

136}
137
138/* static */ bool ScriptOrder::IsConditionalOrder(VehicleID vehicle_id, OrderPosition order_position)
139{
140 if (order_position == ORDER_CURRENT) return false;
141 if (!IsValidVehicleOrder(vehicle_id, order_position)) return false;
142
143 const Order *order = ::Vehicle::Get(vehicle_id)->GetOrder(ScriptOrderPositionToRealOrderPosition(vehicle_id, order_position));
144 assert(order != nullptr);
145 return order->GetType() == OT_CONDITIONAL;
146}
147
148/* static */ bool ScriptOrder::IsVoidOrder(VehicleID vehicle_id, OrderPosition order_position)
149{

Callers

nothing calls this directly

Calls 3

GetOrderMethod · 0.80
GetTypeMethod · 0.45

Tested by

no test coverage detected