diff --git a/src/lang/extra/english.txt b/src/lang/extra/english.txt index 0ff6b7802e..94086b6498 100644 --- a/src/lang/extra/english.txt +++ b/src/lang/extra/english.txt @@ -1702,6 +1702,7 @@ STR_ORDER_CARGO_TYPE_UNLOAD_FULL_LOAD_REFIT :(Unload by carg STR_ORDER_CARGO_TYPE_UNLOAD_FULL_LOAD_ANY_REFIT :(Unload by cargo type and wait for any full load with refit to {STRING}) STR_ORDER_CARGO_TYPE_UNLOAD_CARGO_TYPE_LOAD_REFIT :(Unload by cargo type and load by cargo type with refit to {STRING}) +STR_ORDER_RV_DIR_ANY :[any direction] STR_ORDER_RV_DIR_NE :[north-east direction] STR_ORDER_RV_DIR_SE :[south-east direction] STR_ORDER_RV_DIR_SW :[south-west direction] diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 383229c668..f005e8495c 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -2876,6 +2876,18 @@ public: } } + if (this->vehicle->type == VEH_ROAD && (order->IsType(OT_GOTO_STATION) || order->IsType(OT_GOTO_WAYPOINT)) && _settings_game.pf.pathfinder_for_roadvehs == VPF_YAPF) { + const DiagDirection dir = order->GetRoadVehTravelDirection(); + if (_settings_client.gui.show_adv_load_mode_features || dir != INVALID_DIAGDIR) { + list.push_back(std::make_unique(-1, false)); + list.push_back(std::make_unique(dir == INVALID_DIAGDIR, STR_ORDER_RV_DIR_ANY, 0x300 + INVALID_DIAGDIR, false)); + list.push_back(std::make_unique(dir == DIAGDIR_NE, STR_ORDER_RV_DIR_NE, 0x300 + DIAGDIR_NE, false)); + list.push_back(std::make_unique(dir == DIAGDIR_SE, STR_ORDER_RV_DIR_SE, 0x300 + DIAGDIR_SE, false)); + list.push_back(std::make_unique(dir == DIAGDIR_SW, STR_ORDER_RV_DIR_SW, 0x300 + DIAGDIR_SW, false)); + list.push_back(std::make_unique(dir == DIAGDIR_NW, STR_ORDER_RV_DIR_NW, 0x300 + DIAGDIR_NW, false)); + } + } + if (!order->IsType(OT_IMPLICIT)) { list.push_back(std::make_unique(-1, false)); const Colours current_colour = order->GetColour(); @@ -3464,6 +3476,10 @@ public: this->ModifyOrder(this->OrderGetSel(), MOF_STOP_LOCATION | (index & 0xFF) << 8); break; } + if (index >= 0x300 && index <= 0x300 + INVALID_DIAGDIR) { + this->ModifyOrder(this->OrderGetSel(), MOF_RV_TRAVEL_DIR | (index & 0xFF) << 8); + break; + } switch (index) { case 0: DoCommandP(this->vehicle->tile, this->vehicle->index, this->OrderGetSel(), CMD_DUPLICATE_ORDER | CMD_MSG(STR_ERROR_CAN_T_INSERT_NEW_ORDER));