diff --git a/src/api.ts b/src/api.ts index 06855de..9a87adb 100644 --- a/src/api.ts +++ b/src/api.ts @@ -45,7 +45,25 @@ export const api = { rpgReset: () => post('/api/web/rpg/reset'), } +export interface MapLocation { + id: string + name: string + emoji: string + x: number + y: number + isCurrent: boolean + isConnected: boolean + description: string + hasAction: boolean +} + export interface RpgResult { text: string - choices: { text: string; [key: string]: unknown }[] + choices: { text: string; locationId?: string; isAction?: boolean; [key: string]: unknown }[] + mapData?: { + areaId: string + areaName: string + currentLocationId: string + locations: MapLocation[] + } } diff --git a/src/views/GameView.vue b/src/views/GameView.vue index b36eece..79f512b 100644 --- a/src/views/GameView.vue +++ b/src/views/GameView.vue @@ -31,7 +31,7 @@ -
+
{{ speakerEmoji }} @@ -39,7 +39,57 @@
-
+
+
+ + + +
+
+ {{ loc.emoji }} +
+ {{ loc.name }} +
+
+
+
+ πŸ—ΊοΈ {{ mapData.areaName }} + πŸ“ {{ currentMapLoc?.name }} +
+
{{ currentMapLoc?.description }}
+
+
+ β–Ά + {{ ch.text }} +
+
+
+ +
+
+
+ +
{{ speakerName }} @@ -90,12 +140,12 @@