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

Method AppendOrder

src/script/api/script_order.cpp:455–462  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

453}
454
455/* static */ bool ScriptOrder::AppendOrder(VehicleID vehicle_id, TileIndex destination, ScriptOrderFlags order_flags)
456{
457 EnforceCompanyModeValid(false);
458 EnforcePrecondition(false, ScriptVehicle::IsPrimaryVehicle(vehicle_id));
459 EnforcePrecondition(false, AreOrderFlagsValid(destination, order_flags));
460
461 return InsertOrder(vehicle_id, (ScriptOrder::OrderPosition)::Vehicle::Get(vehicle_id)->GetNumManualOrders(), destination, order_flags);
462}
463
464/* static */ bool ScriptOrder::AppendConditionalOrder(VehicleID vehicle_id, OrderPosition jump_to)
465{

Callers

nothing calls this directly

Calls 2

InsertOrderFunction · 0.85
GetNumManualOrdersMethod · 0.45

Tested by

no test coverage detected