From b6bdef8f99294363069d82b8bc1fe337482ba4d1 Mon Sep 17 00:00:00 2001 From: satsuma <70952638+stutxo@users.noreply.github.com> Date: Sat, 23 Jul 2022 12:36:26 +0100 Subject: [PATCH] Update inventory_system.rs The confusion item is not deleted when used. used_item = true needs to be added --- chapter-10-ranged/src/inventory_system.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/chapter-10-ranged/src/inventory_system.rs b/chapter-10-ranged/src/inventory_system.rs index fccb9ed3..1d454b31 100644 --- a/chapter-10-ranged/src/inventory_system.rs +++ b/chapter-10-ranged/src/inventory_system.rs @@ -140,6 +140,7 @@ impl<'a> System<'a> for ItemUseSystem { let item_name = names.get(useitem.item).unwrap(); gamelog.entries.push(format!("You use {} on {}, confusing them.", item_name.name, mob_name.name)); } + used_item = true; } } }