five-on-it / packages/sim/src/weather
packages/sim/src/weather
The weather in the simulation (GAME_DESIGN §5.7): the room's weather (sim.weather, a seed, a climate and a script: @foi/shared's weather.ts) read at the room clock's game minutes every tick into sim.sky, rounded to 1/64 so the server and a client's prediction agree on it, and what it does to the tyres (weatherGrip: wet roads and mud and snow grip less, by WEATHER_GRIP). The fire reads the rain (a wreck burns out sooner in it), the AI the rest (@foi/ai's visibility.ts). The weather itself is hashed with the clock.