From fb8b2aff0142298fd9476a7aef3999ccc60d041f Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 5 Dec 2020 13:20:52 +0100 Subject: [PATCH] The player must be alive to interact with the inventory --- squirrelbattle/game.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squirrelbattle/game.py b/squirrelbattle/game.py index ff5d465..b9439b5 100644 --- a/squirrelbattle/game.py +++ b/squirrelbattle/game.py @@ -123,7 +123,7 @@ class Game: self.inventory_menu.go_up() elif key == KeyValues.DOWN: self.inventory_menu.go_down() - if self.inventory_menu.values: + if self.inventory_menu.values and not self.player.dead: if key == KeyValues.USE: self.inventory_menu.validate().use() elif key == KeyValues.EQUIP: