Skip to main content

Module environment

Module environment 

Source
Expand description

The environment: the temperature, the weather, and the seasonal values the renderer uses. It is advanced once per simulation iteration, after the calendar. See docs/ENVIRONMENT.md, docs/GAME-LOOP-STEP-04.md and docs/GAME-LOOP-STEP-05.md.

Original: FUN_140099430 (set-up), FUN_140099300 (bound to the climate), FUN_1400999b0 (the update).

Structs§

Climate
The climate fields the controller reads (ClimateGenerator).
Environment
The environment: temperature, weather and the renderer’s seasonal values. See the module documentation.
SeasonValues
The values the renderer receives from the environment each update (the shaders’ pc_userPosition).
WeatherEffect
A weather effect slot: its particle geometry and its ambient sound. Slot 0 is rain, slot 1 is snow (the order of the environment’s weather list).

Constants§

FREEZING
Freezing point (°F).
RAIN_SNOW_THRESHOLD
Rain above this temperature, Snow at or below.
YEAR_SECONDS
Seconds in a game year.