veloren/common/systems/src/lib.rs

40 lines
1.3 KiB
Rust
Raw Normal View History

2021-04-06 15:47:03 +00:00
#![feature(bool_to_option, option_unwrap_none, array_map)]
2021-03-16 07:56:43 +00:00
#![allow(clippy::option_map_unit_fn)]
2020-12-04 22:24:56 +00:00
mod aura;
mod beam;
mod buff;
2020-03-07 19:02:54 +00:00
pub mod character_behavior;
2019-06-09 14:20:20 +00:00
pub mod controller;
mod interpolation;
pub mod melee;
2019-11-04 00:57:36 +00:00
mod mount;
pub mod phys;
2021-04-04 03:04:02 +00:00
pub mod projectile;
mod shockwave;
mod stats;
// External
use common_ecs::{dispatch, System};
use specs::DispatcherBuilder;
pub fn add_local_systems(dispatch_builder: &mut DispatcherBuilder) {
2021-04-06 23:20:26 +00:00
//TODO: don't run interpolation on server
2021-04-06 15:47:03 +00:00
dispatch::<interpolation::Sys>(dispatch_builder, &[]);
dispatch::<mount::Sys>(dispatch_builder, &[]);
dispatch::<controller::Sys>(dispatch_builder, &[&mount::Sys::sys_name()]);
dispatch::<character_behavior::Sys>(dispatch_builder, &[&controller::Sys::sys_name()]);
dispatch::<stats::Sys>(dispatch_builder, &[]);
dispatch::<buff::Sys>(dispatch_builder, &[]);
dispatch::<phys::Sys>(dispatch_builder, &[
2021-04-06 15:47:03 +00:00
&interpolation::Sys::sys_name(),
&controller::Sys::sys_name(),
&mount::Sys::sys_name(),
&stats::Sys::sys_name(),
2020-03-07 19:02:54 +00:00
]);
dispatch::<projectile::Sys>(dispatch_builder, &[&phys::Sys::sys_name()]);
dispatch::<shockwave::Sys>(dispatch_builder, &[&phys::Sys::sys_name()]);
dispatch::<beam::Sys>(dispatch_builder, &[&phys::Sys::sys_name()]);
dispatch::<aura::Sys>(dispatch_builder, &[]);
}