Add UI setting for whether to open new vehicle GUI when share-cloning

This commit is contained in:
Jonathan G Rennison
2019-02-25 23:04:10 +00:00
parent f1a6f1161d
commit 7b8db50fd5
5 changed files with 14 additions and 1 deletions

View File

@@ -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)) {