veloren/common/src/sys/mod.rs

44 lines
1.5 KiB
Rust
Raw Normal View History

pub mod agent;
mod beam;
mod buff;
2020-03-07 19:02:54 +00:00
pub mod character_behavior;
2020-04-01 14:07:10 +00:00
pub mod combat;
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 shockwave;
mod stats;
// External
use specs::DispatcherBuilder;
// System names
2020-03-07 19:02:54 +00:00
pub const CHARACTER_BEHAVIOR_SYS: &str = "character_behavior_sys";
2020-02-11 15:42:17 +00:00
pub const COMBAT_SYS: &str = "combat_sys";
2020-01-10 00:33:38 +00:00
pub const AGENT_SYS: &str = "agent_sys";
pub const BEAM_SYS: &str = "beam_sys";
2020-01-10 00:33:38 +00:00
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 SHOCKWAVE_SYS: &str = "shockwave_sys";
2020-01-10 00:33:38 +00:00
pub const STATS_SYS: &str = "stats_sys";
pub const BUFFS_SYS: &str = "buffs_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]);
2020-03-07 19:02:54 +00:00
dispatch_builder.add(character_behavior::Sys, CHARACTER_BEHAVIOR_SYS, &[
CONTROLLER_SYS,
]);
2020-01-05 22:55:27 +00:00
dispatch_builder.add(stats::Sys, STATS_SYS, &[]);
dispatch_builder.add(buff::Sys, BUFFS_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]);
dispatch_builder.add(shockwave::Sys, SHOCKWAVE_SYS, &[PHYS_SYS]);
dispatch_builder.add(beam::Sys, BEAM_SYS, &[PHYS_SYS]);
2020-02-11 15:42:17 +00:00
dispatch_builder.add(combat::Sys, COMBAT_SYS, &[PROJECTILE_SYS]);
}