veloren/common/src/sys/mod.rs

46 lines
1.3 KiB
Rust
Raw Normal View History

pub mod agent;
2019-08-23 20:11:14 +00:00
mod cleanup;
pub mod combat;
2019-06-09 14:20:20 +00:00
pub mod controller;
2019-11-04 00:57:36 +00:00
mod mount;
2019-07-21 12:42:45 +00:00
pub mod movement;
pub mod phys;
2019-09-17 12:43:19 +00:00
mod projectile;
mod stats;
// External
use specs::DispatcherBuilder;
// System names
const AGENT_SYS: &str = "agent_sys";
2019-06-09 14:20:20 +00:00
const CONTROLLER_SYS: &str = "controller_sys";
2019-11-04 00:57:36 +00:00
const MOUNT_SYS: &str = "mount_sys";
const PHYS_SYS: &str = "phys_sys";
2019-07-21 12:42:45 +00:00
const MOVEMENT_SYS: &str = "movement_sys";
2019-09-17 12:43:19 +00:00
const PROJECTILE_SYS: &str = "projectile_sys";
const COMBAT_SYS: &str = "combat_sys";
const STATS_SYS: &str = "stats_sys";
2019-08-23 20:11:14 +00:00
const CLEANUP_SYS: &str = "cleanup_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]);
dispatch_builder.add(movement::Sys, MOVEMENT_SYS, &[]);
dispatch_builder.add(combat::Sys, COMBAT_SYS, &[CONTROLLER_SYS]);
dispatch_builder.add(stats::Sys, STATS_SYS, &[COMBAT_SYS]);
dispatch_builder.add(
phys::Sys,
PHYS_SYS,
2019-11-04 00:57:36 +00:00
&[
CONTROLLER_SYS,
MOUNT_SYS,
MOVEMENT_SYS,
COMBAT_SYS,
STATS_SYS,
],
);
dispatch_builder.add(projectile::Sys, PROJECTILE_SYS, &[PHYS_SYS]);
dispatch_builder.add(cleanup::Sys, CLEANUP_SYS, &[PHYS_SYS]);
}