From 2d09715dc4af7be8f811dda953b409cdd36f1b03 Mon Sep 17 00:00:00 2001
From: Dennis Postma <dennis@directonline.io>
Date: Sun, 5 Jan 2025 01:43:39 +0100
Subject: [PATCH] Map editor improvements

---
 src/components/gameMaster/mapEditor/partials/CreateMap.vue     | 2 +-
 src/components/gameMaster/mapEditor/partials/TeleportModal.vue | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/gameMaster/mapEditor/partials/CreateMap.vue b/src/components/gameMaster/mapEditor/partials/CreateMap.vue
index 73cf9e8..77346e8 100644
--- a/src/components/gameMaster/mapEditor/partials/CreateMap.vue
+++ b/src/components/gameMaster/mapEditor/partials/CreateMap.vue
@@ -50,7 +50,7 @@ const width = ref(0)
 const height = ref(0)
 
 function submit() {
-  gameStore.connection.emit('gm:mapObject:create', { name: name.value, width: width.value, height: height.value }, (response: Map[]) => {
+  gameStore.connection?.emit('gm:map:create', { name: name.value, width: width.value, height: height.value }, (response: Map[]) => {
     mapEditorStore.setMapList(response)
   })
   mapEditorStore.toggleCreateMapModal()
diff --git a/src/components/gameMaster/mapEditor/partials/TeleportModal.vue b/src/components/gameMaster/mapEditor/partials/TeleportModal.vue
index 5a0906b..a9ab99d 100644
--- a/src/components/gameMaster/mapEditor/partials/TeleportModal.vue
+++ b/src/components/gameMaster/mapEditor/partials/TeleportModal.vue
@@ -52,7 +52,7 @@ const gameStore = useGameStore()
 onMounted(fetchMaps)
 
 function fetchMaps() {
-  gameStore.connection?.emit('gm:mapObject:list', {}, (response: Map[]) => {
+  gameStore.connection?.emit('gm:map:list', {}, (response: Map[]) => {
     mapEditorStore.setMapList(response)
   })
 }