summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aircraft_cmd.c19
-rw-r--r--aircraft_gui.c8
-rw-r--r--lang/english.txt40
-rw-r--r--roadveh_cmd.c5
-rw-r--r--roadveh_gui.c8
-rw-r--r--ship_cmd.c5
-rw-r--r--ship_gui.c8
-rw-r--r--train_cmd.c5
-rw-r--r--train_gui.c8
9 files changed, 66 insertions, 40 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index ba4a64cea..5bdb66602 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -492,9 +492,8 @@ int32 CmdStartStopAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
* @param tile unused
* @param p1 vehicle ID to send to the hangar
* @param p2 various bitmasked elements
- * - p2 = 0 - aircraft goes to the depot and stays there (user command)
- * - p2 (bit 16) - aircraft will try to goto a depot, but not stop there (eg autorenew or autoreplace)
- * - p2 (bit 17) - aircraft will try to goto a depot at the airport specified by low word of p2 XXX - Not Used
+ * - p2 bit 0 - aircraft will try to goto a hangar, but not stop there (service only)
+ * - p2 bit 1 - aircraft will try to locate another airport with a hangar if the target airport lacks one (used by helicopters for autorenew and autoreplace)
*/
int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
@@ -516,14 +515,13 @@ int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
} else {
bool next_airport_has_hangar = true;
/* If bit 17 is set, next airport is specified by low word of p2, otherwise it's the target airport */
- /* XXX - I don't think p2 is any valid station cause all calls use either 0, 1, or 1<<16!!!!!!!!! */
- StationID next_airport_index = (HASBIT(p2, 17)) ? (StationID)p2 : v->u.air.targetairport;
+ StationID next_airport_index = v->u.air.targetairport;
const Station *st = GetStation(next_airport_index);
/* If the station is not a valid airport or if it has no hangars */
if (!IsValidStation(st) || st->airport_tile == 0 || GetAirport(st->airport_type)->nof_depots == 0) {
StationID station;
- if (p2 != 0) return CMD_ERROR;
+ if (!HASBIT(p2, 1)) return CMD_ERROR;
// the aircraft has to search for a hangar on its own
station = FindNearestHangar(v);
@@ -536,7 +534,8 @@ int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
if (flags & DC_EXEC) {
v->current_order.type = OT_GOTO_DEPOT;
- v->current_order.flags = HASBIT(p2, 16) ? 0 : OF_NON_STOP | OF_FULL_LOAD;
+ v->current_order.flags = OF_NON_STOP;
+ if (!HASBIT(p2,0)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
v->current_order.dest.station = next_airport_index;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
if (HASBIT(p2, 17) || (p2 == 0 && v->u.air.state == FLYING && !next_airport_has_hangar)) {
@@ -1593,7 +1592,7 @@ static void AircraftEventHandler_HeliTakeOff(Vehicle *v, const AirportFTAClass *
HASBIT(GetEngine(v->engine_type)->player_avail, _local_player))
)) {
_current_player = _local_player;
- DoCommandP(v->tile, v->index, 1 << 16, NULL, CMD_SEND_AIRCRAFT_TO_HANGAR | CMD_SHOW_NO_ERROR);
+ DoCommandP(v->tile, v->index, 3, NULL, CMD_SEND_AIRCRAFT_TO_HANGAR | CMD_SHOW_NO_ERROR);
_current_player = OWNER_NONE;
}
}
@@ -1655,9 +1654,9 @@ static void AircraftEventHandler_Landing(Vehicle *v, const AirportFTAClass *Airp
// only the vehicle owner needs to calculate the rest (locally)
if (EngineHasReplacementForPlayer(p, v->engine_type) ||
(p->engine_renew && v->age - v->max_age > (p->engine_renew_months * 30))) {
- // send the aircraft to the hangar at next airport (bit 17 set)
+ // send the aircraft to the hangar at next airport
_current_player = _local_player;
- DoCommandP(v->tile, v->index, 1 << 16, NULL, CMD_SEND_AIRCRAFT_TO_HANGAR | CMD_SHOW_NO_ERROR);
+ DoCommandP(v->tile, v->index, 1, NULL, CMD_SEND_AIRCRAFT_TO_HANGAR | CMD_SHOW_NO_ERROR);
_current_player = OWNER_NONE;
}
}
diff --git a/aircraft_gui.c b/aircraft_gui.c
index 4134a2e89..05fc7cd83 100644
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -557,7 +557,11 @@ static void AircraftViewWndProc(Window *w, WindowEvent *e)
/* Aircrafts always go to a station, even if you say depot */
SetDParam(0, v->current_order.dest.station);
SetDParam(1, v->cur_speed * 128 / 10);
- str = STR_HEADING_FOR_HANGAR + _patches.vehicle_speed;
+ if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
+ str = STR_HEADING_FOR_HANGAR + _patches.vehicle_speed;
+ } else {
+ str = STR_HEADING_FOR_HANGAR_SERVICE + _patches.vehicle_speed;
+ }
} break;
case OT_LOADING:
@@ -592,7 +596,7 @@ static void AircraftViewWndProc(Window *w, WindowEvent *e)
ScrollMainWindowTo(v->x_pos, v->y_pos);
break;
case 7: /* goto hangar */
- DoCommandP(v->tile, v->index, 0, NULL, CMD_SEND_AIRCRAFT_TO_HANGAR | CMD_MSG(STR_A012_CAN_T_SEND_AIRCRAFT_TO));
+ DoCommandP(v->tile, v->index, _ctrl_pressed ? 1 : 0, NULL, CMD_SEND_AIRCRAFT_TO_HANGAR | CMD_MSG(STR_A012_CAN_T_SEND_AIRCRAFT_TO));
break;
case 8: /* refit */
ShowAircraftRefitWindow(v);
diff --git a/lang/english.txt b/lang/english.txt
index 442a65334..7228f124f 100644
--- a/lang/english.txt
+++ b/lang/english.txt
@@ -2456,8 +2456,10 @@ STR_SERVICE_AT_TRAIN_DEPOT :Service at {TOW
STR_880F_GO_NON_STOP_TO_TRAIN_DEPOT :Go non-stop to {TOWN} Train Depot
STR_SERVICE_NON_STOP_AT_TRAIN_DEPOT :Service non-stop at {TOWN} Train Depot
-STR_HEADING_FOR_TRAIN_DEPOT :{LTBLUE}Heading for {TOWN} Train Depot
-STR_HEADING_FOR_TRAIN_DEPOT_VEL :{LTBLUE}Heading for {TOWN} Train Depot, {VELOCITY}
+STR_HEADING_FOR_TRAIN_DEPOT :{LTBLUE}Heading for {RED}{TOWN} Train Depot
+STR_HEADING_FOR_TRAIN_DEPOT_VEL :{LTBLUE}Heading for {RED}{TOWN} Train Depot{LTBLUE}, {VELOCITY}
+STR_HEADING_FOR_TRAIN_DEPOT_SERVICE :{LTBLUE}Heading for {GREEN}{TOWN} Train Depot
+STR_HEADING_FOR_TRAIN_DEPOT_SERVICE_VEL :{LTBLUE}Heading for {GREEN}{TOWN} Train Depot{LTBLUE}, {VELOCITY}
STR_INVALID_ORDER :{RED} (Invalid Order)
@@ -2521,10 +2523,10 @@ STR_8842_CENTER_MAIN_VIEW_ON_TRAIN :{BLACK}Centre m
STR_8843_TRAIN_VEHICLE_SELECTION :{BLACK}Train vehicle selection list - click on vehicle for information
STR_8844_BUILD_THE_HIGHLIGHTED_TRAIN :{BLACK}Build the highlighted train vehicle
STR_8845_RENAME_TRAIN_VEHICLE_TYPE :{BLACK}Rename train vehicle type
-STR_8846_CURRENT_TRAIN_ACTION_CLICK :{BLACK}Current train action - click here to stop/start train
+STR_8846_CURRENT_TRAIN_ACTION_CLICK :{BLACK}Current train action - click here to stop/start train{}{RED}Red depot names{BLACK}: Stay in depot{}{GREEN}Green depot names{BLACK}: Service only
STR_8847_SHOW_TRAIN_S_ORDERS :{BLACK}Show train's orders
STR_8848_CENTER_MAIN_VIEW_ON_TRAIN :{BLACK}Centre main view on train's location
-STR_8849_SEND_TRAIN_TO_DEPOT :{BLACK}Send train to depot
+STR_8849_SEND_TRAIN_TO_DEPOT :{BLACK}Send train to depot and stop it there{}Control click will make the train get service only and leave right away
STR_884A_FORCE_TRAIN_TO_PROCEED :{BLACK}Force train to proceed without waiting for signal to clear it
STR_884B_REVERSE_DIRECTION_OF_TRAIN :{BLACK}Reverse direction of train
STR_884C_SHOW_TRAIN_DETAILS :{BLACK}Show train details
@@ -2590,16 +2592,18 @@ STR_9013_MUST_BE_STOPPED_INSIDE :{WHITE}...must
STR_9014_CAN_T_SELL_ROAD_VEHICLE :{WHITE}Can't sell road vehicle...
STR_9015_CAN_T_STOP_START_ROAD_VEHICLE :{WHITE}Can't stop/start road vehicle...
STR_9016_ROAD_VEHICLE_IS_WAITING :{WHITE}Road vehicle {COMMA} is waiting in depot
-STR_HEADING_FOR_ROAD_DEPOT :{LTBLUE}Heading for {TOWN} Road Depot
-STR_HEADING_FOR_ROAD_DEPOT_VEL :{LTBLUE}Heading for {TOWN} Road Depot, {VELOCITY}
+STR_HEADING_FOR_ROAD_DEPOT :{LTBLUE}Heading for {RED}{TOWN} Road Depot
+STR_HEADING_FOR_ROAD_DEPOT_VEL :{LTBLUE}Heading for {RED}{TOWN} Road Depot{LTBLUE}, {VELOCITY}
+STR_HEADING_FOR_ROAD_DEPOT_SERVICE :{LTBLUE}Heading for {GREEN}{TOWN} Road Depot
+STR_HEADING_FOR_ROAD_DEPOT_SERVICE_VEL :{LTBLUE}Heading for {GREEN}{TOWN} Road Depot{LTBLUE}, {VELOCITY}
STR_9018_CAN_T_SEND_VEHICLE_TO_DEPOT :{WHITE}Can't send vehicle to depot...
STR_9019_UNABLE_TO_FIND_LOCAL_DEPOT :{WHITE}Unable to find local depot
STR_901A_ROAD_VEHICLES_CLICK_ON :{BLACK}Road vehicles - click on vehicle for information
STR_901B_BUILD_NEW_ROAD_VEHICLES :{BLACK}Build new road vehicles (requires road vehicle depot)
-STR_901C_CURRENT_VEHICLE_ACTION :{BLACK}Current vehicle action - click here to stop/start vehicle
+STR_901C_CURRENT_VEHICLE_ACTION :{BLACK}Current vehicle action - click here to stop/start vehicle{}{RED}Red depot names{BLACK}: Stay in depot{}{GREEN}Green depot names{BLACK}: Service only
STR_901D_SHOW_VEHICLE_S_ORDERS :{BLACK}Show vehicle's orders
STR_901E_CENTER_MAIN_VIEW_ON_VEHICLE :{BLACK}Centre main view on vehicle's location
-STR_901F_SEND_VEHICLE_TO_DEPOT :{BLACK}Send vehicle to depot
+STR_901F_SEND_VEHICLE_TO_DEPOT :{BLACK}Send vehicle to depot and stop it there{}Control click will make the vehicle get service only and leave right away
STR_9020_FORCE_VEHICLE_TO_TURN_AROUND :{BLACK}Force vehicle to turn around
STR_9021_SHOW_ROAD_VEHICLE_DETAILS :{BLACK}Show road vehicle details
STR_9022_VEHICLES_CLICK_ON_VEHICLE :{BLACK}Vehicles - click on vehicle for information
@@ -2660,8 +2664,10 @@ STR_9817_CAPACITY :{BLACK}Capacity
STR_9818_CAN_T_STOP_START_SHIP :{WHITE}Can't stop/start ship...
STR_9819_CAN_T_SEND_SHIP_TO_DEPOT :{WHITE}Can't send ship to depot...
STR_981A_UNABLE_TO_FIND_LOCAL_DEPOT :{WHITE}Unable to find local depot
-STR_HEADING_FOR_SHIP_DEPOT :{LTBLUE}Heading for {TOWN} Ship Depot
-STR_HEADING_FOR_SHIP_DEPOT_VEL :{LTBLUE}Heading for {TOWN} Ship Depot, {VELOCITY}
+STR_HEADING_FOR_SHIP_DEPOT :{LTBLUE}Heading for {RED}{TOWN} Ship Depot
+STR_HEADING_FOR_SHIP_DEPOT_VEL :{LTBLUE}Heading for {RED}{TOWN} Ship Depot{LTBLUE}, {VELOCITY}
+STR_HEADING_FOR_SHIP_DEPOT_SERVICE :{LTBLUE}Heading for {GREEN}{TOWN} Ship Depot
+STR_HEADING_FOR_SHIP_DEPOT_SERVICE_VEL :{LTBLUE}Heading for {GREEN}{TOWN} Ship Depot{LTBLUE}, {VELOCITY}
STR_981C_SHIP_IS_WAITING_IN_DEPOT :{WHITE}Ship {COMMA} is waiting in depot
STR_981D_BUILD_SHIP_DOCK :{BLACK}Build ship dock
STR_981E_BUILD_SHIP_DEPOT_FOR_BUILDING :{BLACK}Build ship depot (for building and servicing ships)
@@ -2673,10 +2679,10 @@ STR_9823_SHIPS_CLICK_ON_SHIP_FOR :{BLACK}Ships -
STR_9824_BUILD_NEW_SHIPS_REQUIRES :{BLACK}Build new ships (requires ship depot)
STR_9825_SHIP_SELECTION_LIST_CLICK :{BLACK}Ship selection list - click on ship for information
STR_9826_BUILD_THE_HIGHLIGHTED_SHIP :{BLACK}Build the highlighted ship
-STR_9827_CURRENT_SHIP_ACTION_CLICK :{BLACK}Current ship action - click here to stop/start ship
+STR_9827_CURRENT_SHIP_ACTION_CLICK :{BLACK}Current ship action - click here to stop/start ship{}{RED}Red depot names{BLACK}: Stay in depot{}{GREEN}Green depot names{BLACK}: Service only
STR_9828_SHOW_SHIP_S_ORDERS :{BLACK}Show ship's orders
STR_9829_CENTER_MAIN_VIEW_ON_SHIP :{BLACK}Centre main view on ship's location
-STR_982A_SEND_SHIP_TO_DEPOT :{BLACK}Send ship to depot
+STR_982A_SEND_SHIP_TO_DEPOT :{BLACK}Send ship to depot and stop it there{}Control click will make the ship get service only and leave right away
STR_982B_SHOW_SHIP_DETAILS :{BLACK}Show ship details
STR_982C_NEW_SHIP_NOW_AVAILABLE :{BLACK}{BIGFONT}New ship now available!
STR_982D :{BLACK}{BIGFONT}{STRING}
@@ -2725,8 +2731,10 @@ STR_A00F_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Profit t
STR_A010_RELIABILITY_BREAKDOWNS :{BLACK}Reliability: {LTBLUE}{COMMA}% {BLACK}Breakdowns since last service: {LTBLUE}{COMMA}
STR_A011_BUILT_VALUE :{LTBLUE}{STRING}{BLACK} Built: {LTBLUE}{NUM}{BLACK} Value: {LTBLUE}{CURRENCY}
STR_A012_CAN_T_SEND_AIRCRAFT_TO :{WHITE}Can't send aircraft to hangar...
-STR_HEADING_FOR_HANGAR :{LTBLUE}Heading for {STATION} Hangar
-STR_HEADING_FOR_HANGAR_VEL :{LTBLUE}Heading for {STATION} Hangar, {VELOCITY}
+STR_HEADING_FOR_HANGAR :{LTBLUE}Heading for {RED}{TOWN} Hangar
+STR_HEADING_FOR_HANGAR_VEL :{LTBLUE}Heading for {RED}{TOWN} Hangar{LTBLUE}, {VELOCITY}
+STR_HEADING_FOR_HANGAR_SERVICE :{LTBLUE}Heading for {GREEN}{TOWN} Hangar
+STR_HEADING_FOR_HANGAR_SERVICE_VEL :{LTBLUE}Heading for {GREEN}{TOWN} Hangar{LTBLUE}, {VELOCITY}
STR_A014_AIRCRAFT_IS_WAITING_IN :{WHITE}Aircraft {COMMA} is waiting in the aircraft hangar
STR_A015_AIRCRAFT_IN_THE_WAY :{WHITE}Aircraft in the way
STR_A016_CAN_T_STOP_START_AIRCRAFT :{WHITE}Can't stop/start aircraft...
@@ -2745,10 +2753,10 @@ STR_A023_DRAG_AIRCRAFT_TO_HERE_TO :{BLACK}Drag air
STR_A024_CENTER_MAIN_VIEW_ON_HANGAR :{BLACK}Centre main view on hangar location
STR_A025_AIRCRAFT_SELECTION_LIST :{BLACK}Aircraft selection list - click on aircraft for information
STR_A026_BUILD_THE_HIGHLIGHTED_AIRCRAFT :{BLACK}Build the highlighted aircraft
-STR_A027_CURRENT_AIRCRAFT_ACTION :{BLACK}Current aircraft action - click here to stop/start aircraft
+STR_A027_CURRENT_AIRCRAFT_ACTION :{BLACK}Current aircraft action - click here to stop/start aircraft{}{RED}Red hangar names{BLACK}: Stay in depot{}{GREEN}Green hangar names{BLACK}: Service only
STR_A028_SHOW_AIRCRAFT_S_ORDERS :{BLACK}Show aircraft's orders
STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT :{BLACK}Centre main view on aircraft's location
-STR_A02A_SEND_AIRCRAFT_TO_HANGAR :{BLACK}Send aircraft to hangar
+STR_A02A_SEND_AIRCRAFT_TO_HANGAR :{BLACK}Send aircraft to hangar and stop it there{}Control click will make the aircraft get service only and leave right away
STR_A02B_SHOW_AIRCRAFT_DETAILS :{BLACK}Show aircraft details
STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE :{BLACK}{BIGFONT}New aircraft now available!
STR_A02D :{BLACK}{BIGFONT}{STRING}
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 406c55269..289a56a36 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -357,7 +357,7 @@ static const Depot* FindClosestRoadDepot(const Vehicle* v)
/** Send a road vehicle to the depot.
* @param tile unused
* @param p1 vehicle ID to send to the depot
- * @param p2 unused
+ * @param p2 if bit 0 is set, then the road vehicle will only service at the depot. 0 Makes it stop inside
*/
int32 CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
@@ -393,7 +393,8 @@ int32 CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (flags & DC_EXEC) {
ClearSlot(v);
v->current_order.type = OT_GOTO_DEPOT;
- v->current_order.flags = OF_NON_STOP | OF_HALT_IN_DEPOT;
+ v->current_order.flags = OF_NON_STOP;
+ if (!HASBIT(p2,0)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
v->current_order.dest.depot = dep->index;
v->dest_tile = dep->xy;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
diff --git a/roadveh_gui.c b/roadveh_gui.c
index a60d5d125..64bddc8a0 100644
--- a/roadveh_gui.c
+++ b/roadveh_gui.c
@@ -343,7 +343,11 @@ static void RoadVehViewWndProc(Window *w, WindowEvent *e)
Depot *depot = GetDepot(v->current_order.dest.depot);
SetDParam(0, depot->town_index);
SetDParam(1, v->cur_speed / 2);
- str = STR_HEADING_FOR_ROAD_DEPOT + _patches.vehicle_speed;
+ if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
+ str = STR_HEADING_FOR_ROAD_DEPOT + _patches.vehicle_speed;
+ } else {
+ str = STR_HEADING_FOR_ROAD_DEPOT_SERVICE + _patches.vehicle_speed;
+ }
} break;
case OT_LOADING:
@@ -379,7 +383,7 @@ static void RoadVehViewWndProc(Window *w, WindowEvent *e)
ScrollMainWindowTo(v->x_pos, v->y_pos);
break;
case 7: /* goto depot */
- DoCommandP(v->tile, v->index, 0, NULL, CMD_SEND_ROADVEH_TO_DEPOT | CMD_MSG(STR_9018_CAN_T_SEND_VEHICLE_TO_DEPOT));
+ DoCommandP(v->tile, v->index, _ctrl_pressed ? 1 : 0, NULL, CMD_SEND_ROADVEH_TO_DEPOT | CMD_MSG(STR_9018_CAN_T_SEND_VEHICLE_TO_DEPOT));
break;
case 8: /* turn around */
DoCommandP(v->tile, v->index, 0, NULL, CMD_TURN_ROADVEH | CMD_MSG(STR_9033_CAN_T_MAKE_VEHICLE_TURN));
diff --git a/ship_cmd.c b/ship_cmd.c
index 4fceb3da3..94eeab5a6 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -995,7 +995,7 @@ int32 CmdStartStopShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/** Send a ship to the depot.
* @param tile unused
* @param p1 vehicle ID to send to the depot
- * @param p2 unused
+ * @param p2 p2 if bit 0 is set, then the ship will only service at the depot. 0 Makes it stop inside
*/
int32 CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
@@ -1032,7 +1032,8 @@ int32 CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (flags & DC_EXEC) {
v->dest_tile = dep->xy;
v->current_order.type = OT_GOTO_DEPOT;
- v->current_order.flags = OF_NON_STOP | OF_HALT_IN_DEPOT;
+ v->current_order.flags = OF_NON_STOP;
+ if (!HASBIT(p2,0)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
v->current_order.dest.depot = dep->index;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
}
diff --git a/ship_gui.c b/ship_gui.c
index 842a57c0f..bcaa8869d 100644
--- a/ship_gui.c
+++ b/ship_gui.c
@@ -490,7 +490,11 @@ static void ShipViewWndProc(Window *w, WindowEvent *e)
Depot *depot = GetDepot(v->current_order.dest.depot);
SetDParam(0, depot->town_index);
SetDParam(1, v->cur_speed / 2);
- str = STR_HEADING_FOR_SHIP_DEPOT + _patches.vehicle_speed;
+ if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
+ str = STR_HEADING_FOR_SHIP_DEPOT + _patches.vehicle_speed;
+ } else {
+ str = STR_HEADING_FOR_SHIP_DEPOT_SERVICE + _patches.vehicle_speed;
+ }
} break;
case OT_LOADING:
@@ -526,7 +530,7 @@ static void ShipViewWndProc(Window *w, WindowEvent *e)
ScrollMainWindowTo(v->x_pos, v->y_pos);
break;
case 7: /* goto hangar */
- DoCommandP(v->tile, v->index, 0, NULL, CMD_SEND_SHIP_TO_DEPOT | CMD_MSG(STR_9819_CAN_T_SEND_SHIP_TO_DEPOT));
+ DoCommandP(v->tile, v->index, _ctrl_pressed ? 1 : 0, NULL, CMD_SEND_SHIP_TO_DEPOT | CMD_MSG(STR_9819_CAN_T_SEND_SHIP_TO_DEPOT));
break;
case 8: /* refit */
ShowShipRefitWindow(v);
diff --git a/train_cmd.c b/train_cmd.c
index 468bcdba6..eb6c035f2 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1924,7 +1924,7 @@ static TrainFindDepotData FindClosestTrainDepot(Vehicle *v, int max_distance)
/** Send a train to a depot
* @param tile unused
* @param p1 train to send to the depot
- * @param p2 unused
+ * @param p2 if bit 0 is set, then the train will only service at the depot. 0 Makes it stop inside
*/
int32 CmdSendTrainToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
@@ -1960,7 +1960,8 @@ int32 CmdSendTrainToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (flags & DC_EXEC) {
v->dest_tile = tfdd.tile;
v->current_order.type = OT_GOTO_DEPOT;
- v->current_order.flags = OF_NON_STOP | OF_FULL_LOAD;
+ v->current_order.flags = OF_NON_STOP;
+ if (!HASBIT(p2,0)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
v->current_order.dest.depot = GetDepotByTile(tfdd.tile)->index;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
/* If there is no depot in front, reverse automatically */
diff --git a/train_gui.c b/train_gui.c
index 04e92e56f..609434199 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -975,7 +975,11 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
case OT_GOTO_DEPOT: {
Depot *dep = GetDepot(v->current_order.dest.depot);
SetDParam(0, dep->town_index);
- str = STR_HEADING_FOR_TRAIN_DEPOT + _patches.vehicle_speed;
+ if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
+ str = STR_HEADING_FOR_TRAIN_DEPOT + _patches.vehicle_speed;
+ } else {
+ str = STR_HEADING_FOR_TRAIN_DEPOT_SERVICE + _patches.vehicle_speed;
+ }
SetDParam(1, v->u.rail.last_speed);
} break;
@@ -1021,7 +1025,7 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
break;
case 7: /* goto depot */
/* TrainGotoDepot has a nice randomizer in the pathfinder, which causes desyncs... */
- DoCommandP(v->tile, v->index, 0, NULL, CMD_TRAIN_GOTO_DEPOT | CMD_NO_TEST_IF_IN_NETWORK | CMD_MSG(STR_8830_CAN_T_SEND_TRAIN_TO_DEPOT));
+ DoCommandP(v->tile, v->index, _ctrl_pressed ? 1 : 0, NULL, CMD_TRAIN_GOTO_DEPOT | CMD_NO_TEST_IF_IN_NETWORK | CMD_MSG(STR_8830_CAN_T_SEND_TRAIN_TO_DEPOT));
break;
case 8: /* force proceed */
DoCommandP(v->tile, v->index, 0, NULL, CMD_FORCE_TRAIN_PROCEED | CMD_MSG(STR_8862_CAN_T_MAKE_TRAIN_PASS_SIGNAL));