2020-12-01 00:28:00 +00:00
|
|
|
#![feature(label_break_value, bool_to_option)]
|
|
|
|
|
2019-04-16 21:06:33 +00:00
|
|
|
pub mod agent;
|
2020-09-05 16:27:36 +00:00
|
|
|
mod beam;
|
2020-08-10 22:54:45 +00:00
|
|
|
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;
|
2020-10-17 22:42:43 +00:00
|
|
|
pub mod melee;
|
2019-11-04 00:57:36 +00:00
|
|
|
mod mount;
|
2019-03-02 03:48:30 +00:00
|
|
|
pub mod phys;
|
2019-09-17 12:43:19 +00:00
|
|
|
mod projectile;
|
2020-08-08 22:22:21 +00:00
|
|
|
mod shockwave;
|
2020-12-01 12:13:07 +00:00
|
|
|
pub mod state;
|
2019-05-17 20:47:58 +00:00
|
|
|
mod stats;
|
2019-03-02 03:48:30 +00:00
|
|
|
|
|
|
|
// External
|
|
|
|
use specs::DispatcherBuilder;
|
|
|
|
|
|
|
|
// System names
|
2020-03-07 19:02:54 +00:00
|
|
|
pub const CHARACTER_BEHAVIOR_SYS: &str = "character_behavior_sys";
|
2020-10-17 22:42:43 +00:00
|
|
|
pub const MELEE_SYS: &str = "melee_sys";
|
2020-01-10 00:33:38 +00:00
|
|
|
pub const AGENT_SYS: &str = "agent_sys";
|
2020-09-05 16:27:36 +00:00
|
|
|
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";
|
2020-08-08 22:22:21 +00:00
|
|
|
pub const SHOCKWAVE_SYS: &str = "shockwave_sys";
|
2020-01-10 00:33:38 +00:00
|
|
|
pub const STATS_SYS: &str = "stats_sys";
|
2020-08-10 22:54:45 +00:00
|
|
|
pub const BUFFS_SYS: &str = "buffs_sys";
|
2019-03-02 03:48:30 +00:00
|
|
|
|
|
|
|
pub fn add_local_systems(dispatch_builder: &mut DispatcherBuilder) {
|
2019-04-16 21:06:33 +00:00
|
|
|
dispatch_builder.add(agent::Sys, AGENT_SYS, &[]);
|
2019-12-31 21:37:55 +00:00
|
|
|
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, &[]);
|
2020-08-10 22:54:45 +00:00
|
|
|
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]);
|
2019-10-02 19:28:35 +00:00
|
|
|
dispatch_builder.add(projectile::Sys, PROJECTILE_SYS, &[PHYS_SYS]);
|
2020-08-08 22:22:21 +00:00
|
|
|
dispatch_builder.add(shockwave::Sys, SHOCKWAVE_SYS, &[PHYS_SYS]);
|
2020-09-05 16:27:36 +00:00
|
|
|
dispatch_builder.add(beam::Sys, BEAM_SYS, &[PHYS_SYS]);
|
2020-10-17 22:42:43 +00:00
|
|
|
dispatch_builder.add(melee::Sys, MELEE_SYS, &[PROJECTILE_SYS]);
|
2019-03-02 03:48:30 +00:00
|
|
|
}
|