diff --git a/src/modules/game/game.ts b/src/modules/game/game.ts
index 0732da9..4a595bb 100644
--- a/src/modules/game/game.ts
+++ b/src/modules/game/game.ts
@@ -39,8 +39,8 @@ const registerModuleGame = (
callbackFunc: onLocation,
});
callbackStore.messageCallbacks.push({
- startConditions: [`${gamePrefix} locations`],
- callbackFunc: onLocations,
+ startConditions: [`${gamePrefix} nearby`],
+ callbackFunc: onNearby,
});
};
@@ -54,7 +54,7 @@ const onHelp = (_text: string, roomId: string) => {
!game inventory - Shows your inventory
(WIP) !game inventory {index} - Shows information about an item in your inventory
!game location - Shows information about your current location
- !game locations - Shows nearby locations
+ !game nearby - Shows nearby locations
(WIP) !game travel {location} - Travel to a location
(WIP) !game talk {entity} - Talk to an entity
(WIP) !game fight {entity} - Fight an entity
@@ -99,7 +99,7 @@ const onInventory = (_text: string, roomId: string, sender: string) => {
const mapItem = (item: IItem, index: number): string => {
const fullName = getFullItemName(item);
- return `(${index}) ${fullName}, `;
+ return `(${index}) ${fullName}`;
};
client.sendHtmlMessage(
@@ -107,7 +107,7 @@ const onInventory = (_text: string, roomId: string, sender: string) => {
"",
`Your inventory (${player.name})
- ${player.inventory.items.map(mapItem)}
+ ${player.inventory.items.map(mapItem).join(",")}
`,
);
};
@@ -129,7 +129,7 @@ const onLocation = (_text: string, roomId: string, sender: string) => {
);
};
-const onLocations = (_text: string, roomId: string, sender: string) => {
+const onNearby = (_text: string, roomId: string, sender: string) => {
const player = getPlayerById(sender);
const location = getLocation(player.location);
@@ -145,7 +145,7 @@ const onLocations = (_text: string, roomId: string, sender: string) => {
"",
`There are ${location.childLocations.length} locations around you (${player.name})
- ${location.childLocations.map(mapLocation)}
+ ${location.childLocations.map(mapLocation).join("\n")}
`,
);
};