Map editor improvements
This commit is contained in:
parent
ef807982a5
commit
2d09715dc4
@ -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()
|
||||||
|
@ -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)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user