From 0fc7cdb1e4252f47846e57bb16acc33e1b995c6c Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Wed, 23 Nov 2022 15:48:19 -0700 Subject: [PATCH] Change: Allow building canal by area outside editor (#10173) --- src/dock_gui.cpp | 2 +- src/water_cmd.cpp | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 0245e51f80..c8f0ad46a3 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -192,7 +192,7 @@ struct BuildDocksToolbarWindow : Window { { switch (this->last_clicked_widget) { case WID_DT_CANAL: // Build canal button - VpStartPlaceSizing(tile, (_game_mode == GM_EDITOR) ? VPM_X_AND_Y : VPM_X_OR_Y, DDSP_CREATE_WATER); + VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_CREATE_WATER); break; case WID_DT_LOCK: // Build lock button diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 4f3ed30620..44be4dc367 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -443,12 +443,6 @@ CommandCost CmdBuildCanal(DoCommandFlag flags, TileIndex tile, TileIndex start_t /* Outside of the editor you can only build canals, not oceans */ if (wc != WATER_CLASS_CANAL && _game_mode != GM_EDITOR) return CMD_ERROR; - /* Outside the editor you can only drag canals, and not areas */ - if (_game_mode != GM_EDITOR) { - TileArea ta(tile, start_tile); - if (ta.w != 1 && ta.h != 1) return CMD_ERROR; - } - CommandCost cost(EXPENSES_CONSTRUCTION); std::unique_ptr iter;