static */
| 417 | } |
| 418 | |
| 419 | /* static */ bool ScriptOrder::SetOrderCompareValue(VehicleID vehicle_id, OrderPosition order_position, SQInteger value) |
| 420 | { |
| 421 | EnforceCompanyModeValid(false); |
| 422 | EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, order_position)); |
| 423 | EnforcePrecondition(false, order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position)); |
| 424 | EnforcePrecondition(false, value >= 0 && value < 2048); |
| 425 | if (GetOrderCondition(vehicle_id, order_position) == OC_MAX_SPEED) value = value * 10 / 16; |
| 426 | |
| 427 | int order_pos = ScriptOrderPositionToRealOrderPosition(vehicle_id, order_position); |
| 428 | return ScriptObject::Command<CMD_MODIFY_ORDER>::Do(0, vehicle_id, order_pos, MOF_COND_VALUE, value); |
| 429 | } |
| 430 | |
| 431 | /* static */ bool ScriptOrder::SetStopLocation(VehicleID vehicle_id, OrderPosition order_position, StopLocation stop_location) |
| 432 | { |
nothing calls this directly
no test coverage detected