rain_gauge

Measures precipitation falling on the gauge: the current rate, and the total collected since the gauge was placed or last emptied. Snow counts as its melted water.

getPrecipitation()Get what is falling on the gauge right now.
getTotal()Get the water collected since the gauge was placed or last emptied.
empty()Empty the gauge, resetting the collected total to zero.
getValue()Get the latest reading.
getUnit()Get the unit readings are in.
read()Get the latest reading with its context.
getPrecipitation()Source

Get what is falling on the gauge right now.

Returns

  1. string "none", "rain" or "snow".
getTotal()Source

Get the water collected since the gauge was placed or last emptied.

Returns

  1. number The total in millimetres.
empty()Source

Empty the gauge, resetting the collected total to zero.

getValue()Source

Get the latest reading.

Returns

  1. number The measured value, in this instrument's unit.
getUnit()Source

Get the unit readings are in.

Returns

  1. string "C", "rh", "hPa", "mm/h", or for the almanac "year" (fraction of the season year) or "moon" (fraction of the lunar cycle, where there is no season calendar).
read()Source

Get the latest reading with its context.

Returns

  1. { [string] = any } A table with value, unit, time (game time of the sample, in ticks) and source (where the value came from, e.g. "thermoo", "sable", "serene_seasons" or "vanilla").