fix(mystery): letter doesn't open in foyer

This commit is contained in:
2026-05-09 01:03:47 -05:00
parent f75030e7ee
commit 157dd07c9c
+2 -2
View File
@@ -1,6 +1,6 @@
import { parse } from '../engine/parser'
import type { ParserContext } from '../engine/parser'
import { dispatch, initialStateFor } from '../engine/dispatcher'
import { dispatch, initialStateFor, getItemsInRoom } from '../engine/dispatcher'
import { saveState, loadState, clearSave } from '../engine/save'
import { world } from '../world'
import type { GameState, TranscriptLine } from '../engine/types'
@@ -37,7 +37,7 @@ if (!transcriptEl || !inputEl) {
const room = world.rooms[s.location]
const visibleNouns: { id: string; aliases: string[] }[] = []
if (room) {
for (const id of room.items) {
for (const id of getItemsInRoom(s, world, s.location)) {
const it = world.items[id]
if (it) visibleNouns.push({ id, aliases: it.names })
}