1
0
forked from noxious/client

Replaced all event names with numbers for less bandwidth usage

This commit is contained in:
2025-02-11 23:13:15 +01:00
parent 5f2c7a09b1
commit dd1cc795de
26 changed files with 191 additions and 197 deletions

View File

@ -43,6 +43,7 @@
</template>
<script setup lang="ts">
import { SocketEvent } from '@/application/enums';
import config from '@/application/config'
import type { MapObject } from '@/application/types'
import ChipsInput from '@/components/forms/ChipsInput.vue'
@ -78,7 +79,7 @@ if (selectedMapObject.value) {
}
function removeObject() {
gameStore.connection?.emit('gm:mapObject:remove', { mapObject: selectedMapObject.value?.id }, (response: boolean) => {
gameStore.connection?.emit(SocketEvent.GM_MAPOBJECT_REMOVE, { mapObject: selectedMapObject.value?.id }, (response: boolean) => {
if (!response) {
console.error('Failed to remove mapObject')
return
@ -88,7 +89,7 @@ function removeObject() {
}
function refreshObjectList(unsetSelectedMapObject = true) {
gameStore.connection?.emit('gm:mapObject:list', {}, (response: MapObject[]) => {
gameStore.connection?.emit(SocketEvent.GM_MAPOBJECT_LIST, {}, (response: MapObject[]) => {
assetManagerStore.setMapObjectList(response)
if (unsetSelectedMapObject) {