diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 407f7d2308..ce7cbad7af 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -912,7 +912,8 @@ struct DepotWindow : Window { { if (_ctrl_pressed) { /* Share-clone, do not open new viewport, and keep tool active */ - DoCommandP(this->window_number, v->index, 1, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN + v->type), NULL); + DoCommandP(this->window_number, v->index, 1, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN + v->type), + _settings_client.gui.open_vehicle_gui_clone_share ? CcCloneVehicle : NULL); } else { /* Copy-clone, open viewport for new vehicle, and deselect the tool (assume player wants to changs things on new vehicle) */ if (DoCommandP(this->window_number, v->index, 0, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN + v->type), CcCloneVehicle)) { diff --git a/src/lang/english.txt b/src/lang/english.txt index 3fd5944a44..e9bdf02439 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1342,6 +1342,8 @@ STR_CONFIG_SETTING_DISABLE_TOP_VEH_LIST_MASS_ACTIONS :Disable mass ac STR_CONFIG_SETTING_DISABLE_TOP_VEH_LIST_MASS_ACTIONS_HELPTEXT :This disables depot/service and start/stop buttons for all vehicle and all ungrouped vehicle lists. This is intended to help avoid the negative impact of accidentally pressing one of these buttons. STR_CONFIG_SETTING_SHOW_DEPOT_SELL_GUI :Show go to depot/hangar and sell feature: {STRING2} STR_CONFIG_SETTING_SHOW_DEPOT_SELL_GUI_HELPTEXT :Show go to depot/hangar and sell vehicle on arrival feature. When enabled, the behaviour of the vehicle go to depot button is changed. +STR_CONFIG_SETTING_OPEN_VEHICLE_GUI_CLONE_SHARE :Open new vehicle window when share-cloning: {STRING2} +STR_CONFIG_SETTING_OPEN_VEHICLE_GUI_CLONE_SHARE_HELPTEXT :When enabled, open the newly cloned vehicle's window when cloning a vehicle with shared orders from the depot window. STR_CONFIG_SETTING_ADV_SIG_BRIDGE_TUN_MODES :Enable signals on bridges/tunnels advanced modes: {STRING2} STR_CONFIG_SETTING_ADV_SIG_BRIDGE_TUN_MODES_HELPTEXT :Enables use of advanced modes of signal simulation on bridges and tunnels. When disabled, bridges/tunnels which are not already in an advanced mode cannot be changed to an advanced mode, however other players may choose to enable this setting and use an advanced mode. diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 0f0ecfd833..2c0752fe0a 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1620,6 +1620,7 @@ static SettingsContainer &GetSettingsTree() interface->Add(new SettingEntry("gui.disable_top_veh_list_mass_actions")); interface->Add(new SettingEntry("gui.adv_sig_bridge_tun_modes")); interface->Add(new SettingEntry("gui.show_depot_sell_gui")); + interface->Add(new SettingEntry("gui.open_vehicle_gui_clone_share")); } SettingsPage *advisors = main->Add(new SettingsPage(STR_CONFIG_SETTING_ADVISORS)); diff --git a/src/settings_type.h b/src/settings_type.h index 56b879da17..45e8fa4b1f 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -194,6 +194,7 @@ struct GUISettings { bool disable_top_veh_list_mass_actions; ///< disable mass actions buttons for non-group vehicle lists bool adv_sig_bridge_tun_modes; ///< Enable advanced modes for signals on bridges/tunnels. bool show_depot_sell_gui; ///< Show go to depot and sell in UI + bool open_vehicle_gui_clone_share; ///< Open vehicle GUI when share-cloning vehicle from depot GUI uint16 console_backlog_timeout; ///< the minimum amount of time items should be in the console backlog before they will be removed in ~3 seconds granularity. uint16 console_backlog_length; ///< the minimum amount of items in the console backlog before items will be removed. diff --git a/src/table/settings.ini b/src/table/settings.ini index 12e21f1daa..92e97a8ec6 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -4300,6 +4300,14 @@ str = STR_CONFIG_SETTING_SHOW_DEPOT_SELL_GUI strhelp = STR_CONFIG_SETTING_SHOW_DEPOT_SELL_GUI_HELPTEXT cat = SC_EXPERT +[SDTC_BOOL] +var = gui.open_vehicle_gui_clone_share +flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC +def = false +str = STR_CONFIG_SETTING_OPEN_VEHICLE_GUI_CLONE_SHARE +strhelp = STR_CONFIG_SETTING_OPEN_VEHICLE_GUI_CLONE_SHARE_HELPTEXT +cat = SC_EXPERT + ; For the dedicated build we'll enable dates in logs by default. [SDTC_BOOL] ifdef = DEDICATED