veloren_server/weather/
mod.rs1use common_ecs::dispatch;
2use common_state::State;
3use specs::DispatcherBuilder;
4
5mod sim;
6mod tick;
7
8pub use tick::WeatherJob;
9
10const WEATHER_DT: f32 = 5.0;
12
13#[cfg(feature = "worldgen")]
14pub fn add_server_systems(dispatch_builder: &mut DispatcherBuilder) {
15 dispatch::<tick::Sys>(dispatch_builder, &[]);
16}
17
18#[cfg(feature = "worldgen")]
19pub fn init(state: &mut State) {
20 use crate::weather::sim::LightningCells;
21
22 state.ecs_mut().insert(None::<WeatherJob>);
23 state.ecs_mut().insert(LightningCells::default());
24}