Map editor improvements

This commit is contained in:
Dennis Postma 2025-01-05 01:43:39 +01:00
parent ef807982a5
commit 2d09715dc4
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ const width = ref(0)
const height = ref(0) const height = ref(0)
function submit() { 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.setMapList(response)
}) })
mapEditorStore.toggleCreateMapModal() mapEditorStore.toggleCreateMapModal()

View File

@ -52,7 +52,7 @@ const gameStore = useGameStore()
onMounted(fetchMaps) onMounted(fetchMaps)
function fetchMaps() { function fetchMaps() {
gameStore.connection?.emit('gm:mapObject:list', {}, (response: Map[]) => { gameStore.connection?.emit('gm:map:list', {}, (response: Map[]) => {
mapEditorStore.setMapList(response) mapEditorStore.setMapList(response)
}) })
} }