* Handle the click on the service in nearest depot button. */
| 626 | * Handle the click on the service in nearest depot button. |
| 627 | */ |
| 628 | void OrderClick_NearestDepot() |
| 629 | { |
| 630 | Order order{}; |
| 631 | order.MakeGoToDepot(DepotID::Invalid(), OrderDepotTypeFlag::PartOfOrders, |
| 632 | _settings_client.gui.new_nonstop && this->vehicle->IsGroundVehicle() ? OrderNonStopFlag::NoIntermediate : OrderNonStopFlags{}); |
| 633 | order.SetDepotActionType(OrderDepotActionFlag::NearestDepot); |
| 634 | |
| 635 | Command<CMD_INSERT_ORDER>::Post(STR_ERROR_CAN_T_INSERT_NEW_ORDER, this->vehicle->tile, this->vehicle->index, this->OrderGetSel(), order); |
| 636 | } |
| 637 | |
| 638 | /** |
| 639 | * Handle the click on the unload button. |
no test coverage detected