diff options
| author | troido <troido@protonmail.com> | 2020-02-24 12:38:23 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-24 12:38:23 +0100 |
| commit | 715c9106dbff4524f3fdf5d23f762e5e6518e0cb (patch) | |
| tree | cf5dc0c5d30fc9ba7e38bdff40907fe4a96261a2 /src/systems/useitem.rs | |
| parent | 4718cfdc7c2bf67d2389ca18ab035fe5a0887ff0 (diff) | |
healing works now too, the first time based system
Diffstat (limited to 'src/systems/useitem.rs')
| -rw-r--r-- | src/systems/useitem.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/systems/useitem.rs b/src/systems/useitem.rs index c9bcfcd..4414b39 100644 --- a/src/systems/useitem.rs +++ b/src/systems/useitem.rs @@ -14,8 +14,7 @@ use crate::{ Controller, Position, Inventory, - Attacked, - add_attack + Attacked }, resources::{NewEntities}, components::item::ItemAction::{None, Build, Eat}, @@ -46,7 +45,7 @@ impl <'a> System<'a> for Use { inventory.items.remove(*rank); } Eat(health_diff) => { - add_attack(&mut attacked, ent, Attack::new(-*health_diff)); + Attacked::add_attack(&mut attacked, ent, Attack::new(-*health_diff)); inventory.items.remove(*rank); } None => {} |
