From ff627e369f83fdaab8e90016529521b0e07d5e34 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 20 Nov 2025 20:27:50 -0500 Subject: dungeon: add chest usage/textures --- game/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'game') diff --git a/game/src/lib.rs b/game/src/lib.rs index 23cdcfa..3d9c8a7 100644 --- a/game/src/lib.rs +++ b/game/src/lib.rs @@ -1,6 +1,6 @@ use dungeon::{ - Dungeon, UpdateResult, player::PLAYER_INVENTORY_SIZE_USIZE, player_input::PlayerInput, - pos::Direction, + Dungeon, UpdateResult, entity::Item, map::Tile, player::PLAYER_INVENTORY_SIZE_USIZE, + player_input::PlayerInput, pos::Direction, }; use graphics::{Key, Window}; @@ -86,7 +86,8 @@ impl Game { self.window.toggle_debug(); } if self.window.is_key_pressed(Key::F4) { - self.dungeon.player.entity.health = 0; + *self.dungeon.floor.get_mut(self.dungeon.player.entity.pos) = + Tile::Chest(Some(Item::Bomb)); } // Update game state -- cgit v1.2.3-freya