Is my emoji dry?

05AB1E, 18 17 15 bytes




|                  # Take all input as a list of strings.
 …-_-              # 3-char string, which results into "-_-".
     123:)         # Replace "-_-" with 123.
          ø        # Zip, resulting into the columns of the 2D array.
           €J      # Join each of them.
             ە    # For each, convert to integer. If this is not possible, it will ignore
                     the result.
                   # Implicitly output the array.

Uses the CP-1252 encoding. Try it online! (make sure to pad all lines with spaces to the same length..

JavaScript (ES6), 95 bytes


Input should be an array of strings, with each line padded with spaces to form a square. Output is an array of 1-indexed numbers.


var solution =

  [...a[n=0]].map((_,i)=>  // n = current index of emoji, for each column i of input>              // for each line s
      (c=s[i])             // c = character in column
      >"-"&c<"_"?p=1       // p = 1 if column is protected from rain
      :n+=!++c,            // increment n if emoji character found, c = 1 if last line
                           // contained a space in the current column
    |p<!c&&o.push(n),      // if the emoji is not protected in the current column
<textarea id="input" rows="6" cols="40">   /\   
  /  \  
     -_-</textarea><br />
<button onclick="result.textContent=solution(input.value.split('\n'))">Go</button>
<pre id="result"></pre>

JavaScript (ES6), 92 bytes


Accepts a ragged array of lines and returns a 1-indexed result. Explanation:

a=>               Loop through all lines
 s=>s.replace(/\S/g,    Loop through all non-whitepsace
  (c,i)=>c>'-'&c<'_'    If it's part of the umbrella
   ?u[i]=3              Mark that column as dry
   :++n&                Add 1 to the emoji index
     u[i]||             If the column is not dry
      r.push(n)         Add the emoji index to the result
  ),n=0,u=[],r=[]       Initialise variables
 )&&r                   Return result