2020-01-01 17:16:29 +00:00
|
|
|
mod ability;
|
2019-04-16 21:06:33 +00:00
|
|
|
pub mod agent;
|
2019-12-20 13:30:37 +00:00
|
|
|
pub mod character_state;
|
2019-08-23 20:11:14 +00:00
|
|
|
mod cleanup;
|
2019-06-11 19:28:25 +00:00
|
|
|
pub mod combat;
|
2019-06-09 14:20:20 +00:00
|
|
|
pub mod controller;
|
2019-03-02 03:48:30 +00:00
|
|
|
pub mod phys;
|
2019-09-17 12:43:19 +00:00
|
|
|
mod projectile;
|
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-01-01 17:16:29 +00:00
|
|
|
const ABILITY_SYS: &str = "ability_sys";
|
2019-04-16 21:06:33 +00:00
|
|
|
const AGENT_SYS: &str = "agent_sys";
|
2019-12-20 13:30:37 +00:00
|
|
|
const CHARACTER_STATE_SYS: &str = "character_state_sys";
|
2019-06-09 14:20:20 +00:00
|
|
|
const CONTROLLER_SYS: &str = "controller_sys";
|
2019-05-16 17:40:32 +00:00
|
|
|
const PHYS_SYS: &str = "phys_sys";
|
2019-09-17 12:43:19 +00:00
|
|
|
const PROJECTILE_SYS: &str = "projectile_sys";
|
2019-06-11 19:28:25 +00:00
|
|
|
const COMBAT_SYS: &str = "combat_sys";
|
2019-05-17 20:47:58 +00:00
|
|
|
const STATS_SYS: &str = "stats_sys";
|
2019-08-23 20:11:14 +00:00
|
|
|
const CLEANUP_SYS: &str = "cleanup_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-06-29 17:49:51 +00:00
|
|
|
dispatch_builder.add(controller::Sys, CONTROLLER_SYS, &[AGENT_SYS]);
|
2019-12-20 13:30:37 +00:00
|
|
|
dispatch_builder.add(character_state::Sys, CHARACTER_STATE_SYS, &[CONTROLLER_SYS]);
|
2020-01-01 17:16:29 +00:00
|
|
|
dispatch_builder.add(ability::Sys, ABILITY_SYS, &[CHARACTER_STATE_SYS]);
|
2019-10-02 19:28:35 +00:00
|
|
|
dispatch_builder.add(combat::Sys, COMBAT_SYS, &[CONTROLLER_SYS]);
|
2019-06-11 19:28:25 +00:00
|
|
|
dispatch_builder.add(stats::Sys, STATS_SYS, &[COMBAT_SYS]);
|
2019-09-09 19:11:40 +00:00
|
|
|
dispatch_builder.add(
|
|
|
|
phys::Sys,
|
|
|
|
PHYS_SYS,
|
2019-12-26 14:43:59 +00:00
|
|
|
&[CONTROLLER_SYS, COMBAT_SYS, STATS_SYS],
|
2019-09-09 19:11:40 +00:00
|
|
|
);
|
2019-10-02 19:28:35 +00:00
|
|
|
dispatch_builder.add(projectile::Sys, PROJECTILE_SYS, &[PHYS_SYS]);
|
2019-09-09 19:11:40 +00:00
|
|
|
dispatch_builder.add(cleanup::Sys, CLEANUP_SYS, &[PHYS_SYS]);
|
2019-03-02 03:48:30 +00:00
|
|
|
}
|