* Handle the click on the service. */
| 611 | * Handle the click on the service. |
| 612 | */ |
| 613 | void OrderClick_Service(std::optional<OrderDepotAction> i) |
| 614 | { |
| 615 | VehicleOrderID sel_ord = this->OrderGetSel(); |
| 616 | |
| 617 | if (!i.has_value()) { |
| 618 | const Order *order = this->vehicle->GetOrder(sel_ord); |
| 619 | if (order == nullptr) return; |
| 620 | i = order->GetDepotOrderType().Test(OrderDepotTypeFlag::Service) ? OrderDepotAction::AlwaysGo : OrderDepotAction::Service; |
| 621 | } |
| 622 | Command<CMD_MODIFY_ORDER>::Post(STR_ERROR_CAN_T_MODIFY_THIS_ORDER, this->vehicle->tile, this->vehicle->index, sel_ord, MOF_DEPOT_ACTION, to_underlying(i.value())); |
| 623 | } |
| 624 | |
| 625 | /** |
| 626 | * Handle the click on the service in nearest depot button. |
no test coverage detected