Inventory item info

This commit is contained in:
Aslan 2026-01-21 14:55:22 -05:00
parent 22dc1a5d9c
commit d4368db35b

View file

@ -98,7 +98,7 @@ const onStatus = (_text: string, roomId: string, sender: string) => {
const onInventory = (text: string, roomId: string, sender: string) => { const onInventory = (text: string, roomId: string, sender: string) => {
const player = getPlayerById(sender); const player = getPlayerById(sender);
const itemIndex = text.replace(`${gamePrefix} location `, "").trim(); const itemIndex = text.replace(`${gamePrefix} inventory `, "").trim();
const itemIndexInt = Number(itemIndex); const itemIndexInt = Number(itemIndex);
if (!isNaN(itemIndexInt)) { if (!isNaN(itemIndexInt)) {
const item = player.inventory.items[itemIndexInt]; const item = player.inventory.items[itemIndexInt];