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
string"none","rain"or"snow".
- getTotal()Source
Get the water collected since the gauge was placed or last emptied.
Returns
numberThe total in millimetres.
- empty()Source
Empty the gauge, resetting the collected total to zero.
- getValue()Source
Get the latest reading.
Returns
numberThe measured value, in this instrument's unit.
- getUnit()Source
Get the unit readings are in.
Returns
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
- { [
string] =any} A table withvalue,unit,time(game time of the sample, in ticks) andsource(where the value came from, e.g."thermoo","sable","serene_seasons"or"vanilla").
- { [