Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

WeatherOptions

What weather() takes.

Property Type Default value Description
custom? Readonly<Record<string, number>> undefined A game’s own factors by name, each with its identity: 0 for a share, such as a sandstorm’s sand, or 1 for a multiplier. A preset that leaves one out takes its identity.
ground? Readonly<Record<string, GroundRates>> undefined A game’s own ground states by name, each with its rates, such as an ash cover; wetness’s, 20 seconds to soak and 60 to dry, and snowCover’s, 15 seconds to lie and 8 to melt, unless named here.
presets? readonly WeatherHandle[] [clearWeather, rainWeather, snowWeather] Every preset a world may stand in, each from defineWeather: the whole list, so a game’s own rain may take the name “rain”.
start? WeatherHandle | WeatherStart clearWeather The preset a world opens in, settled, with its ground at its levels, or a function that names it from the world’s own state, such as a saved calendar’s, asked each step until it names one. The record is not saved, so a world that opens again opens here.