Add road vehicle direction to order window manage order dropdown
This commit is contained in:
@@ -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]
|
||||
|
@@ -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<DropDownListDividerItem>(-1, false));
|
||||
list.push_back(std::make_unique<DropDownListCheckedItem>(dir == INVALID_DIAGDIR, STR_ORDER_RV_DIR_ANY, 0x300 + INVALID_DIAGDIR, false));
|
||||
list.push_back(std::make_unique<DropDownListCheckedItem>(dir == DIAGDIR_NE, STR_ORDER_RV_DIR_NE, 0x300 + DIAGDIR_NE, false));
|
||||
list.push_back(std::make_unique<DropDownListCheckedItem>(dir == DIAGDIR_SE, STR_ORDER_RV_DIR_SE, 0x300 + DIAGDIR_SE, false));
|
||||
list.push_back(std::make_unique<DropDownListCheckedItem>(dir == DIAGDIR_SW, STR_ORDER_RV_DIR_SW, 0x300 + DIAGDIR_SW, false));
|
||||
list.push_back(std::make_unique<DropDownListCheckedItem>(dir == DIAGDIR_NW, STR_ORDER_RV_DIR_NW, 0x300 + DIAGDIR_NW, false));
|
||||
}
|
||||
}
|
||||
|
||||
if (!order->IsType(OT_IMPLICIT)) {
|
||||
list.push_back(std::make_unique<DropDownListDividerItem>(-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));
|
||||
|
Reference in New Issue
Block a user