diff options
| author | troido <troido@protonmail.com> | 2020-03-04 19:58:29 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-03-04 19:58:29 +0100 |
| commit | e0dcd48034e2bab9e0ae17a80a5b4d9f0f2a7900 (patch) | |
| tree | 958a9de5ec4552613379b8077b79b5956f092c7f /src/systems | |
| parent | 022e439a6677b9865b7a3287dbd197d86266f8ef (diff) | |
useitem now actually respects rank
Diffstat (limited to 'src/systems')
| -rw-r--r-- | src/systems/useitem.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/systems/useitem.rs b/src/systems/useitem.rs index 89a301c..43f38be 100644 --- a/src/systems/useitem.rs +++ b/src/systems/useitem.rs @@ -39,7 +39,9 @@ impl <'a> System<'a> for Use { for (ent, controller, position, inventory) in (&entities, &controllers, &positions, &mut inventories).join(){ match &controller.control { Control::Use(rank) => { + println!("rank {:?}", rank); if let Some(item) = inventory.items.get(*rank) { + println!("rank {:?}", item); match &item.action { Build(template) => { new.create(position.pos, template.clone()).unwrap(); |
