diff options
author | rubidium <rubidium@openttd.org> | 2009-07-22 20:17:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-22 20:17:07 +0000 |
commit | 2962d8f0fc12699e2e952128c8f85b297c79e6b8 (patch) | |
tree | 05e8598bbad6f942ed1dd9a98823ea79cf41f175 | |
parent | c17c31b5b69d982f11859772fc4f2c9acef41555 (diff) | |
download | openttd-2962d8f0fc12699e2e952128c8f85b297c79e6b8.tar.xz |
(svn r16920) -Codechange: shuffle some strings around to simplify looking up vehicle type specific strings for a specific message
-rw-r--r-- | src/build_vehicle_gui.cpp | 68 | ||||
-rw-r--r-- | src/depot_gui.cpp | 116 | ||||
-rw-r--r-- | src/group_gui.cpp | 15 | ||||
-rw-r--r-- | src/lang/english.txt | 383 | ||||
-rw-r--r-- | src/rail_cmd.cpp | 2 | ||||
-rw-r--r-- | src/vehicle.cpp | 26 | ||||
-rw-r--r-- | src/vehicle_cmd.cpp | 18 | ||||
-rw-r--r-- | src/vehicle_func.h | 1 | ||||
-rw-r--r-- | src/vehicle_gui.cpp | 164 |
9 files changed, 272 insertions, 521 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 76c5ccbb3..6213f884d 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -872,45 +872,14 @@ struct BuildVehicleWindow : Window { /* Setup widget strings to fit the different types of vehicles */ void SetupWindowStrings(VehicleType type) { - switch (type) { - default: NOT_REACHED(); - - case VEH_TRAIN: - this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = this->listview_mode ? STR_AVAILABLE_TRAINS : STR_JUST_STRING; - this->widget[BUILD_VEHICLE_WIDGET_LIST].tooltips = STR_BUILD_VEHICLE_TRAIN_LIST_TOOLTIP; - this->widget[BUILD_VEHICLE_WIDGET_BUILD].data = STR_BUILD_VEHICLE_TRAIN_BUILD_VEHICLE_BUTTON; - this->widget[BUILD_VEHICLE_WIDGET_BUILD].tooltips = STR_BUILD_VEHICLE_TRAIN_BUILD_VEHICLE_TOOLTIP; - this->widget[BUILD_VEHICLE_WIDGET_RENAME].data = STR_BUILD_VEHICLE_TRAIN_RENAME_BUTTON; - this->widget[BUILD_VEHICLE_WIDGET_RENAME].tooltips = STR_BUILD_VEHICLE_TRAIN_RENAME_TOOLTIP; - break; - - case VEH_ROAD: - this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = this->listview_mode ? STR_AVAILABLE_ROAD_VEHICLES : STR_BUILD_VEHICLE_ROAD_CAPTION; - this->widget[BUILD_VEHICLE_WIDGET_LIST].tooltips = STR_BUILD_VEHICLE_ROAD_LIST_TOOLTIP; - this->widget[BUILD_VEHICLE_WIDGET_BUILD].data = STR_BUILD_VEHICLE_ROAD_BUILD_VEHICLE_BUTTON; - this->widget[BUILD_VEHICLE_WIDGET_BUILD].tooltips = STR_BUILD_VEHICLE_ROAD_BUILD_VEHICLE_TOOLTIP; - this->widget[BUILD_VEHICLE_WIDGET_RENAME].data = STR_BUILD_VEHICLE_ROAD_VEHICLE_RENAME_BUTTON; - this->widget[BUILD_VEHICLE_WIDGET_RENAME].tooltips = STR_BUILD_VEHICLE_ROAD_VEHICLE_RENAME_TOOLTIP; - break; - - case VEH_SHIP: - this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = this->listview_mode ? STR_AVAILABLE_SHIPS : STR_BUILD_VEHICLE_SHIP_CAPTION; - this->widget[BUILD_VEHICLE_WIDGET_LIST].tooltips = STR_BUILD_VEHICLE_SHIP_LIST_TOOLTIP; - this->widget[BUILD_VEHICLE_WIDGET_BUILD].data = STR_BUILD_VEHICLE_SHIP_BUILD_VEHICLE_BUTTON; - this->widget[BUILD_VEHICLE_WIDGET_BUILD].tooltips = STR_BUILD_VEHICLE_SHIP_BUILD_VEHICLE_TOOLTIP; - this->widget[BUILD_VEHICLE_WIDGET_RENAME].data = STR_BUILD_VEHICLE_SHIP_RENAME_BUTTON; - this->widget[BUILD_VEHICLE_WIDGET_RENAME].tooltips = STR_BUILD_VEHICLE_SHIP_RENAME_TOOLTIP; - break; - - case VEH_AIRCRAFT: - this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = this->listview_mode ? STR_AVAILABLE_AIRCRAFT : STR_BUILD_VEHICLE_AIRCRAFT_CAPTION; - this->widget[BUILD_VEHICLE_WIDGET_LIST].tooltips = STR_BUILD_VEHICLE_AIRCRAFT_LIST_TOOLTIP; - this->widget[BUILD_VEHICLE_WIDGET_BUILD].data = STR_BUILD_VEHICLE_AIRCRAFT_BUILD_VEHICLE_BUTTON; - this->widget[BUILD_VEHICLE_WIDGET_BUILD].tooltips = STR_BUILD_VEHICLE_AIRCRAFT_BUILD_VEHICLE_TOOLTIP; - this->widget[BUILD_VEHICLE_WIDGET_RENAME].data = STR_BUILD_VEHICLE_AIRCRAFT_RENAME_BUTTON; - this->widget[BUILD_VEHICLE_WIDGET_RENAME].tooltips = STR_BUILD_VEHICLE_AIRCRAFT_RENAME_TOOLTIP; - break; - } + this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = (this->listview_mode ? STR_AVAILABLE_TRAINS : STR_BUILD_VEHICLE_TRAIN_ALL_CAPTION) + type; + this->widget[BUILD_VEHICLE_WIDGET_LIST].tooltips = STR_BUILD_VEHICLE_TRAIN_LIST_TOOLTIP + type; + this->widget[BUILD_VEHICLE_WIDGET_BUILD].data = STR_BUILD_VEHICLE_TRAIN_BUILD_VEHICLE_BUTTON + type; + this->widget[BUILD_VEHICLE_WIDGET_BUILD].tooltips = STR_BUILD_VEHICLE_TRAIN_BUILD_VEHICLE_TOOLTIP + type; + this->widget[BUILD_VEHICLE_WIDGET_RENAME].data = STR_BUILD_VEHICLE_TRAIN_RENAME_BUTTON + type; + this->widget[BUILD_VEHICLE_WIDGET_RENAME].tooltips = STR_BUILD_VEHICLE_TRAIN_RENAME_TOOLTIP + type; + + if (type == VEH_TRAIN && this->listview_mode) this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = STR_JUST_STRING; } /** Filter the engine list against the currently selected cargo filter */ @@ -1129,18 +1098,9 @@ struct BuildVehicleWindow : Window { case BUILD_VEHICLE_WIDGET_RENAME: { EngineID sel_eng = this->sel_engine; if (sel_eng != INVALID_ENGINE) { - StringID str = STR_NULL; - this->rename_engine = sel_eng; - switch (this->vehicle_type) { - default: NOT_REACHED(); - case VEH_TRAIN: str = STR_QUERY_RENAME_TRAIN_TYPE_CAPTION; break; - case VEH_ROAD: str = STR_QUERY_RENAME_ROAD_VEHICLE_TYPE_CAPTION; break; - case VEH_SHIP: str = STR_QUERY_RENAME_SHIP_TYPE_CAPTION; break; - case VEH_AIRCRAFT: str = STR_QUERY_RENAME_AIRCRAFT_TYPE_CAPTION; break; - } SetDParam(0, sel_eng); - ShowQueryString(STR_ENGINE_NAME, str, MAX_LENGTH_ENGINE_NAME_BYTES, MAX_LENGTH_ENGINE_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT); + ShowQueryString(STR_ENGINE_NAME, STR_QUERY_RENAME_TRAIN_TYPE_CAPTION + this->vehicle_type, MAX_LENGTH_ENGINE_NAME_BYTES, MAX_LENGTH_ENGINE_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT); } break; } @@ -1204,15 +1164,7 @@ struct BuildVehicleWindow : Window { { if (str == NULL) return; - StringID err_str = STR_NULL; - switch (this->vehicle_type) { - default: NOT_REACHED(); - case VEH_TRAIN: err_str = STR_ERROR_CAN_T_RENAME_TRAIN_TYPE; break; - case VEH_ROAD: err_str = STR_ERROR_CAN_T_RENAME_ROAD_VEHICLE_TYPE; break; - case VEH_SHIP: err_str = STR_ERROR_CAN_T_RENAME_SHIP_TYPE; break; - case VEH_AIRCRAFT: err_str = STR_ERROR_CAN_T_RENAME_AIRCRAFT_TYPE; break; - } - DoCommandP(0, this->rename_engine, 0, CMD_RENAME_ENGINE | CMD_MSG(err_str), NULL, str); + DoCommandP(0, this->rename_engine, 0, CMD_RENAME_ENGINE | CMD_MSG(STR_ERROR_CAN_T_RENAME_TRAIN_TYPE + this->vehicle_type), NULL, str); } virtual void OnDropdownSelect(int widget, int index) diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 14dea3296..8a1ecdcc1 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -553,9 +553,7 @@ struct DepotWindow : Window { */ void HandleCloneVehClick(const Vehicle *v) { - StringID error_str; - - if (v == NULL) return; + if (v == NULL || !IsCompanyBuildableVehicleType(v)) return; if (!v->IsPrimaryVehicle()) { v = v->First(); @@ -563,15 +561,7 @@ struct DepotWindow : Window { if (v->type == VEH_TRAIN && !Train::From(v)->IsFrontEngine()) return; } - switch (v->type) { - case VEH_TRAIN: error_str = STR_ERROR_CAN_T_BUILD_TRAIN; break; - case VEH_ROAD: error_str = STR_ERROR_CAN_T_BUILD_ROAD_VEHICLE; break; - case VEH_SHIP: error_str = STR_ERROR_CAN_T_BUILD_SHIP; break; - case VEH_AIRCRAFT: error_str = STR_ERROR_CAN_T_BUILD_AIRCRAFT; break; - default: return; - } - - DoCommandP(this->window_number, v->index, _ctrl_pressed ? 1 : 0, CMD_CLONE_VEHICLE | CMD_MSG(error_str), CcCloneVehicle); + DoCommandP(this->window_number, v->index, _ctrl_pressed ? 1 : 0, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUILD_TRAIN + v->type), CcCloneVehicle); ResetObjectToPlace(); } @@ -583,7 +573,7 @@ struct DepotWindow : Window { if (this->type == VEH_TRAIN) { /* Divide the size of DEPOT_WIDGET_SELL into two equally big buttons so DEPOT_WIDGET_SELL and DEPOT_WIDGET_SELL_CHAIN will get the same size. * This way it will stay the same even if DEPOT_WIDGET_SELL_CHAIN is resized for some reason */ - this->widget[DEPOT_WIDGET_SELL_CHAIN].top = ((this->widget[DEPOT_WIDGET_SELL_CHAIN].bottom - this->widget[DEPOT_WIDGET_SELL].top) / 2) + this->widget[DEPOT_WIDGET_SELL].top; + this->widget[DEPOT_WIDGET_SELL_CHAIN].top = ((this->widget[DEPOT_WIDGET_SELL_CHAIN].bottom - this->widget[DEPOT_WIDGET_SELL].top) / 2) + this->widget[DEPOT_WIDGET_SELL].top; this->widget[DEPOT_WIDGET_SELL].bottom = this->widget[DEPOT_WIDGET_SELL_CHAIN].top - 1; } } @@ -594,25 +584,26 @@ struct DepotWindow : Window { */ void SetupStringsForDepotWindow(VehicleType type) { + this->widget[DEPOT_WIDGET_CAPTION].data = STR_DEPOT_TRAIN_CAPTION + type; + this->widget[DEPOT_WIDGET_STOP_ALL].tooltips = STR_MASS_STOP_DEPOT_TRAIN_TIP + type; + this->widget[DEPOT_WIDGET_START_ALL].tooltips = STR_MASS_START_DEPOT_TRAIN_TIP + type; + this->widget[DEPOT_WIDGET_SELL].tooltips = STR_DEPOT_TRAIN_SELL_TOOLTIP + type; + this->widget[DEPOT_WIDGET_SELL_ALL].tooltips = STR_DEPOT_SELL_ALL_BUTTON_TRAIN_TIP + type; + + this->widget[DEPOT_WIDGET_BUILD].data = STR_DEPOT_TRAIN_NEW_VEHICLES_BUTTON + type; + this->widget[DEPOT_WIDGET_BUILD].tooltips = STR_DEPOT_TRAIN_NEW_VEHICLES_TOOLTIP + type; + this->widget[DEPOT_WIDGET_CLONE].data = STR_CLONE_TRAIN + type; + this->widget[DEPOT_WIDGET_CLONE].tooltips = STR_CLONE_TRAIN_DEPOT_INFO + type; + + this->widget[DEPOT_WIDGET_LOCATION].tooltips = STR_DEPOT_TRAIN_LOCATION_TOOLTIP + type; + this->widget[DEPOT_WIDGET_VEHICLE_LIST].tooltips = STR_DEPOT_VEHICLE_ORDER_LIST_TRAIN_TIP + type; + this->widget[DEPOT_WIDGET_AUTOREPLACE].tooltips = STR_DEPOT_AUTOREPLACE_TRAIN_TIP + type; + switch (type) { default: NOT_REACHED(); case VEH_TRAIN: - this->widget[DEPOT_WIDGET_CAPTION].data = STR_DEPOT_TRAIN_CAPTION; - this->widget[DEPOT_WIDGET_STOP_ALL].tooltips = STR_MASS_STOP_DEPOT_TRAIN_TIP; - this->widget[DEPOT_WIDGET_START_ALL].tooltips= STR_MASS_START_DEPOT_TRAIN_TIP; - this->widget[DEPOT_WIDGET_SELL].tooltips = STR_DEPOT_TRAIN_SELL_TOOLTIP; - this->widget[DEPOT_WIDGET_SELL_ALL].tooltips = STR_DEPOT_SELL_ALL_BUTTON_TRAIN_TIP; - - this->widget[DEPOT_WIDGET_BUILD].data = STR_DEPOT_TRAIN_NEW_VEHICLES_BUTTON; - this->widget[DEPOT_WIDGET_BUILD].tooltips = STR_DEPOT_TRAIN_NEW_VEHICLES_TOOLTIP; - this->widget[DEPOT_WIDGET_CLONE].data = STR_CLONE_TRAIN; - this->widget[DEPOT_WIDGET_CLONE].tooltips = STR_CLONE_TRAIN_DEPOT_INFO; - - this->widget[DEPOT_WIDGET_LOCATION].tooltips = STR_DEPOT_TRAIN_LOCATION_TOOLTIP; this->widget[DEPOT_WIDGET_VEHICLE_LIST].data = STR_TRAIN; - this->widget[DEPOT_WIDGET_VEHICLE_LIST].tooltips = STR_DEPOT_VEHICLE_ORDER_LIST_TRAIN_TIP; - this->widget[DEPOT_WIDGET_AUTOREPLACE].tooltips = STR_DEPOT_AUTOREPLACE_TRAIN_TIP; /* Sprites */ this->widget[DEPOT_WIDGET_SELL].data = SPR_SELL_TRAIN; @@ -621,21 +612,7 @@ struct DepotWindow : Window { break; case VEH_ROAD: - this->widget[DEPOT_WIDGET_CAPTION].data = STR_DEPOT_ROAD_CAPTION; - this->widget[DEPOT_WIDGET_STOP_ALL].tooltips = STR_MASS_STOP_DEPOT_ROADVEH_TIP; - this->widget[DEPOT_WIDGET_START_ALL].tooltips= STR_MASS_START_DEPOT_ROADVEH_TIP; - this->widget[DEPOT_WIDGET_SELL].tooltips = STR_DEPOT_ROAD_SELL_TOOLTIP; - this->widget[DEPOT_WIDGET_SELL_ALL].tooltips = STR_DEPOT_SELL_ALL_BUTTON_ROADVEH_TIP; - - this->widget[DEPOT_WIDGET_BUILD].data = STR_DEPOT_ROAD_NEW_VEHICLES_BUTTON; - this->widget[DEPOT_WIDGET_BUILD].tooltips = STR_DEPOT_ROAD_NEW_VEHICLES_TOOLTIP; - this->widget[DEPOT_WIDGET_CLONE].data = STR_CLONE_ROAD_VEHICLE; - this->widget[DEPOT_WIDGET_CLONE].tooltips = STR_CLONE_ROAD_VEHICLE_DEPOT_INFO; - - this->widget[DEPOT_WIDGET_LOCATION].tooltips = STR_DEPOT_ROAD_LOCATION_TOOLTIP; this->widget[DEPOT_WIDGET_VEHICLE_LIST].data = STR_LORRY; - this->widget[DEPOT_WIDGET_VEHICLE_LIST].tooltips = STR_DEPOT_VEHICLE_ORDER_LIST_ROADVEH_TIP; - this->widget[DEPOT_WIDGET_AUTOREPLACE].tooltips = STR_DEPOT_AUTOREPLACE_ROADVEH_TIP; /* Sprites */ this->widget[DEPOT_WIDGET_SELL].data = SPR_SELL_ROADVEH; @@ -644,21 +621,7 @@ struct DepotWindow : Window { break; case VEH_SHIP: - this->widget[DEPOT_WIDGET_CAPTION].data = STR_DEPOT_SHIP_CAPTION; - this->widget[DEPOT_WIDGET_STOP_ALL].tooltips = STR_MASS_STOP_DEPOT_SHIP_TIP; - this->widget[DEPOT_WIDGET_START_ALL].tooltips= STR_MASS_START_DEPOT_SHIP_TIP; - this->widget[DEPOT_WIDGET_SELL].tooltips = STR_DEPOT_SHIP_SELL_TOOLTIP; - this->widget[DEPOT_WIDGET_SELL_ALL].tooltips = STR_DEPOT_SELL_ALL_BUTTON_SHIP_TIP; - - this->widget[DEPOT_WIDGET_BUILD].data = STR_DEPOT_SHIP_NEW_VEHICLES_BUTTON; - this->widget[DEPOT_WIDGET_BUILD].tooltips = STR_DEPOT_SHIP_NEW_VEHICLES_TOOLTIP; - this->widget[DEPOT_WIDGET_CLONE].data = STR_CLONE_SHIP; - this->widget[DEPOT_WIDGET_CLONE].tooltips = STR_CLONE_SHIP_DEPOT_INFO; - - this->widget[DEPOT_WIDGET_LOCATION].tooltips = STR_DEPOT_SHIP_LOCATION_TOOLTIP; this->widget[DEPOT_WIDGET_VEHICLE_LIST].data = STR_SHIP; - this->widget[DEPOT_WIDGET_VEHICLE_LIST].tooltips = STR_DEPOT_VEHICLE_ORDER_LIST_SHIP_TIP; - this->widget[DEPOT_WIDGET_AUTOREPLACE].tooltips = STR_DEPOT_AUTOREPLACE_SHIP_TIP; /* Sprites */ this->widget[DEPOT_WIDGET_SELL].data = SPR_SELL_SHIP; @@ -667,21 +630,7 @@ struct DepotWindow : Window { break; case VEH_AIRCRAFT: - this->widget[DEPOT_WIDGET_CAPTION].data = STR_DEPOT_AIRCRAFT_CAPTION; - this->widget[DEPOT_WIDGET_STOP_ALL].tooltips = STR_MASS_STOP_HANGAR_TIP; - this->widget[DEPOT_WIDGET_START_ALL].tooltips= STR_MASS_START_HANGAR_TIP; - this->widget[DEPOT_WIDGET_SELL].tooltips = STR_DEPOT_AIRCRAFT_SELL_TOOLTIP; - this->widget[DEPOT_WIDGET_SELL_ALL].tooltips = STR_DEPOT_SELL_ALL_BUTTON_AIRCRAFT_TIP; - - this->widget[DEPOT_WIDGET_BUILD].data = STR_DEPOT_AIRCRAFT_NEW_VEHICLES_BUTTON; - this->widget[DEPOT_WIDGET_BUILD].tooltips = STR_DEPOT_AIRCRAFT_NEW_VEHICLES_TOOLTIP; - this->widget[DEPOT_WIDGET_CLONE].data = STR_CLONE_AIRCRAFT; - this->widget[DEPOT_WIDGET_CLONE].tooltips = STR_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW; - - this->widget[DEPOT_WIDGET_LOCATION].tooltips = STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP; this->widget[DEPOT_WIDGET_VEHICLE_LIST].data = STR_PLANE; - this->widget[DEPOT_WIDGET_VEHICLE_LIST].tooltips = STR_DEPOT_VEHICLE_ORDER_LIST_AIRCRAFT_TIP; - this->widget[DEPOT_WIDGET_AUTOREPLACE].tooltips = STR_DEPOT_AUTOREPLACE_AIRCRAFT_TIP; /* Sprites */ this->widget[DEPOT_WIDGET_SELL].data = SPR_SELL_AIRCRAFT; @@ -802,18 +751,12 @@ struct DepotWindow : Window { case DEPOT_WIDGET_SELL_ALL: /* Only open the confimation window if there are anything to sell */ if (this->vehicle_list.Length() != 0 || this->wagon_list.Length() != 0) { - static const StringID confirm_captions[] = { - STR_DEPOT_TRAIN_CAPTION, - STR_DEPOT_ROAD_CAPTION, - STR_DEPOT_SHIP_CAPTION, - STR_DEPOT_AIRCRAFT_CAPTION - }; TileIndex tile = this->window_number; byte vehtype = this->type; SetDParam(0, (vehtype == VEH_AIRCRAFT) ? GetStationIndex(tile) : Depot::GetByTile(tile)->town_index); ShowQuery( - confirm_captions[vehtype], + STR_DEPOT_TRAIN_CAPTION + vehtype, STR_DEPOT_SELL_CONFIRMATION_TEXT, this, DepotSellAllConfirmationCallback @@ -884,15 +827,7 @@ struct DepotWindow : Window { GuiShowTooltips(whole_chain ? STR_DEPOT_VEHICLE_TOOLTIP_CHAIN : STR_DEPOT_VEHICLE_TOOLTIP, 2, args); } else { /* Show tooltip help */ - StringID tooltip = INVALID_STRING_ID; - switch (this->type) { - case VEH_TRAIN: tooltip = STR_DEPOT_TRAIN_LIST_TOOLTIP; break; - case VEH_ROAD: tooltip = STR_DEPOT_ROAD_LIST_TOOLTIP; break; - case VEH_SHIP: tooltip = STR_DEPOT_SHIP_LIST_TOOLTIP; break; - case VEH_AIRCRAFT: tooltip = STR_DEPOT_AIRCRAFT_LIST_TOOLTIP;break; - default: NOT_REACHED(); - } - GuiShowTooltips(tooltip); + GuiShowTooltips(STR_DEPOT_TRAIN_LIST_TOOLTIP + this->type); } } @@ -960,7 +895,6 @@ struct DepotWindow : Window { case DEPOT_WIDGET_SELL: case DEPOT_WIDGET_SELL_CHAIN: if (!this->IsWidgetDisabled(DEPOT_WIDGET_SELL) && this->sel != INVALID_VEHICLE) { - uint command; if (this->IsWidgetDisabled(widget)) return; if (this->sel == INVALID_VEHICLE) return; @@ -980,15 +914,7 @@ struct DepotWindow : Window { BackupVehicleOrders(v); } - switch (v->type) { - case VEH_TRAIN: command = CMD_SELL_RAIL_WAGON | CMD_MSG(STR_ERROR_CAN_T_SELL_RAILROAD_VEHICLE); break; - case VEH_ROAD: command = CMD_SELL_ROAD_VEH | CMD_MSG(STR_ERROR_CAN_T_SELL_ROAD_VEHICLE); break; - case VEH_SHIP: command = CMD_SELL_SHIP | CMD_MSG(STR_ERROR_CAN_T_SELL_SHIP); break; - case VEH_AIRCRAFT: command = CMD_SELL_AIRCRAFT | CMD_MSG(STR_ERROR_CAN_T_SELL_AIRCRAFT); break; - default: NOT_REACHED(); - } - - if (!DoCommandP(v->tile, v->index, sell_cmd, command) && is_engine) _backup_orders_tile = 0; + if (!DoCommandP(v->tile, v->index, sell_cmd, GetCmdSellVeh(v->type) | CMD_MSG(STR_ERROR_CAN_T_SELL_RAILROAD_VEHICLE + v->type)) && is_engine) _backup_orders_tile = 0; } break; default: diff --git a/src/group_gui.cpp b/src/group_gui.cpp index cead1066e..e4548c128 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -262,38 +262,29 @@ public: this->group_sel = ALL_GROUP; this->vehicle_sel = INVALID_VEHICLE; + this->widget[GRP_WIDGET_LIST_VEHICLE].tooltips = STR_VEHICLE_LIST_TRAIN_LIST_TOOLTIP + this->vehicle_type; + this->widget[GRP_WIDGET_AVAILABLE_VEHICLES].data = STR_AVAILABLE_TRAINS + this->vehicle_type; + switch (this->vehicle_type) { case VEH_TRAIN: - this->widget[GRP_WIDGET_LIST_VEHICLE].tooltips = STR_VEHICLE_LIST_TRAIN_LIST_TOOLTIP; - this->widget[GRP_WIDGET_AVAILABLE_VEHICLES].data = STR_AVAILABLE_TRAINS; - this->widget[GRP_WIDGET_CREATE_GROUP].data = SPR_GROUP_CREATE_TRAIN; this->widget[GRP_WIDGET_RENAME_GROUP].data = SPR_GROUP_RENAME_TRAIN; this->widget[GRP_WIDGET_DELETE_GROUP].data = SPR_GROUP_DELETE_TRAIN; break; case VEH_ROAD: - this->widget[GRP_WIDGET_LIST_VEHICLE].tooltips = STR_VEHICLE_LIST_ROAD_TOOLTIP; - this->widget[GRP_WIDGET_AVAILABLE_VEHICLES].data = STR_AVAILABLE_ROAD_VEHICLES; - this->widget[GRP_WIDGET_CREATE_GROUP].data = SPR_GROUP_CREATE_ROADVEH; this->widget[GRP_WIDGET_RENAME_GROUP].data = SPR_GROUP_RENAME_ROADVEH; this->widget[GRP_WIDGET_DELETE_GROUP].data = SPR_GROUP_DELETE_ROADVEH; break; case VEH_SHIP: - this->widget[GRP_WIDGET_LIST_VEHICLE].tooltips = STR_VEHICLE_LIST_SHIP_TOOLTIP; - this->widget[GRP_WIDGET_AVAILABLE_VEHICLES].data = STR_AVAILABLE_SHIPS; - this->widget[GRP_WIDGET_CREATE_GROUP].data = SPR_GROUP_CREATE_SHIP; this->widget[GRP_WIDGET_RENAME_GROUP].data = SPR_GROUP_RENAME_SHIP; this->widget[GRP_WIDGET_DELETE_GROUP].data = SPR_GROUP_DELETE_SHIP; break; case VEH_AIRCRAFT: - this->widget[GRP_WIDGET_LIST_VEHICLE].tooltips = STR_VEHICLE_LIST_AIRCRAFT_TOOLTIP; - this->widget[GRP_WIDGET_AVAILABLE_VEHICLES].data = STR_AVAILABLE_AIRCRAFT; - this->widget[GRP_WIDGET_CREATE_GROUP].data = SPR_GROUP_CREATE_AIRCRAFT; this->widget[GRP_WIDGET_RENAME_GROUP].data = SPR_GROUP_RENAME_AIRCRAFT; this->widget[GRP_WIDGET_DELETE_GROUP].data = SPR_GROUP_DELETE_AIRCRAFT; diff --git a/src/lang/english.txt b/src/lang/english.txt index 725a5ddec..7c748113c 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -355,19 +355,21 @@ STR_ENGINE_SORT_CARGO_CAPACITY :Cargo Capacity STR_NO_WAITING_CARGO :{BLACK}No cargo of any type is waiting STR_SELECT_ALL_FACILITIES :{BLACK}Select all facilities STR_SELECT_ALL_TYPES :{BLACK}Select all cargo types (including no waiting cargo) -STR_AVAILABLE_TRAINS :{BLACK}Available Trains -STR_AVAILABLE_ROAD_VEHICLES :{BLACK}Available Vehicles -STR_AVAILABLE_SHIPS :{BLACK}Available Ships -STR_AVAILABLE_AIRCRAFT :{BLACK}Available Aircraft STR_AVAILABLE_ENGINES_TIP :{BLACK}See a list of available engine designs for this vehicle type. STR_MANAGE_LIST :{BLACK}Manage list STR_MANAGE_LIST_TIP :{BLACK}Send instructions to all vehicles in this list STR_REPLACE_VEHICLES :Replace vehicles +STR_SEND_FOR_SERVICING :Send for Servicing + +STR_AVAILABLE_TRAINS :{BLACK}Available Trains +STR_AVAILABLE_ROAD_VEHICLES :{BLACK}Available Vehicles +STR_AVAILABLE_SHIPS :{BLACK}Available Ships +STR_AVAILABLE_AIRCRAFT :{BLACK}Available Aircraft + STR_SEND_TRAIN_TO_DEPOT :Send to Depot STR_SEND_ROAD_VEHICLE_TO_DEPOT :Send to Depot STR_SEND_SHIP_TO_DEPOT :Send to Depot STR_SEND_AIRCRAFT_TO_HANGAR :Send to Hangar -STR_SEND_FOR_SERVICING :Send for Servicing ############ range for months starts STR_MONTH_ABBREV_JAN :Jan @@ -1262,11 +1264,6 @@ STR_INDUSTRYDIR_LIST_CAPTION :{BLACK}Industry STR_INDUSTRY_TOO_CLOSE :{WHITE}...too close to another industry -STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP :{BLACK}Refit train to carry a different cargo type -STR_REFIT_TRAIN_REFIT_BUTTON :{BLACK}Refit train -STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Select type of cargo for train to carry -STR_REFIT_TRAIN_REFIT_TOOLTIP :{BLACK}Refit train to carry highlighted cargo type -STR_ERROR_CAN_T_REFIT_TRAIN :{WHITE}Can't refit train... STR_CONFIG_GAME_PRODUCTION :{WHITE}Change production ############ network gui strings @@ -2598,10 +2595,8 @@ STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE :monorail locomo STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :maglev locomotive ##id 0x8800 -STR_DEPOT_TRAIN_CAPTION :{WHITE}{TOWN} Train Depot STR_NEWS_FIRST_TRAIN_ARRIVAL :{BLACK}{BIGFONT}Citizens celebrate . . .{}First train arrives at {STATION}! STR_VEHICLE_DETAILS_CAPTION :{WHITE}{VEHICLE} (Details) -STR_ERROR_TRAIN_IN_THE_WAY :{WHITE}Train in the way STR_ORDER :{SETX 10}{COMMA}: {SETX 30}{STRING4} {STRING2} STR_ORDER_SELECTED :{RIGHTARROW}{SETX 10}{COMMA}: {SETX 30}{STRING4} {STRING2} STR_ORDER_NON_STOP :{BLACK}Non-stop @@ -2691,37 +2686,16 @@ STR_TIMETABLE_AND_TRAVEL_FOR :and travel for STR_TIMETABLE_DAYS :{COMMA} day{P "" s} STR_TIMETABLE_TICKS :{COMMA} tick{P "" s} -STR_HEADING_FOR_TRAIN_DEPOT :{ORANGE}Heading for {TOWN} Train Depot -STR_HEADING_FOR_TRAIN_DEPOT_VEL :{ORANGE}Heading for {TOWN} Train Depot, {VELOCITY} -STR_HEADING_FOR_TRAIN_DEPOT_SERVICE :{LTBLUE}Service at {TOWN} Train Depot -STR_HEADING_FOR_TRAIN_DEPOT_SERVICE_VEL :{LTBLUE}Service at {TOWN} Train Depot, {VELOCITY} - STR_INVALID_ORDER :{RED} (Invalid Order) STR_UNKNOWN_STATION :unknown station STR_VEHICLE_DETAILS_CARGO_EMPTY :{LTBLUE}Empty STR_VEHICLE_DETAILS_CARGO_FROM :{LTBLUE}{CARGO} from {STATION} STR_VEHICLE_DETAILS_CARGO_FROM_MULT :{LTBLUE}{CARGO} from {STATION} (x{NUM}) -STR_NEWS_TRAIN_IS_WAITING :{WHITE}{VEHICLE} is waiting in depot -STR_DEPOT_TRAIN_NEW_VEHICLES_BUTTON :{BLACK}New Vehicles STR_DEPOT_NO_ENGINE :{BLACK}- STR_ERROR_TRAIN_TOO_LONG :{WHITE}Train too long STR_ERROR_TRAINS_CAN_ONLY_BE_ALTERED_INSIDE_A_DEPOT :{WHITE}Trains can only be altered when stopped inside a depot -STR_BUILD_VEHICLE_TRAIN_RAIL_CAPTION :{WHITE}New Rail Vehicles -STR_BUILD_VEHICLE_TRAIN_ELRAIL_CAPTION :{WHITE}New Electric Rail Vehicles -STR_BUILD_VEHICLE_TRAIN_MONORAIL_CAPTION :{WHITE}New Monorail Vehicles -STR_BUILD_VEHICLE_TRAIN_MAGLEV_CAPTION :{WHITE}New Maglev Vehicles -STR_BUILD_VEHICLE_TRAIN_ALL_CAPTION :{WHITE}Rail Vehicles - -STR_BUILD_VEHICLE_TRAIN_BUILD_VEHICLE_BUTTON :{BLACK}Build Vehicle -STR_CLONE_ROAD_VEHICLE :{BLACK}Clone Vehicle -STR_CLONE_ROAD_VEHICLE_INFO :{BLACK}This will build a copy of the road vehicle. Ctrl+Click will share the orders -STR_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}This will build a copy of a road vehicle. Click this button and then on a road vehicle inside or outside the depot. Ctrl+Click will share the orders -STR_CLONE_TRAIN :{BLACK}Clone Train -STR_CLONE_TRAIN_INFO :{BLACK}This will build a copy of the train including all cars. Ctrl+Click will share the orders -STR_CLONE_TRAIN_DEPOT_INFO :{BLACK}This will build a copy of a train including all cars. Click this button and then on a train inside or outside the depot. Ctrl+Click will share the orders -STR_BUILD_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Rename STR_ORDERS_SKIP_BUTTON :{BLACK}Skip STR_ORDERS_DELETE_BUTTON :{BLACK}Delete STR_ORDERS_GO_TO_BUTTON :{BLACK}Go To @@ -2737,14 +2711,12 @@ STR_ORDER_VIEW_TOOLTIP :{BLACK}Switch t STR_ORDERS_CAPTION :{WHITE}{VEHICLE} (Orders) STR_ORDERS_END_OF_ORDERS :{SETX 10}- - End of Orders - - STR_SERVICE :{BLACK}Service -STR_ERROR_CAN_T_BUILD_TRAIN :{WHITE}Can't build railway vehicle... STR_VEHICLE_DETAILS_TRAIN_ENGINE_BUILT_AND_VALUE :{LTBLUE}{ENGINE}{BLACK} Built: {LTBLUE}{NUM}{BLACK} Value: {LTBLUE}{CURRENCY} STR_VEHICLE_DETAILS_TRAIN_WAGON_VALUE :{LTBLUE}{ENGINE}{BLACK} Value: {LTBLUE}{CURRENCY} STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE} STR_VEHICLE_STATUS_LOADING_UNLOADING :{LTBLUE}Loading / Unloading STR_VEHICLE_STATUS_LEAVING :{LTBLUE}Leaving STR_TRAIN_MUST_BE_STOPPED :{WHITE}Train must be stopped inside a depot -STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT :{WHITE}Can't send train to depot... STR_ERROR_NO_MORE_SPACE_FOR_ORDERS :{WHITE}No more space for orders STR_ERROR_TOO_MANY_ORDERS :{WHITE}Too many orders STR_ERROR_CAN_T_INSERT_NEW_ORDER :{WHITE}Can't insert new order... @@ -2759,25 +2731,11 @@ STR_ERROR_CAN_T_ADD_ORDER_SHARED :{WHITE}a vehicl STR_ERROR_CAN_T_MOVE_VEHICLE :{WHITE}Can't move vehicle... STR_ERROR_REAR_ENGINE_FOLLOW_FRONT :{WHITE}The rear engine will always follow its front counterpart STR_CARGO_N_A :N/A{SKIP} -STR_ERROR_CAN_T_SELL_RAILROAD_VEHICLE :{WHITE}Can't sell railway vehicle... STR_ERROR_UNABLE_TO_FIND_ROUTE_TO :{WHITE}Unable to find route to local depot -STR_ERROR_CAN_T_STOP_START_TRAIN :{WHITE}Can't stop/start train... STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Servicing interval: {LTBLUE}{COMMA}days{BLACK} Last service: {LTBLUE}{DATE_LONG} STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Servicing interval: {LTBLUE}{COMMA}%{BLACK} Last service: {LTBLUE}{DATE_LONG} -STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Trains - click on train for info., drag vehicle to add/remove from train -STR_DEPOT_TRAIN_NEW_VEHICLES_TOOLTIP :{BLACK}Build new train vehicle -STR_DEPOT_TRAIN_SELL_TOOLTIP :{BLACK}Drag train vehicle to here to sell it -STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Centre main view on train depot location -STR_BUILD_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Train vehicle selection list - click on vehicle for information -STR_BUILD_VEHICLE_TRAIN_BUILD_VEHICLE_TOOLTIP :{BLACK}Build the highlighted train vehicle -STR_BUILD_VEHICLE_TRAIN_RENAME_TOOLTIP :{BLACK}Rename train vehicle type -STR_VEHICLE_VIEW_TRAIN_STATE_START_STOP_TOOLTIP :{BLACK}Current train action - click here to stop/start train -STR_VEHICLE_VIEW_TRAIN_ORDERS_TOOLTIP :{BLACK}Show train's orders -STR_VEHICLE_VIEW_TRAIN_LOCATION_TOOLTIP :{BLACK}Centre main view on train's location -STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send train to depot. Ctrl+Click will only service STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP :{BLACK}Force train to proceed without waiting for signal to clear it STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP :{BLACK}Reverse direction of train -STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP :{BLACK}Show train details STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase servicing interval STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease servicing interval STR_VEHICLE_DETAILS_TRAIN_CARGO_TOOLTIP :{BLACK}Show details of cargo carried @@ -2811,15 +2769,10 @@ STR_VEHICLE_STATUS_STOPPED :{RED}Stopped STR_ERROR_CAN_T_MAKE_TRAIN_PASS_SIGNAL :{WHITE}Can't make train pass signal at danger... STR_VEHICLE_STATUS_CRASHED :{RED}Crashed! -STR_QUERY_RENAME_TRAIN_CAPTION :{WHITE}Name train -STR_ERROR_CAN_T_RENAME_TRAIN :{WHITE}Can't name train... -STR_VEHICLE_DETAILS_TRAIN_RENAME :{BLACK}Name train STR_NEWS_TRAIN_CRASH :{BLACK}{BIGFONT}Train Crash!{}{COMMA} die in fireball after collision STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN :{WHITE}Can't reverse direction of train... STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE :{WHITE}Can't reverse direction of vehicle... STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS :{WHITE}Can't reverse direction of vehicles consisting of multiple units... -STR_QUERY_RENAME_TRAIN_TYPE_CAPTION :{WHITE}Rename train vehicle type -STR_ERROR_CAN_T_RENAME_TRAIN_TYPE :{WHITE}Can't rename train vehicle type... STR_CLEAR_TIME :{BLACK}Clear Time STR_RESET_LATENESS :{BLACK}Reset Late Counter STR_CHANGE_WAYPOINT_NAME :{BLACK}Change waypoint name @@ -2851,43 +2804,15 @@ STR_TIMETABLE_AUTOFILL :{BLACK}Autofill STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}Fill the timetable automatically with the values from the next journey (Ctrl+Click to try to keep waiting times) ##id 0x9000 -STR_ERROR_ROAD_VEHICLE_IN_THE_WAY :{WHITE}Road vehicle in the way -STR_DEPOT_ROAD_CAPTION :{WHITE}{TOWN} Road Vehicle Depot -STR_DEPOT_ROAD_NEW_VEHICLES_BUTTON :{BLACK}New Vehicles -STR_BUILD_VEHICLE_ROAD_CAPTION :{WHITE}New Road Vehicles -STR_BUILD_VEHICLE_ROAD_BUILD_VEHICLE_BUTTON :{BLACK}Build Vehicle -STR_ERROR_CAN_T_BUILD_ROAD_VEHICLE :{WHITE}Can't build road vehicle... STR_ERROR_ROAD_MUST_BE_STOPPED_INSIDE_DEPOT :{WHITE}...must be stopped inside a road vehicle depot -STR_ERROR_CAN_T_SELL_ROAD_VEHICLE :{WHITE}Can't sell road vehicle... -STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE :{WHITE}Can't stop/start road vehicle... -STR_NEWS_ROAD_VEHICLE_IS_WAITING :{WHITE}{VEHICLE} is waiting in depot -STR_HEADING_FOR_ROAD_DEPOT :{ORANGE}Heading for {TOWN} Road Depot -STR_HEADING_FOR_ROAD_DEPOT_VEL :{ORANGE}Heading for {TOWN} Road Depot, {VELOCITY} -STR_HEADING_FOR_ROAD_DEPOT_SERVICE :{LTBLUE}Service at {TOWN} Road Depot -STR_HEADING_FOR_ROAD_DEPOT_SERVICE_VEL :{LTBLUE}Service at {TOWN} Road Depot, {VELOCITY} -STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT :{WHITE}Can't send road vehicle to depot... STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT :{WHITE}Unable to find local depot -STR_VEHICLE_VIEW_ROAD_STATE_START_STOP_TOOLTIP :{BLACK}Current vehicle action - click here to stop/start vehicle -STR_VEHICLE_VIEW_ROAD_ORDERS_TOOLTIP :{BLACK}Show vehicle's orders -STR_VEHICLE_VIEW_ROAD_LOCATION_TOOLTIP :{BLACK}Centre main view on vehicle's location -STR_VEHICLE_VIEW_ROAD_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send vehicle to depot. Ctrl+Click will only service STR_VEHICLE_VIEW_ROAD_REVERSE_TOOLTIP :{BLACK}Force vehicle to turn around -STR_VEHICLE_VIEW_ROAD_SHOW_DETAILS_TOOLTIP :{BLACK}Show road vehicle details -STR_DEPOT_ROAD_LIST_TOOLTIP :{BLACK}Vehicles - click on vehicle for information -STR_DEPOT_ROAD_NEW_VEHICLES_TOOLTIP :{BLACK}Build new road vehicle -STR_DEPOT_ROAD_SELL_TOOLTIP :{BLACK}Drag road vehicle to here to sell it -STR_DEPOT_ROAD_LOCATION_TOOLTIP :{BLACK}Centre main view on road vehicle depot location -STR_BUILD_VEHICLE_ROAD_LIST_TOOLTIP :{BLACK}Road vehicle selection list - click on vehicle for information -STR_BUILD_VEHICLE_ROAD_BUILD_VEHICLE_TOOLTIP :{BLACK}Build the highlighted road vehicle STR_ARTICULATED_RV_CAPACITY :{BLACK}Capacity: {LTBLUE} STR_BARE_CARGO :{CARGO} STR_DEPOT_VEHICLE_TOOLTIP :{BLACK}{ENGINE}{RAW_STRING} STR_DEPOT_VEHICLE_TOOLTIP_CHAIN :{BLACK}{NUM} vehicle{P "" s}{RAW_STRING} STR_DEPOT_VEHICLE_TOOLTIP_CARGO :{}{CARGO} ({SHORTCARGO}) -STR_QUERY_RENAME_ROAD_VEHICLE_CAPTION :{WHITE}Name road vehicle -STR_ERROR_CAN_T_RENAME_ROAD_VEHICLE :{WHITE}Can't name road vehicle... -STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Name road vehicle STR_NEWS_FIRST_ROAD_BUS_ARRIVAL :{BLACK}{BIGFONT}Citizens celebrate . . .{}First bus arrives at {STATION}! STR_NEWS_FIRST_ROAD_TRUCK_ARRIVAL :{BLACK}{BIGFONT}Citizens celebrate . . .{}First truck arrives at {STATION}! STR_NEWS_FIRST_ROAD_PASSENGER_TRAM_ARRIVAL :{BLACK}{BIGFONT}Citizens celebrate . . .{}First passenger tram arrives at {STATION}! @@ -2895,128 +2820,39 @@ STR_NEWS_FIRST_ROAD_CARGO_TRAM_ARRIVAL :{BLACK}{BIGFONT STR_NEWS_ROAD_CRASH_DRIVER :{BLACK}{BIGFONT}Road Vehicle Crash!{}Driver dies in fireball after collision with train STR_NEWS_ROAD_CRASH :{BLACK}{BIGFONT}Road Vehicle Crash!{}{COMMA} die in fireball after collision with train STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN :{WHITE}Can't make road vehicle turn around... -STR_BUILD_VEHICLE_ROAD_VEHICLE_RENAME_BUTTON :{BLACK}Rename -STR_BUILD_VEHICLE_ROAD_VEHICLE_RENAME_TOOLTIP :{BLACK}Rename road vehicle type -STR_QUERY_RENAME_ROAD_VEHICLE_TYPE_CAPTION :{WHITE}Rename road vehicle type -STR_ERROR_CAN_T_RENAME_ROAD_VEHICLE_TYPE :{WHITE}Can't rename road vehicle type... -STR_VEHICLE_VIEW_ROAD_VEHICLE_REFIT_TOOLTIP :{BLACK}Refit road vehicle to carry a different cargo type -STR_REFIT_ROAD_VEHICLE_REFIT_BUTTON :{BLACK}Refit road vehicle -STR_REFIT_ROAD_VEHICLE_REFIT_TOOLTIP :{BLACK}Refit road vehicle to carry highlighted cargo type -STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE :{WHITE}Can't refit road vehicle... -STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Select type of cargo for road vehicle to carry ##id 0x9800 STR_WATERWAYS_MENU_WATERWAYS_CONSTRUCTION :Waterways construction STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Waterways construction STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Waterways STR_ERROR_CAN_T_BUILD_DOCK_HERE :{WHITE}Can't build dock here... -STR_DEPOT_SHIP_CAPTION :{WHITE}{TOWN} Ship Depot -STR_DEPOT_SHIP_NEW_VEHICLES_BUTTON :{BLACK}New Ships -STR_BUILD_VEHICLE_SHIP_CAPTION :{WHITE}New Ships -STR_BUILD_VEHICLE_SHIP_BUILD_VEHICLE_BUTTON :{BLACK}Build Ship -STR_CLONE_SHIP :{BLACK}Clone Ship -STR_CLONE_SHIP_INFO :{BLACK}This will build a copy of the ship. Ctrl+Click will share the orders -STR_CLONE_SHIP_DEPOT_INFO :{BLACK}This will build a copy of a ship. Click this button and then on a ship inside or outside the depot. Ctrl+Click will share the orders STR_ERROR_SHIP_MUST_BE_STOPPED_IN_DEPOT :{WHITE}Ship must be stopped in depot -STR_ERROR_CAN_T_SELL_SHIP :{WHITE}Can't sell ship... -STR_ERROR_CAN_T_BUILD_SHIP :{WHITE}Can't build ship... -STR_ERROR_SHIP_IN_THE_WAY :{WHITE}Ship in the way -STR_ERROR_CAN_T_STOP_START_SHIP :{WHITE}Can't stop/start ship... -STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT :{WHITE}Can't send ship to depot... -STR_HEADING_FOR_SHIP_DEPOT :{ORANGE}Heading for {TOWN} Ship Depot -STR_HEADING_FOR_SHIP_DEPOT_VEL :{ORANGE}Heading for {TOWN} Ship Depot, {VELOCITY} -STR_HEADING_FOR_SHIP_DEPOT_SERVICE :{LTBLUE}Service at {TOWN} Ship Depot -STR_HEADING_FOR_SHIP_DEPOT_SERVICE_VEL :{LTBLUE}Service at {TOWN} Ship Depot, {VELOCITY} -STR_NEWS_SHIP_IS_WAITING :{WHITE}{VEHICLE} is waiting in depot STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Build ship dock STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Build ship depot (for building and servicing ships) -STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Ships - click on ship for information -STR_DEPOT_SHIP_NEW_VEHICLES_TOOLTIP :{BLACK}Build new ship -STR_DEPOT_SHIP_SELL_TOOLTIP :{BLACK}Drag ship to here to sell it -STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}Centre main view on ship depot location -STR_BUILD_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Ship selection list - click on ship for information -STR_BUILD_VEHICLE_SHIP_BUILD_VEHICLE_TOOLTIP :{BLACK}Build the highlighted ship -STR_VEHICLE_VIEW_SHIP_STATE_START_STOP_TOOLTIP :{BLACK}Current ship action - click here to stop/start ship -STR_VEHICLE_VIEW_SHIP_ORDERS_TOOLTIP :{BLACK}Show ship's orders -STR_VEHICLE_VIEW_SHIP_LOCATION_TOOLTIP :{BLACK}Centre main view on ship's location -STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send ship to depot. Ctrl+Click will only service -STR_VEHICLE_VIEW_SHIP_SHOW_DETAILS_TOOLTIP :{BLACK}Show ship details -STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Name ship -STR_QUERY_RENAME_SHIP_CAPTION :{WHITE}Name ship -STR_ERROR_CAN_T_RENAME_SHIP :{WHITE}Can't name ship... STR_NEWS_FIRST_SHIP_ARRIVAL :{BLACK}{BIGFONT}Citizens celebrate . . .{}First ship arrives at {STATION}! STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Place a buoy which can be used as a waypoint STR_ERROR_CAN_T_POSITION_BUOY_HERE :{WHITE}Can't place buoy here... STR_BUILD_AQUEDUCT :{BLACK}Build aqueduct STR_CAN_T_BUILD_AQUEDUCT_HERE :{WHITE}Can't build aqueduct here... -STR_BUILD_VEHICLE_SHIP_RENAME_BUTTON :{BLACK}Rename -STR_BUILD_VEHICLE_SHIP_RENAME_TOOLTIP :{BLACK}Rename ship type -STR_QUERY_RENAME_SHIP_TYPE_CAPTION :{WHITE}Rename ship type -STR_ERROR_CAN_T_RENAME_SHIP_TYPE :{WHITE}Can't rename ship type... -STR_VEHICLE_VIEW_SHIP_REFIT_TOOLTIP :{BLACK}Refit cargo ship to carry a different cargo type STR_REFIT_CAPTION :{WHITE}{VEHICLE} (Refit) -STR_REFIT_SHIP_REFIT_BUTTON :{BLACK}Refit ship -STR_REFIT_SHIP_LIST_TOOLTIP :{BLACK}Select type of cargo for ship to carry -STR_REFIT_SHIP_REFIT_TOOLTIP :{BLACK}Refit ship to carry highlighted cargo type STR_REFIT_TITLE :{GOLD}Select cargo type to carry: STR_REFIT_NEW_CAPACITY_COST_OF_REFIT :{BLACK}New capacity: {GOLD}{CARGO}{}{BLACK}Cost of refit: {GOLD}{CURRENCY} -STR_ERROR_CAN_T_REFIT_SHIP :{WHITE}Can't refit ship... STR_REFITTABLE :(refittable) ##id 0xA000 STR_TOOLBAR_AIRCRAFT_CAPTION :{WHITE}Airports STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Can't build airport here... -STR_DEPOT_AIRCRAFT_CAPTION :{WHITE}{STATION} Aircraft Hangar -STR_DEPOT_AIRCRAFT_NEW_VEHICLES_BUTTON :{BLACK}New Aircraft -STR_CLONE_AIRCRAFT :{BLACK}Clone Aircraft -STR_CLONE_AIRCRAFT_INFO :{BLACK}This will build a copy of the aircraft. Ctrl+Click will share the orders -STR_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}This will build a copy of an aircraft. Click this button and then on an aircraft inside or outside the hangar. Ctrl+Click will share the orders -STR_BUILD_VEHICLE_AIRCRAFT_CAPTION :{WHITE}New Aircraft -STR_BUILD_VEHICLE_AIRCRAFT_BUILD_VEHICLE_BUTTON :{BLACK}Build Aircraft -STR_ERROR_CAN_T_BUILD_AIRCRAFT :{WHITE}Can't build aircraft... -STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR :{WHITE}Can't send aircraft to hangar... -STR_HEADING_FOR_HANGAR :{ORANGE}Heading for {STATION} Hangar -STR_HEADING_FOR_HANGAR_VEL :{ORANGE}Heading for {STATION} Hangar, {VELOCITY} -STR_HEADING_FOR_HANGAR_SERVICE :{LTBLUE}Service at {STATION} Hangar -STR_HEADING_FOR_HANGAR_SERVICE_VEL :{LTBLUE}Service at {STATION} Hangar, {VELOCITY} -STR_NEWS_AIRCRAFT_IS_WAITING :{WHITE}{VEHICLE} is waiting in the aircraft hangar -STR_ERROR_AIRCRAFT_IN_THE_WAY :{WHITE}Aircraft in the way -STR_ERROR_CAN_T_STOP_START_AIRCRAFT :{WHITE}Can't stop/start aircraft... STR_ERROR_AIRCRAFT_IS_IN_FLIGHT :{WHITE}Aircraft is in flight STR_ERROR_AIRCRAFT_MUST_BE_STOPPED :{WHITE}Aircraft must be stopped in hangar -STR_ERROR_CAN_T_SELL_AIRCRAFT :{WHITE}Can't sell aircraft... STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION :Airport construction STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Build airport -STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft - click on aircraft for information -STR_DEPOT_AIRCRAFT_NEW_VEHICLES_TOOLTIP :{BLACK}Build new aircraft -STR_DEPOT_AIRCRAFT_SELL_TOOLTIP :{BLACK}Drag aircraft to here to sell it -STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centre main view on hangar location -STR_BUILD_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft selection list - click on aircraft for information -STR_BUILD_VEHICLE_AIRCRAFT_BUILD_VEHICLE_TOOLTIP :{BLACK}Build the highlighted aircraft -STR_VEHICLE_VIEW_AIRCRAFT_STATE_START_STOP_TOOLTIP :{BLACK}Current aircraft action - click here to stop/start aircraft -STR_VEHICLE_VIEW_AIRCRAFT_ORDERS_TOOLTIP :{BLACK}Show aircraft's orders -STR_VEHICLE_VIEW_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centre main view on aircraft's location -STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send aircraft to hangar. Ctrl+Click will only service -STR_VEHICLE_VIEW_AIRCRAFT_SHOW_DETAILS_TOOLTIP :{BLACK}Show aircraft details -STR_QUERY_RENAME_AIRCRAFT_CAPTION :{WHITE}Name aircraft -STR_ERROR_CAN_T_RENAME_AIRCRAFT :{WHITE}Can't name aircraft... -STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Name aircraft STR_NEWS_FIRST_AIRCRAFT_ARRIVAL :{BLACK}{BIGFONT}Citizens celebrate . . .{}First aircraft arrives at {STATION}! STR_NEWS_AIRCRAFT_CRASH :{BLACK}{BIGFONT}Plane Crash!{}{COMMA} die in fireball at {STATION} STR_PLANE_CRASH_OUT_OF_FUEL :{BLACK}{BIGFONT}Plane Crash!{}Aircraft ran out of fuel, {COMMA} die in fireball! STR_ORDER_STATION_SMALL :{TINYFONT}{BLACK}{STATION} -STR_BUILD_VEHICLE_AIRCRAFT_RENAME_BUTTON :{BLACK}Rename -STR_BUILD_VEHICLE_AIRCRAFT_RENAME_TOOLTIP :{BLACK}Rename aircraft type -STR_QUERY_RENAME_AIRCRAFT_TYPE_CAPTION :{WHITE}Rename aircraft type -STR_ERROR_CAN_T_RENAME_AIRCRAFT_TYPE :{WHITE}Can't rename aircraft type... -STR_VEHICLE_VIEW_AIRCRAFT_REFIT_TOOLTIP :{BLACK}Refit aircraft to carry a different cargo type -STR_REFIT_AIRCRAFT_REFIT_BUTTON :{BLACK}Refit aircraft -STR_REFIT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Select type of cargo for aircraft to carry -STR_REFIT_AIRCRAFT_REFIT_TOOLTIP :{BLACK}Refit aircraft to carry highlighted cargo type -STR_ERROR_CAN_T_REFIT_AIRCRAFT :{WHITE}Can't refit aircraft... STR_TIMETABLE_TITLE :{WHITE}{VEHICLE} (Timetable) @@ -3184,6 +3020,211 @@ STR_VEHICLE_LIST_AIRCRAFT_CAPTION :{WHITE}{STRING1 STR_VEH_WITH_SHARED_ORDERS_LIST :{WHITE}Shared orders of {COMMA} Vehicle{P "" s} STR_VEH_WITH_SHARED_ORDERS_LIST_TIP :{BLACK}Show all vehicles that share this schedule +STR_NEWS_TRAIN_IS_WAITING :{WHITE}{VEHICLE} is waiting in depot +STR_NEWS_ROAD_VEHICLE_IS_WAITING :{WHITE}{VEHICLE} is waiting in depot +STR_NEWS_SHIP_IS_WAITING :{WHITE}{VEHICLE} is waiting in depot +STR_NEWS_AIRCRAFT_IS_WAITING :{WHITE}{VEHICLE} is waiting in the aircraft hangar + +STR_REFIT_TRAIN_REFIT_BUTTON :{BLACK}Refit train +STR_REFIT_ROAD_VEHICLE_REFIT_BUTTON :{BLACK}Refit road vehicle +STR_REFIT_SHIP_REFIT_BUTTON :{BLACK}Refit ship +STR_REFIT_AIRCRAFT_REFIT_BUTTON :{BLACK}Refit aircraft + +STR_REFIT_TRAIN_REFIT_TOOLTIP :{BLACK}Refit train to carry highlighted cargo type +STR_REFIT_ROAD_VEHICLE_REFIT_TOOLTIP :{BLACK}Refit road vehicle to carry highlighted cargo type +STR_REFIT_SHIP_REFIT_TOOLTIP :{BLACK}Refit ship to carry highlighted cargo type +STR_REFIT_AIRCRAFT_REFIT_TOOLTIP :{BLACK}Refit aircraft to carry highlighted cargo type + +STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Select type of cargo for train to carry +STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Select type of cargo for road vehicle to carry +STR_REFIT_SHIP_LIST_TOOLTIP :{BLACK}Select type of cargo for ship to carry +STR_REFIT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Select type of cargo for aircraft to carry + +STR_DEPOT_TRAIN_CAPTION :{WHITE}{TOWN} Train Depot +STR_DEPOT_ROAD_CAPTION :{WHITE}{TOWN} Road Vehicle Depot +STR_DEPOT_SHIP_CAPTION :{WHITE}{TOWN} Ship Depot +STR_DEPOT_AIRCRAFT_CAPTION :{WHITE}{STATION} Aircraft Hangar + +STR_VEHICLE_DETAILS_TRAIN_RENAME :{BLACK}Name train +STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Name road vehicle +STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Name ship +STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Name aircraft + +STR_QUERY_RENAME_TRAIN_CAPTION :{WHITE}Name train +STR_QUERY_RENAME_ROAD_VEHICLE_CAPTION :{WHITE}Name road vehicle +STR_QUERY_RENAME_SHIP_CAPTION :{WHITE}Name ship +STR_QUERY_RENAME_AIRCRAFT_CAPTION :{WHITE}Name aircraft + +STR_ERROR_TRAIN_IN_THE_WAY :{WHITE}Train in the way +STR_ERROR_ROAD_VEHICLE_IN_THE_WAY :{WHITE}Road vehicle in the way +STR_ERROR_SHIP_IN_THE_WAY :{WHITE}Ship in the way +STR_ERROR_AIRCRAFT_IN_THE_WAY :{WHITE}Aircraft in the way + +STR_ERROR_CAN_T_REFIT_TRAIN :{WHITE}Can't refit train... +STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE :{WHITE}Can't refit road vehicle... +STR_ERROR_CAN_T_REFIT_SHIP :{WHITE}Can't refit ship... +STR_ERROR_CAN_T_REFIT_AIRCRAFT :{WHITE}Can't refit aircraft... + +STR_ERROR_CAN_T_RENAME_TRAIN :{WHITE}Can't name train... +STR_ERROR_CAN_T_RENAME_ROAD_VEHICLE :{WHITE}Can't name road vehicle... +STR_ERROR_CAN_T_RENAME_SHIP :{WHITE}Can't name ship... +STR_ERROR_CAN_T_RENAME_AIRCRAFT :{WHITE}Can't name aircraft... + +STR_ERROR_CAN_T_STOP_START_TRAIN :{WHITE}Can't stop/start train... +STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE :{WHITE}Can't stop/start road vehicle... +STR_ERROR_CAN_T_STOP_START_SHIP :{WHITE}Can't stop/start ship... +STR_ERROR_CAN_T_STOP_START_AIRCRAFT :{WHITE}Can't stop/start aircraft... + +STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT :{WHITE}Can't send train to depot... +STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT :{WHITE}Can't send road vehicle to depot... +STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT :{WHITE}Can't send ship to depot... +STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR :{WHITE}Can't send aircraft to hangar... + +STR_ERROR_CAN_T_BUILD_TRAIN :{WHITE}Can't build railway vehicle... +STR_ERROR_CAN_T_BUILD_ROAD_VEHICLE :{WHITE}Can't build road vehicle... +STR_ERROR_CAN_T_BUILD_SHIP :{WHITE}Can't build ship... +STR_ERROR_CAN_T_BUILD_AIRCRAFT :{WHITE}Can't build aircraft... + +STR_ERROR_CAN_T_RENAME_TRAIN_TYPE :{WHITE}Can't rename train vehicle type... +STR_ERROR_CAN_T_RENAME_ROAD_VEHICLE_TYPE :{WHITE}Can't rename road vehicle type... +STR_ERROR_CAN_T_RENAME_SHIP_TYPE :{WHITE}Can't rename ship type... +STR_ERROR_CAN_T_RENAME_AIRCRAFT_TYPE :{WHITE}Can't rename aircraft type... + +STR_ERROR_CAN_T_SELL_RAILROAD_VEHICLE :{WHITE}Can't sell railway vehicle... +STR_ERROR_CAN_T_SELL_ROAD_VEHICLE :{WHITE}Can't sell road vehicle... +STR_ERROR_CAN_T_SELL_SHIP :{WHITE}Can't sell ship... +STR_ERROR_CAN_T_SELL_AIRCRAFT :{WHITE}Can't sell aircraft... + +STR_VEHICLE_VIEW_TRAIN_STATE_START_STOP_TOOLTIP :{BLACK}Current train action - click here to stop/start train +STR_VEHICLE_VIEW_ROAD_STATE_START_STOP_TOOLTIP :{BLACK}Current vehicle action - click here to stop/start vehicle +STR_VEHICLE_VIEW_SHIP_STATE_START_STOP_TOOLTIP :{BLACK}Current ship action - click here to stop/start ship +STR_VEHICLE_VIEW_AIRCRAFT_STATE_START_STOP_TOOLTIP :{BLACK}Current aircraft action - click here to stop/start aircraft + +STR_VEHICLE_VIEW_TRAIN_ORDERS_TOOLTIP :{BLACK}Show train's orders +STR_VEHICLE_VIEW_ROAD_ORDERS_TOOLTIP :{BLACK}Show vehicle's orders +STR_VEHICLE_VIEW_SHIP_ORDERS_TOOLTIP :{BLACK}Show ship's orders +STR_VEHICLE_VIEW_AIRCRAFT_ORDERS_TOOLTIP :{BLACK}Show aircraft's orders + +STR_VEHICLE_VIEW_TRAIN_LOCATION_TOOLTIP :{BLACK}Centre main view on train's location +STR_VEHICLE_VIEW_ROAD_LOCATION_TOOLTIP :{BLACK}Centre main view on vehicle's location +STR_VEHICLE_VIEW_SHIP_LOCATION_TOOLTIP :{BLACK}Centre main view on ship's location +STR_VEHICLE_VIEW_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centre main view on aircraft's location + +STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send train to depot. Ctrl+Click will only service +STR_VEHICLE_VIEW_ROAD_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send vehicle to depot. Ctrl+Click will only service +STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send ship to depot. Ctrl+Click will only service +STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send aircraft to hangar. Ctrl+Click will only service + +STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP :{BLACK}Show train details +STR_VEHICLE_VIEW_ROAD_SHOW_DETAILS_TOOLTIP :{BLACK}Show road vehicle details +STR_VEHICLE_VIEW_SHIP_SHOW_DETAILS_TOOLTIP :{BLACK}Show ship details +STR_VEHICLE_VIEW_AIRCRAFT_SHOW_DETAILS_TOOLTIP :{BLACK}Show aircraft details + +STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP :{BLACK}Refit train to carry a different cargo type +STR_VEHICLE_VIEW_ROAD_VEHICLE_REFIT_TOOLTIP :{BLACK}Refit road vehicle to carry a different cargo type +STR_VEHICLE_VIEW_SHIP_REFIT_TOOLTIP :{BLACK}Refit cargo ship to carry a different cargo type +STR_VEHICLE_VIEW_AIRCRAFT_REFIT_TOOLTIP :{BLACK}Refit aircraft to carry a different cargo type + +STR_HEADING_FOR_TRAIN_DEPOT :{ORANGE}Heading for {TOWN} Train Depot +STR_HEADING_FOR_TRAIN_DEPOT_VEL :{ORANGE}Heading for {TOWN} Train Depot, {VELOCITY} +STR_HEADING_FOR_ROAD_DEPOT :{ORANGE}Heading for {TOWN} Road Depot +STR_HEADING_FOR_ROAD_DEPOT_VEL :{ORANGE}Heading for {TOWN} Road Depot, {VELOCITY} +STR_HEADING_FOR_SHIP_DEPOT :{ORANGE}Heading for {TOWN} Ship Depot +STR_HEADING_FOR_SHIP_DEPOT_VEL :{ORANGE}Heading for {TOWN} Ship Depot, {VELOCITY} +STR_HEADING_FOR_HANGAR :{ORANGE}Heading for {STATION} Hangar +STR_HEADING_FOR_HANGAR_VEL :{ORANGE}Heading for {STATION} Hangar, {VELOCITY} + +STR_HEADING_FOR_TRAIN_DEPOT_SERVICE :{LTBLUE}Service at {TOWN} Train Depot +STR_HEADING_FOR_TRAIN_DEPOT_SERVICE_VEL :{LTBLUE}Service at {TOWN} Train Depot, {VELOCITY} +STR_HEADING_FOR_ROAD_DEPOT_SERVICE :{LTBLUE}Service at {TOWN} Road Depot +STR_HEADING_FOR_ROAD_DEPOT_SERVICE_VEL :{LTBLUE}Service at {TOWN} Road Depot, {VELOCITY} +STR_HEADING_FOR_SHIP_DEPOT_SERVICE :{LTBLUE}Service at {TOWN} Ship Depot +STR_HEADING_FOR_SHIP_DEPOT_SERVICE_VEL :{LTBLUE}Service at {TOWN} Ship Depot, {VELOCITY} +STR_HEADING_FOR_HANGAR_SERVICE :{LTBLUE}Service at {STATION} Hangar +STR_HEADING_FOR_HANGAR_SERVICE_VEL :{LTBLUE}Service at {STATION} Hangar, {VELOCITY} + + +STR_CLONE_TRAIN :{BLACK}Clone Train +STR_CLONE_ROAD_VEHICLE :{BLACK}Clone Vehicle +STR_CLONE_SHIP :{BLACK}Clone Ship +STR_CLONE_AIRCRAFT :{BLACK}Clone Aircraft + +STR_CLONE_TRAIN_INFO :{BLACK}This will build a copy of the train including all cars. Ctrl+Click will share the orders +STR_CLONE_ROAD_VEHICLE_INFO :{BLACK}This will build a copy of the road vehicle. Ctrl+Click will share the orders +STR_CLONE_SHIP_INFO :{BLACK}This will build a copy of the ship. Ctrl+Click will share the orders +STR_CLONE_AIRCRAFT_INFO :{BLACK}This will build a copy of the aircraft. Ctrl+Click will share the orders + +STR_CLONE_TRAIN_DEPOT_INFO :{BLACK}This will build a copy of a train including all cars. Click this button and then on a train inside or outside the depot. Ctrl+Click share the orders +STR_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}This will build a copy of a road vehicle. Click this button and then on a road vehicle inside or outside the depot. Ctrl+Click will will share the orders +STR_CLONE_SHIP_DEPOT_INFO :{BLACK}This will build a copy of a ship. Click this button and then on a ship inside or outside the depot. Ctrl+Click will share the orders +STR_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}This will build a copy of an aircraft. Click this button and then on an aircraft inside or outside the hangar. Ctrl+Click will share the orders + +STR_BUILD_VEHICLE_TRAIN_RAIL_CAPTION :{WHITE}New Rail Vehicles +STR_BUILD_VEHICLE_TRAIN_ELRAIL_CAPTION :{WHITE}New Electric Rail Vehicles +STR_BUILD_VEHICLE_TRAIN_MONORAIL_CAPTION :{WHITE}New Monorail Vehicles +STR_BUILD_VEHICLE_TRAIN_MAGLEV_CAPTION :{WHITE}New Maglev Vehicles + +STR_BUILD_VEHICLE_TRAIN_ALL_CAPTION :{WHITE}Rail Vehicles +STR_BUILD_VEHICLE_ROAD_CAPTION :{WHITE}New Road Vehicles +STR_BUILD_VEHICLE_SHIP_CAPTION :{WHITE}New Ships +STR_BUILD_VEHICLE_AIRCRAFT_CAPTION :{WHITE}New Aircraft + +STR_BUILD_VEHICLE_TRAIN_BUILD_VEHICLE_BUTTON :{BLACK}Build Vehicle +STR_BUILD_VEHICLE_ROAD_BUILD_VEHICLE_BUTTON :{BLACK}Build Vehicle +STR_BUILD_VEHICLE_SHIP_BUILD_VEHICLE_BUTTON :{BLACK}Build Ship +STR_BUILD_VEHICLE_AIRCRAFT_BUILD_VEHICLE_BUTTON :{BLACK}Build Aircraft + +STR_BUILD_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Train vehicle selection list - click on vehicle for information +STR_BUILD_VEHICLE_ROAD_LIST_TOOLTIP :{BLACK}Road vehicle selection list - click on vehicle for information +STR_BUILD_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Ship selection list - click on ship for information +STR_BUILD_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft selection list - click on aircraft for information + +STR_BUILD_VEHICLE_TRAIN_BUILD_VEHICLE_TOOLTIP :{BLACK}Build the highlighted train vehicle +STR_BUILD_VEHICLE_ROAD_BUILD_VEHICLE_TOOLTIP :{BLACK}Build the highlighted road vehicle +STR_BUILD_VEHICLE_SHIP_BUILD_VEHICLE_TOOLTIP :{BLACK}Build the highlighted ship +STR_BUILD_VEHICLE_AIRCRAFT_BUILD_VEHICLE_TOOLTIP :{BLACK}Build the highlighted aircraft + +STR_BUILD_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Rename +STR_BUILD_VEHICLE_ROAD_VEHICLE_RENAME_BUTTON :{BLACK}Rename +STR_BUILD_VEHICLE_SHIP_RENAME_BUTTON :{BLACK}Rename +STR_BUILD_VEHICLE_AIRCRAFT_RENAME_BUTTON :{BLACK}Rename + +STR_BUILD_VEHICLE_TRAIN_RENAME_TOOLTIP :{BLACK}Rename train vehicle type +STR_BUILD_VEHICLE_ROAD_VEHICLE_RENAME_TOOLTIP :{BLACK}Rename road vehicle type +STR_BUILD_VEHICLE_SHIP_RENAME_TOOLTIP :{BLACK}Rename ship type +STR_BUILD_VEHICLE_AIRCRAFT_RENAME_TOOLTIP :{BLACK}Rename aircraft type + +STR_QUERY_RENAME_TRAIN_TYPE_CAPTION :{WHITE}Rename train vehicle type +STR_QUERY_RENAME_ROAD_VEHICLE_TYPE_CAPTION :{WHITE}Rename road vehicle type +STR_QUERY_RENAME_SHIP_TYPE_CAPTION :{WHITE}Rename ship type +STR_QUERY_RENAME_AIRCRAFT_TYPE_CAPTION :{WHITE}Rename aircraft type + +STR_DEPOT_TRAIN_NEW_VEHICLES_BUTTON :{BLACK}New Vehicles +STR_DEPOT_ROAD_NEW_VEHICLES_BUTTON :{BLACK}New Vehicles +STR_DEPOT_SHIP_NEW_VEHICLES_BUTTON :{BLACK}New Ships +STR_DEPOT_AIRCRAFT_NEW_VEHICLES_BUTTON :{BLACK}New Aircraft + +STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Trains - click on train for info., drag vehicle to add/remove from train +STR_DEPOT_ROAD_LIST_TOOLTIP :{BLACK}Vehicles - click on vehicle for information +STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Ships - click on ship for information +STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft - click on aircraft for information + +STR_DEPOT_TRAIN_NEW_VEHICLES_TOOLTIP :{BLACK}Build new train vehicle +STR_DEPOT_ROAD_NEW_VEHICLES_TOOLTIP :{BLACK}Build new road vehicle +STR_DEPOT_SHIP_NEW_VEHICLES_TOOLTIP :{BLACK}Build new ship +STR_DEPOT_AIRCRAFT_NEW_VEHICLES_TOOLTIP :{BLACK}Build new aircraft + +STR_DEPOT_TRAIN_SELL_TOOLTIP :{BLACK}Drag train vehicle to here to sell it +STR_DEPOT_ROAD_SELL_TOOLTIP :{BLACK}Drag road vehicle to here to sell it +STR_DEPOT_SHIP_SELL_TOOLTIP :{BLACK}Drag ship to here to sell it +STR_DEPOT_AIRCRAFT_SELL_TOOLTIP :{BLACK}Drag aircraft to here to sell it + +STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Centre main view on train depot location +STR_DEPOT_ROAD_LOCATION_TOOLTIP :{BLACK}Centre main view on road vehicle depot location +STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}Centre main view on ship depot location +STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centre main view on hangar location + + ### depot strings STR_DEPOT_SELL_CONFIRMATION_TEXT :{YELLOW}You are about to sell all the vehicles in the depot. Are you sure? STR_DEPOT_WRONG_DEPOT_TYPE :Wrong depot type diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 88eea4f30..881f09413 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -95,7 +95,7 @@ Vehicle *EnsureNoTrainOnTrackProc(Vehicle *v, void *data) Train *t = Train::From(v); if ((t->track != rail_bits) && !TracksOverlap(t->track | rail_bits)) return NULL; - _error_message = VehicleInTheWayErrMsg(v); + _error_message = STR_ERROR_TRAIN_IN_THE_WAY + v->type; return v; } diff --git a/src/vehicle.cpp b/src/vehicle.cpp index c96a8dc8e..fc5fb2ea5 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -139,16 +139,6 @@ void ShowNewGrfVehicleError(EngineID engine, StringID part1, StringID part2, GRF DEBUG(grf, 0, "%s", buffer + 3); } -StringID VehicleInTheWayErrMsg(const Vehicle *v) -{ - switch (v->type) { - case VEH_TRAIN: return STR_ERROR_TRAIN_IN_THE_WAY; - case VEH_ROAD: return STR_ERROR_ROAD_VEHICLE_IN_THE_WAY; - case VEH_AIRCRAFT: return STR_ERROR_AIRCRAFT_IN_THE_WAY; - default: return STR_ERROR_SHIP_IN_THE_WAY; - } -} - static Vehicle *EnsureNoVehicleProcZ(Vehicle *v, void *data) { byte z = *(byte*)data; @@ -156,7 +146,7 @@ static Vehicle *EnsureNoVehicleProcZ(Vehicle *v, void *data) if (v->type == VEH_DISASTER || (v->type == VEH_AIRCRAFT && v->subtype == AIR_SHADOW)) return NULL; if (v->z_pos > z) return NULL; - _error_message = VehicleInTheWayErrMsg(v); + _error_message = STR_ERROR_TRAIN_IN_THE_WAY + v->type; return v; } @@ -172,7 +162,7 @@ static Vehicle *GetVehicleTunnelBridgeProc(Vehicle *v, void *data) if (v->type != VEH_TRAIN && v->type != VEH_ROAD && v->type != VEH_SHIP) return NULL; if (v == (const Vehicle *)data) return NULL; - _error_message = VehicleInTheWayErrMsg(v); + _error_message = STR_ERROR_TRAIN_IN_THE_WAY + v->type; return v; } @@ -1036,18 +1026,8 @@ void VehicleEnterDepot(Vehicle *v) /* Vehicles are always stopped on entering depots. Do not restart this one. */ _vehicles_to_autoreplace[v] = false; if (v->owner == _local_company) { - StringID string; - - switch (v->type) { - case VEH_TRAIN: string = STR_NEWS_TRAIN_IS_WAITING; break; - case VEH_ROAD: string = STR_NEWS_ROAD_VEHICLE_IS_WAITING; break; - case VEH_SHIP: string = STR_NEWS_SHIP_IS_WAITING; break; - case VEH_AIRCRAFT: string = STR_NEWS_AIRCRAFT_IS_WAITING; break; - default: NOT_REACHED(); - } - SetDParam(0, v->index); - AddVehicleNewsItem(string, NS_ADVICE, v->index); + AddVehicleNewsItem(STR_NEWS_TRAIN_IS_WAITING + v->type, NS_ADVICE, v->index); } AI::NewEvent(v->owner, new AIEventVehicleWaitingInDepot(v->index)); } diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 36805b8d3..6bc2fde7a 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -93,27 +93,13 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, } if (flags & DC_EXEC) { - static const StringID vehicle_waiting_in_depot[] = { - STR_NEWS_TRAIN_IS_WAITING, - STR_NEWS_ROAD_VEHICLE_IS_WAITING, - STR_NEWS_SHIP_IS_WAITING, - STR_NEWS_AIRCRAFT_IS_WAITING, - }; - - static const WindowClass vehicle_list[] = { - WC_TRAINS_LIST, - WC_ROADVEH_LIST, - WC_SHIPS_LIST, - WC_AIRCRAFT_LIST, - }; - - if (v->IsStoppedInDepot() && (flags & DC_AUTOREPLACE) == 0) DeleteVehicleNews(p1, vehicle_waiting_in_depot[v->type]); + if (v->IsStoppedInDepot() && (flags & DC_AUTOREPLACE) == 0) DeleteVehicleNews(p1, STR_NEWS_TRAIN_IS_WAITING + v->type); v->vehstatus ^= VS_STOPPED; if (v->type != VEH_TRAIN) v->cur_speed = 0; // trains can stop 'slowly' InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); - InvalidateWindowClasses(vehicle_list[v->type]); + InvalidateWindowClasses(GetWindowClassForVehicleType(v->type)); } return CommandCost(); } diff --git a/src/vehicle_func.h b/src/vehicle_func.h index e42b3b3b6..061b4ddd8 100644 --- a/src/vehicle_func.h +++ b/src/vehicle_func.h @@ -43,7 +43,6 @@ CommandCost GetRefitCost(EngineID engine_type); void ViewportAddVehicles(DrawPixelInfo *dpi); void ShowNewGrfVehicleError(EngineID engine, StringID part1, StringID part2, GRFBugs bug_type, bool critical); -StringID VehicleInTheWayErrMsg(const Vehicle *v); bool HasVehicleOnTunnelBridge(TileIndex tile, TileIndex endtile, const Vehicle *ignore = NULL); void DecreaseVehicleValue(Vehicle *v); diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 3ff68d2b7..55124618b 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -297,37 +297,10 @@ struct RefitWindow : public Window { if (v->type == VEH_TRAIN) this->length = CountVehiclesInChain(v); SetVScrollCount(this, this->list->num_lines); - switch (v->type) { - case VEH_TRAIN: - this->widget[VRW_SELECTHEADER].tooltips = STR_REFIT_TRAIN_LIST_TOOLTIP; - this->widget[VRW_MATRIX].tooltips = STR_REFIT_TRAIN_LIST_TOOLTIP; - this->widget[VRW_REFITBUTTON].data = STR_REFIT_TRAIN_REFIT_BUTTON; - this->widget[VRW_REFITBUTTON].tooltips = STR_REFIT_TRAIN_REFIT_TOOLTIP; - break; - - case VEH_ROAD: - this->widget[VRW_SELECTHEADER].tooltips = STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP; - this->widget[VRW_MATRIX].tooltips = STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP; - this->widget[VRW_REFITBUTTON].data = STR_REFIT_ROAD_VEHICLE_REFIT_BUTTON; - this->widget[VRW_REFITBUTTON].tooltips = STR_REFIT_ROAD_VEHICLE_REFIT_TOOLTIP; - break; - - case VEH_SHIP: - this->widget[VRW_SELECTHEADER].tooltips = STR_REFIT_SHIP_LIST_TOOLTIP; - this->widget[VRW_MATRIX].tooltips = STR_REFIT_SHIP_LIST_TOOLTIP; - this->widget[VRW_REFITBUTTON].data = STR_REFIT_SHIP_REFIT_BUTTON; - this->widget[VRW_REFITBUTTON].tooltips = STR_REFIT_SHIP_REFIT_TOOLTIP; - break; - - case VEH_AIRCRAFT: - this->widget[VRW_SELECTHEADER].tooltips = STR_REFIT_AIRCRAFT_LIST_TOOLTIP; - this->widget[VRW_MATRIX].tooltips = STR_REFIT_AIRCRAFT_LIST_TOOLTIP; - this->widget[VRW_REFITBUTTON].data = STR_REFIT_AIRCRAFT_REFIT_BUTTON; - this->widget[VRW_REFITBUTTON].tooltips = STR_REFIT_AIRCRAFT_REFIT_TOOLTIP; - break; - - default: NOT_REACHED(); - } + this->widget[VRW_SELECTHEADER].tooltips = STR_REFIT_TRAIN_LIST_TOOLTIP + v->type; + this->widget[VRW_MATRIX].tooltips = STR_REFIT_TRAIN_LIST_TOOLTIP + v->type; + this->widget[VRW_REFITBUTTON].data = STR_REFIT_TRAIN_REFIT_BUTTON + v->type; + this->widget[VRW_REFITBUTTON].tooltips = STR_REFIT_TRAIN_REFIT_TOOLTIP + v->type; this->FindWindowPlacementAndResize(desc); } @@ -393,16 +366,7 @@ struct RefitWindow : public Window { const Vehicle *v = Vehicle::Get(this->window_number); if (this->order == INVALID_VEH_ORDER_ID) { - int command = 0; - - switch (v->type) { - default: NOT_REACHED(); - case VEH_TRAIN: command = CMD_REFIT_RAIL_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_REFIT_TRAIN); break; - case VEH_ROAD: command = CMD_REFIT_ROAD_VEH | CMD_MSG(STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE); break; - case VEH_SHIP: command = CMD_REFIT_SHIP | CMD_MSG(STR_ERROR_CAN_T_REFIT_SHIP); break; - case VEH_AIRCRAFT: command = CMD_REFIT_AIRCRAFT | CMD_MSG(STR_ERROR_CAN_T_REFIT_AIRCRAFT); break; - } - if (DoCommandP(v->tile, v->index, this->cargo->cargo | this->cargo->subtype << 8, command)) delete this; + if (DoCommandP(v->tile, v->index, this->cargo->cargo | this->cargo->subtype << 8, GetCmdRefitVeh(v) | CMD_MSG(STR_ERROR_CAN_T_REFIT_TRAIN + v->type))) delete this; } else { if (DoCommandP(v->tile, v->index, this->cargo->cargo | this->cargo->subtype << 8 | this->order << 16, CMD_ORDER_REFIT)) delete this; } @@ -978,13 +942,7 @@ struct VehicleListWindow : public BaseVehicleListWindow { break; case VLW_DEPOT_LIST: - switch (this->vehicle_type) { - case VEH_TRAIN: SetDParam(0, STR_DEPOT_TRAIN_CAPTION); break; - case VEH_ROAD: SetDParam(0, STR_DEPOT_ROAD_CAPTION); break; - case VEH_SHIP: SetDParam(0, STR_DEPOT_SHIP_CAPTION); break; - case VEH_AIRCRAFT: SetDParam(0, STR_DEPOT_AIRCRAFT_CAPTION); break; - default: NOT_REACHED(); - } + SetDParam(0, STR_DEPOT_TRAIN_CAPTION + this->vehicle_type); if (this->vehicle_type == VEH_AIRCRAFT) { SetDParam(1, index); // Airport name } else { @@ -1298,6 +1256,7 @@ struct VehicleDetailsWindow : Window { VehicleDetailsWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number) { const Vehicle *v = Vehicle::Get(this->window_number); + this->widget[VLD_WIDGET_RENAME_VEHICLE].tooltips = STR_VEHICLE_DETAILS_TRAIN_RENAME + v->type; switch (v->type) { case VEH_TRAIN: @@ -1307,13 +1266,9 @@ struct VehicleDetailsWindow : Window { this->height += 12; this->resize.step_height = 14; this->resize.height = this->height - 14 * 2; // Minimum of 4 wagons in the display - - this->widget[VLD_WIDGET_RENAME_VEHICLE].tooltips = STR_VEHICLE_DETAILS_TRAIN_RENAME; break; case VEH_ROAD: { - this->widget[VLD_WIDGET_RENAME_VEHICLE].tooltips = STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME; - if (!RoadVehicle::From(v)->HasArticulatedPart()) break; /* Draw the text under the vehicle instead of next to it, minus the @@ -1329,12 +1284,10 @@ struct VehicleDetailsWindow : Window { } break; case VEH_SHIP: - this->widget[VLD_WIDGET_RENAME_VEHICLE].tooltips = STR_VEHICLE_DETAILS_SHIP_RENAME; break; case VEH_AIRCRAFT: ResizeWindow(this, 0, 11); - this->widget[VLD_WIDGET_RENAME_VEHICLE].tooltips = STR_VEHICLE_DETAILS_AIRCRAFT_RENAME; break; default: NOT_REACHED(); } @@ -1482,19 +1435,11 @@ struct VehicleDetailsWindow : Window { virtual void OnClick(Point pt, int widget) { - /** Message strings for renaming vehicles indexed by vehicle type. */ - static const StringID _name_vehicle_title[] = { - STR_QUERY_RENAME_TRAIN_CAPTION, - STR_QUERY_RENAME_ROAD_VEHICLE_CAPTION, - STR_QUERY_RENAME_SHIP_CAPTION, - STR_QUERY_RENAME_AIRCRAFT_CAPTION - }; - switch (widget) { case VLD_WIDGET_RENAME_VEHICLE: {// rename const Vehicle *v = Vehicle::Get(this->window_number); SetDParam(0, v->index); - ShowQueryString(STR_VEHICLE_NAME, _name_vehicle_title[v->type], MAX_LENGTH_VEHICLE_NAME_BYTES, MAX_LENGTH_VEHICLE_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT); + ShowQueryString(STR_VEHICLE_NAME, STR_QUERY_RENAME_TRAIN_CAPTION + v->type, MAX_LENGTH_VEHICLE_NAME_BYTES, MAX_LENGTH_VEHICLE_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT); } break; case VLD_WIDGET_INCREASE_SERVICING_INTERVAL: // increase int @@ -1529,17 +1474,9 @@ struct VehicleDetailsWindow : Window { virtual void OnQueryTextFinished(char *str) { - /** Message strings for error while renaming indexed by vehicle type. */ - static const StringID _name_vehicle_error[] = { - STR_ERROR_CAN_T_RENAME_TRAIN, - STR_ERROR_CAN_T_RENAME_ROAD_VEHICLE, - STR_ERROR_CAN_T_RENAME_SHIP, - STR_ERROR_CAN_T_RENAME_AIRCRAFT - }; - if (str == NULL) return; - DoCommandP(0, this->window_number, 0, CMD_RENAME_VEHICLE | CMD_MSG(_name_vehicle_error[Vehicle::Get(this->window_number)->type]), NULL, str); + DoCommandP(0, this->window_number, 0, CMD_RENAME_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_RENAME_TRAIN + Vehicle::Get(this->window_number)->type), NULL, str); } virtual void OnResize(Point delta) @@ -1727,31 +1664,25 @@ struct VehicleViewWindow : Window { (v->type == VEH_TRAIN) ? VV_INITIAL_VIEWPORT_HEIGHT_TRAIN : VV_INITIAL_VIEWPORT_HEIGHT, this->window_number | (1 << 31), _vehicle_view_zoom_levels[v->type]); + this->widget[VVW_WIDGET_START_STOP_VEH].tooltips = STR_VEHICLE_VIEW_TRAIN_STATE_START_STOP_TOOLTIP + v->type; + this->widget[VVW_WIDGET_CENTER_MAIN_VIEH].tooltips = STR_VEHICLE_VIEW_TRAIN_LOCATION_TOOLTIP + v->type; + this->widget[VVW_WIDGET_REFIT_VEH].tooltips = STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP + v->type; + this->widget[VVW_WIDGET_GOTO_DEPOT].tooltips = STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP + v->type; + this->widget[VVW_WIDGET_SHOW_ORDERS].tooltips = STR_VEHICLE_VIEW_TRAIN_ORDERS_TOOLTIP + v->type; + this->widget[VVW_WIDGET_SHOW_DETAILS].tooltips = STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP + v->type; + this->widget[VVW_WIDGET_CLONE_VEH].tooltips = STR_CLONE_TRAIN_INFO + v->type; + /* * fill in data and tooltip codes for the widgets and * move some of the buttons for trains */ switch (v->type) { case VEH_TRAIN: - this->widget[VVW_WIDGET_START_STOP_VEH].tooltips = STR_VEHICLE_VIEW_TRAIN_STATE_START_STOP_TOOLTIP; - - this->widget[VVW_WIDGET_CENTER_MAIN_VIEH].tooltips = STR_VEHICLE_VIEW_TRAIN_LOCATION_TOOLTIP; - this->widget[VVW_WIDGET_GOTO_DEPOT].data = SPR_SEND_TRAIN_TODEPOT; - this->widget[VVW_WIDGET_GOTO_DEPOT].tooltips = STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP; - - this->widget[VVW_WIDGET_REFIT_VEH].tooltips = STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP; - - this->widget[VVW_WIDGET_SHOW_ORDERS].tooltips = STR_VEHICLE_VIEW_TRAIN_ORDERS_TOOLTIP; - - this->widget[VVW_WIDGET_SHOW_DETAILS].tooltips = STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP; - this->widget[VVW_WIDGET_CLONE_VEH].data = SPR_CLONE_TRAIN; - this->widget[VVW_WIDGET_CLONE_VEH].tooltips = STR_CLONE_TRAIN_INFO; this->widget[VVW_WIDGET_TURN_AROUND].tooltips = STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP; - /* due to more buttons we must modify the layout a bit for trains */ this->widget[VVW_WIDGET_PANEL].bottom = 121; this->widget[VVW_WIDGET_VIEWPORT].bottom = 119; @@ -1779,41 +1710,15 @@ struct VehicleViewWindow : Window { break; case VEH_ROAD: - this->widget[VVW_WIDGET_START_STOP_VEH].tooltips = STR_VEHICLE_VIEW_ROAD_STATE_START_STOP_TOOLTIP; - - this->widget[VVW_WIDGET_CENTER_MAIN_VIEH].tooltips = STR_VEHICLE_VIEW_ROAD_LOCATION_TOOLTIP; - this->widget[VVW_WIDGET_GOTO_DEPOT].data = SPR_SEND_ROADVEH_TODEPOT; - this->widget[VVW_WIDGET_GOTO_DEPOT].tooltips = STR_VEHICLE_VIEW_ROAD_SEND_TO_DEPOT_TOOLTIP; - - this->widget[VVW_WIDGET_REFIT_VEH].tooltips = STR_VEHICLE_VIEW_ROAD_VEHICLE_REFIT_TOOLTIP; - - this->widget[VVW_WIDGET_SHOW_ORDERS].tooltips = STR_VEHICLE_VIEW_ROAD_ORDERS_TOOLTIP; - - this->widget[VVW_WIDGET_SHOW_DETAILS].tooltips = STR_VEHICLE_VIEW_ROAD_SHOW_DETAILS_TOOLTIP; - this->widget[VVW_WIDGET_CLONE_VEH].data = SPR_CLONE_ROADVEH; - this->widget[VVW_WIDGET_CLONE_VEH].tooltips = STR_CLONE_ROAD_VEHICLE_INFO; this->SetWidgetHiddenState(VVW_WIDGET_FORCE_PROCEED, true); break; case VEH_SHIP: - this->widget[VVW_WIDGET_START_STOP_VEH].tooltips = STR_VEHICLE_VIEW_SHIP_STATE_START_STOP_TOOLTIP; - - this->widget[VVW_WIDGET_CENTER_MAIN_VIEH].tooltips = STR_VEHICLE_VIEW_SHIP_LOCATION_TOOLTIP; - this->widget[VVW_WIDGET_GOTO_DEPOT].data = SPR_SEND_SHIP_TODEPOT; - this->widget[VVW_WIDGET_GOTO_DEPOT].tooltips = STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP; - - this->widget[VVW_WIDGET_REFIT_VEH].tooltips = STR_VEHICLE_VIEW_SHIP_REFIT_TOOLTIP; - - this->widget[VVW_WIDGET_SHOW_ORDERS].tooltips = STR_VEHICLE_VIEW_SHIP_ORDERS_TOOLTIP; - - this->widget[VVW_WIDGET_SHOW_DETAILS].tooltips = STR_VEHICLE_VIEW_SHIP_SHOW_DETAILS_TOOLTIP; - this->widget[VVW_WIDGET_CLONE_VEH].data = SPR_CLONE_SHIP; - this->widget[VVW_WIDGET_CLONE_VEH].tooltips = STR_CLONE_SHIP_INFO; this->SetWidgetsHiddenState(true, VVW_WIDGET_TURN_AROUND, @@ -1822,21 +1727,8 @@ struct VehicleViewWindow : Window { break; case VEH_AIRCRAFT: - this->widget[VVW_WIDGET_START_STOP_VEH].tooltips = STR_VEHICLE_VIEW_AIRCRAFT_STATE_START_STOP_TOOLTIP; - - this->widget[VVW_WIDGET_CENTER_MAIN_VIEH].tooltips = STR_VEHICLE_VIEW_AIRCRAFT_LOCATION_TOOLTIP; - this->widget[VVW_WIDGET_GOTO_DEPOT].data = SPR_SEND_AIRCRAFT_TODEPOT; - this->widget[VVW_WIDGET_GOTO_DEPOT].tooltips = STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP; - - this->widget[VVW_WIDGET_REFIT_VEH].tooltips = STR_VEHICLE_VIEW_AIRCRAFT_REFIT_TOOLTIP; - - this->widget[VVW_WIDGET_SHOW_ORDERS].tooltips = STR_VEHICLE_VIEW_AIRCRAFT_ORDERS_TOOLTIP; - - this->widget[VVW_WIDGET_SHOW_DETAILS].tooltips = STR_VEHICLE_VIEW_AIRCRAFT_SHOW_DETAILS_TOOLTIP; - this->widget[VVW_WIDGET_CLONE_VEH].data = SPR_CLONE_AIRCRAFT; - this->widget[VVW_WIDGET_CLONE_VEH].tooltips = STR_CLONE_AIRCRAFT_INFO; this->SetWidgetsHiddenState(true, VVW_WIDGET_TURN_AROUND, @@ -1844,7 +1736,7 @@ struct VehicleViewWindow : Window { WIDGET_LIST_END); break; - default: NOT_REACHED(); + default: NOT_REACHED(); } this->FindWindowPlacementAndResize(desc); @@ -1860,22 +1752,6 @@ struct VehicleViewWindow : Window { virtual void OnPaint() { - /** Message strings for heading to depot indexed by vehicle type. */ - static const StringID _heading_for_depot_strings[] = { - STR_HEADING_FOR_TRAIN_DEPOT, - STR_HEADING_FOR_ROAD_DEPOT, - STR_HEADING_FOR_SHIP_DEPOT, - STR_HEADING_FOR_HANGAR, - }; - - /** Message strings for heading to depot and servicing indexed by vehicle type. */ - static const StringID _heading_for_depot_service_strings[] = { - STR_HEADING_FOR_TRAIN_DEPOT_SERVICE, - STR_HEADING_FOR_ROAD_DEPOT_SERVICE, - STR_HEADING_FOR_SHIP_DEPOT_SERVICE, - STR_HEADING_FOR_HANGAR_SERVICE, - }; - const Vehicle *v = Vehicle::Get(this->window_number); StringID str; bool is_localcompany = v->owner == _local_company; @@ -1935,9 +1811,9 @@ struct VehicleViewWindow : Window { SetDParam(1, v->GetDisplaySpeed()); } if (v->current_order.GetDepotActionType() & ODATFB_HALT) { - str = _heading_for_depot_strings[v->type] + _settings_client.gui.vehicle_speed; + str = STR_HEADING_FOR_TRAIN_DEPOT + 2 * v->type + _settings_client.gui.vehicle_speed; } else { - str = _heading_for_depot_service_strings[v->type] + _settings_client.gui.vehicle_speed; + str = STR_HEADING_FOR_TRAIN_DEPOT_SERVICE + 2 * v->type + _settings_client.gui.vehicle_speed; } } break; |