Inventory item info
This commit is contained in:
parent
22dc1a5d9c
commit
d4368db35b
1 changed files with 1 additions and 1 deletions
|
|
@ -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];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue