veloren/common/src/sys/mod.rs

30 lines
1.0 KiB
Rust
Raw Normal View History

pub mod agent;
2019-12-20 13:30:37 +00:00
pub mod character_state;
2019-06-09 14:20:20 +00:00
pub mod controller;
2019-11-04 00:57:36 +00:00
mod mount;
pub mod phys;
2019-09-17 12:43:19 +00:00
mod projectile;
mod stats;
// External
use specs::DispatcherBuilder;
// System names
2020-01-16 13:27:30 +00:00
pub const CHARACTER_STATE_SYS: &str = "character_state_sys";
2020-01-10 00:33:38 +00:00
pub const AGENT_SYS: &str = "agent_sys";
pub const CONTROLLER_SYS: &str = "controller_sys";
pub const MOUNT_SYS: &str = "mount_sys";
pub const PHYS_SYS: &str = "phys_sys";
pub const PROJECTILE_SYS: &str = "projectile_sys";
pub const STATS_SYS: &str = "stats_sys";
pub fn add_local_systems(dispatch_builder: &mut DispatcherBuilder) {
dispatch_builder.add(agent::Sys, AGENT_SYS, &[]);
dispatch_builder.add(mount::Sys, MOUNT_SYS, &[AGENT_SYS]);
dispatch_builder.add(controller::Sys, CONTROLLER_SYS, &[AGENT_SYS, MOUNT_SYS]);
2019-12-20 13:30:37 +00:00
dispatch_builder.add(character_state::Sys, CHARACTER_STATE_SYS, &[CONTROLLER_SYS]);
2020-01-05 22:55:27 +00:00
dispatch_builder.add(stats::Sys, STATS_SYS, &[]);
2020-01-16 13:28:45 +00:00
dispatch_builder.add(phys::Sys, PHYS_SYS, &[CONTROLLER_SYS, MOUNT_SYS, STATS_SYS]);
dispatch_builder.add(projectile::Sys, PROJECTILE_SYS, &[PHYS_SYS]);
}