veloren/common/sys/src/lib.rs

51 lines
1.7 KiB
Rust
Raw Normal View History

#![feature(label_break_value, bool_to_option)]
pub mod agent;
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;
pub mod melee;
2019-11-04 00:57:36 +00:00
mod mount;
pub mod phys;
#[cfg(feature = "plugins")] pub mod plugin;
2019-09-17 12:43:19 +00:00
mod projectile;
mod shockwave;
2020-12-01 12:13:07 +00:00
pub mod state;
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";
pub const MELEE_SYS: &str = "melee_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";
2020-12-04 22:24:56 +00:00
pub const AURAS_SYS: &str = "auras_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]);
dispatch_builder.add(melee::Sys, MELEE_SYS, &[PROJECTILE_SYS]);
2020-12-04 22:24:56 +00:00
dispatch_builder.add(aura::Sys, AURAS_SYS, &[]);
}