summaryrefslogtreecommitdiff
path: root/dungeon/src/entity.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dungeon/src/entity.rs')
-rw-r--r--dungeon/src/entity.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/dungeon/src/entity.rs b/dungeon/src/entity.rs
index a0750dd..9af27bd 100644
--- a/dungeon/src/entity.rs
+++ b/dungeon/src/entity.rs
@@ -337,6 +337,7 @@ pub struct Player {
pub weapon: Weapon,
// How long until we reset potion effects?
pub potion_timer: Option<Instant>,
+ pub active_inv_slot: usize,
}
impl Player {
/// Instantiates the game player at a given `Pos`
@@ -354,11 +355,13 @@ impl Player {
let inventory = vec![];
let weapon = Weapon::RustyKnife;
let potion_timer = None;
+ let active_inv_slot = 0;
Self {
entity,
inventory,
weapon,
potion_timer,
+ active_inv_slot,
}
}
}
@@ -517,7 +520,7 @@ impl Dungeon {
};
updater.update_entity(&mut self.player.entity);
- for enemy in &mut self.enemies {
+ for enemy in &mut self.entities {
updater.update_entity(enemy);
}
}