Real object ids, fixed warping bug

This commit is contained in:
2026-06-06 20:01:07 -05:00
parent 374a69f0ca
commit ea18fe8fc2
6 changed files with 161 additions and 107 deletions
+2 -2
View File
@@ -103,8 +103,8 @@ impl Widget for BoardWidget<'_> {
// Resolve which glyph wins this cell: player > object > grid floor.
let glyph = if board.player.x == bx as i32 && board.player.y == by as i32 {
Glyph::player()
} else if let Some(obj) = board.object_at(bx, by) {
obj.glyph
} else if let Some(id) = board.object_ids_at(bx, by).get(0) {
board.objects[id].glyph
} else {
// Static layer: the grid archetype's glyph, or the floor layer
// for an empty cell (see `Board::display_glyph`).