veloren/common/src/sys/mod.rs

37 lines
1.2 KiB
Rust
Raw Normal View History

2019-06-29 18:52:20 +00:00
mod action_state;
pub mod agent;
pub mod animation;
pub mod combat;
2019-06-09 14:20:20 +00:00
pub mod controller;
2019-07-21 12:42:45 +00:00
pub mod movement;
pub mod phys;
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-06-29 17:49:51 +00:00
const ACTION_STATE_SYS: &str = "action_state_sys";
const PHYS_SYS: &str = "phys_sys";
2019-07-21 12:42:45 +00:00
const MOVEMENT_SYS: &str = "movement_sys";
const COMBAT_SYS: &str = "combat_sys";
const ANIMATION_SYS: &str = "animation_sys";
const STATS_SYS: &str = "stats_sys";
pub fn add_local_systems(dispatch_builder: &mut DispatcherBuilder) {
dispatch_builder.add(agent::Sys, AGENT_SYS, &[]);
2019-06-29 17:49:51 +00:00
dispatch_builder.add(controller::Sys, CONTROLLER_SYS, &[AGENT_SYS]);
dispatch_builder.add(phys::Sys, PHYS_SYS, &[CONTROLLER_SYS]);
2019-07-21 12:42:45 +00:00
dispatch_builder.add(movement::Sys, MOVEMENT_SYS, &[PHYS_SYS]);
2019-06-29 18:52:20 +00:00
dispatch_builder.add(
action_state::Sys,
ACTION_STATE_SYS,
&[CONTROLLER_SYS, PHYS_SYS],
);
2019-06-29 17:49:51 +00:00
dispatch_builder.add(combat::Sys, COMBAT_SYS, &[ACTION_STATE_SYS]);
dispatch_builder.add(animation::Sys, ANIMATION_SYS, &[ACTION_STATE_SYS]);
dispatch_builder.add(stats::Sys, STATS_SYS, &[COMBAT_SYS]);
}