diff options
| author | troido <troido@protonmail.com> | 2020-03-04 19:47:00 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-03-04 19:47:00 +0100 |
| commit | 022e439a6677b9865b7a3287dbd197d86266f8ef (patch) | |
| tree | 00c8cd7c08fe29cf9f6652b0082f2b13617e426c /src/systems/useitem.rs | |
| parent | f8364fb636a8e9276939ae8523966b038388e4ff (diff) | |
implemented growth
Diffstat (limited to 'src/systems/useitem.rs')
| -rw-r--r-- | src/systems/useitem.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systems/useitem.rs b/src/systems/useitem.rs index ab147b7..89a301c 100644 --- a/src/systems/useitem.rs +++ b/src/systems/useitem.rs @@ -29,7 +29,7 @@ impl <'a> System<'a> for Use { type SystemData = ( Entities<'a>, ReadStorage<'a, Controller>, - WriteStorage<'a, Position>, + ReadStorage<'a, Position>, WriteStorage<'a, Inventory>, Write<'a, NewEntities>, WriteStorage<'a, AttackInbox> @@ -42,7 +42,7 @@ impl <'a> System<'a> for Use { if let Some(item) = inventory.items.get(*rank) { match &item.action { Build(template) => { - let _ = new.create(position.pos, template.clone()); + new.create(position.pos, template.clone()).unwrap(); inventory.items.remove(*rank); } Eat(health_diff) => { |
