forked from noxious/client
Fixed emits
This commit is contained in:
parent
bdd2f93175
commit
ae0841889b
@ -41,20 +41,20 @@ onMounted(async () => {
|
||||
})
|
||||
|
||||
function fetchMaps() {
|
||||
gameStore.connection?.emit('gm:mapObject:list', {}, (response: Map[]) => {
|
||||
gameStore.connection?.emit('gm:map:list', {}, (response: Map[]) => {
|
||||
mapEditorStore.setMapList(response)
|
||||
})
|
||||
}
|
||||
|
||||
function loadMap(id: number) {
|
||||
gameStore.connection?.emit('gm:mapObject:request', { mapId: id }, (response: Map) => {
|
||||
gameStore.connection?.emit('gm:map:request', { mapId: id }, (response: Map) => {
|
||||
mapEditorStore.setMap(response)
|
||||
})
|
||||
mapEditorStore.toggleMapListModal()
|
||||
}
|
||||
|
||||
function deleteMap(id: number) {
|
||||
gameStore.connection?.emit('gm:mapObject:delete', { mapId: id }, () => {
|
||||
gameStore.connection?.emit('gm:map:delete', { mapId: id }, () => {
|
||||
fetchMaps()
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user