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

Method SkipToOrder

src/script/api/script_order.cpp:562–571  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

560}
561
562/* static */ bool ScriptOrder::SkipToOrder(VehicleID vehicle_id, OrderPosition next_order)
563{
564 next_order = ScriptOrder::ResolveOrderPosition(vehicle_id, next_order);
565
566 EnforceCompanyModeValid(false);
567 EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, next_order));
568
569 int order_pos = ScriptOrderPositionToRealOrderPosition(vehicle_id, next_order);
570 return ScriptObject::Command<CMD_SKIP_TO_ORDER>::Do(0, vehicle_id, order_pos);
571}
572
573/**
574 * Callback handler as SetOrderFlags possibly needs multiple DoCommand calls

Callers

nothing calls this directly

Tested by

no test coverage detected