summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-11-20 12:39:16 -0500
committerFreya Murphy <freya@freyacat.org>2025-11-20 12:39:16 -0500
commitbd0d29323fbab4b653b37a1d5142d95b529cafed (patch)
tree888092130b1dc6d9e595302703317b948835da16
parentdungeon: add chest tile (diff)
downloadDungeonCrawl-bd0d29323fbab4b653b37a1d5142d95b529cafed.tar.gz
DungeonCrawl-bd0d29323fbab4b653b37a1d5142d95b529cafed.tar.bz2
DungeonCrawl-bd0d29323fbab4b653b37a1d5142d95b529cafed.zip
dungeon: make chest items optional (no item = open)
-rw-r--r--dungeon/src/map.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/dungeon/src/map.rs b/dungeon/src/map.rs
index 9aa513f..ba3e143 100644
--- a/dungeon/src/map.rs
+++ b/dungeon/src/map.rs
@@ -32,7 +32,8 @@ pub enum Tile {
Hallway,
/// `Stairs` represents stairs to another floor
Stairs,
- Chest(Item),
+ /// `Chest` represents an item on the map, possibly containing and item
+ Chest(Option<Item>),
}
impl Tile {
/// Returns if the tile is a wall