diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index cfb464f09f..2092dd6871 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2628,7 +2628,7 @@ CommandCost CmdBuildDock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 /* Get the water class of the water tile before it is cleared.*/ WaterClass wc = GetWaterClass(flat_tile); - ret = DoCommand(flat_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); + ret = DoCommand(flat_tile, 0, 0, flags | DC_ALLOW_REMOVE_WATER, CMD_LANDSCAPE_CLEAR); if (ret.Failed()) return ret; TileIndex adjacent_tile = flat_tile + TileOffsByDiagDir(direction); diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index ebf710a41c..a6b62235fd 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -123,13 +123,13 @@ CommandCost CmdBuildShipDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, ui CommandCost cost = CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_DEPOT_SHIP]); bool add_cost = !IsWaterTile(tile); - CommandCost ret = DoCommand(tile, 0, 0, flags | DC_AUTO, CMD_LANDSCAPE_CLEAR); + CommandCost ret = DoCommand(tile, 0, 0, flags | DC_AUTO | DC_ALLOW_REMOVE_WATER, CMD_LANDSCAPE_CLEAR); if (ret.Failed()) return ret; if (add_cost) { cost.AddCost(ret); } add_cost = !IsWaterTile(tile2); - ret = DoCommand(tile2, 0, 0, flags | DC_AUTO, CMD_LANDSCAPE_CLEAR); + ret = DoCommand(tile2, 0, 0, flags | DC_AUTO | DC_ALLOW_REMOVE_WATER, CMD_LANDSCAPE_CLEAR); if (ret.Failed()) return ret; if (add_cost) { cost.AddCost(ret); @@ -476,7 +476,10 @@ static CommandCost ClearTile_Water(TileIndex tile, DoCommandFlag flags) case WATER_TILE_CLEAR: { if (flags & DC_NO_WATER) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER); - if (!IsCanal(tile) && _game_mode != GM_EDITOR && !_settings_game.construction.enable_remove_water && !(flags & DC_ALLOW_REMOVE_WATER)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER); + if (!IsCanal(tile) && _game_mode != GM_EDITOR && !_settings_game.construction.enable_remove_water && !(flags & DC_ALLOW_REMOVE_WATER) + && _current_company != OWNER_WATER) { + return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER); + } Money base_cost = IsCanal(tile) ? _price[PR_CLEAR_CANAL] : _price[PR_CLEAR_WATER]; /* Make sure freeform edges are allowed or it's not an edge tile. */