diff options
| author | troido <troido@protonmail.com> | 2020-03-05 12:50:25 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-03-05 12:50:25 +0100 |
| commit | 170741fe959d30ee43ce689fd5fbae725cc1dae4 (patch) | |
| tree | de337876fb9afc3ca20e5a99ef61689813f51ebe /src/systems/attacking.rs | |
| parent | ea99b86b89659624133a63f03600f0b57592a5f4 (diff) | |
equipent now kinda works
Diffstat (limited to 'src/systems/attacking.rs')
| -rw-r--r-- | src/systems/attacking.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/systems/attacking.rs b/src/systems/attacking.rs index 4318695..597f781 100644 --- a/src/systems/attacking.rs +++ b/src/systems/attacking.rs @@ -11,7 +11,7 @@ use specs::{ }; use crate::{ - components::{Health, AttackInbox, AttackType, Dead, Position, Autofight}, + components::{Health, AttackInbox, AttackType, Dead, Position, Autofight, Equipment, equipment::Stat}, resources::NewEntities, Template, util @@ -27,9 +27,10 @@ impl <'a> System<'a> for Attacking { WriteStorage<'a, Dead>, ReadStorage<'a, Position>, Write<'a, NewEntities>, - WriteStorage<'a, Autofight> + WriteStorage<'a, Autofight>, + ReadStorage<'a, Equipment> ); - fn run(&mut self, (entities, mut attackeds, mut healths, mut deads, positions, mut new, mut autofighters): Self::SystemData) { + fn run(&mut self, (entities, mut attackeds, mut healths, mut deads, positions, mut new, mut autofighters, equipments): Self::SystemData) { for (entity, attacked, autofighter) in (&entities, &attackeds, &mut autofighters).join() { for attack in &attacked.messages { |
