diff --git a/package-lock.json b/package-lock.json index 822c851..5278e50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1987,9 +1987,9 @@ } }, "node_modules/@types/node": { - "version": "20.17.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz", - "integrity": "sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==", + "version": "20.17.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.11.tgz", + "integrity": "sha512-Ept5glCK35R8yeyIeYlRIZtX6SLRyqMhOFTgj5SOkMpLTdw3SEHI9fHx60xaUZ+V1aJxQJODE+7/j5ocZydYTg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/src/application/types.ts b/src/application/types.ts index d61f50e..62d50d7 100644 --- a/src/application/types.ts +++ b/src/application/types.ts @@ -274,4 +274,4 @@ export type WeatherState = { export type zoneLoadData = { zone: ZoneT characters: ZoneCharacter[] -} \ No newline at end of file +} diff --git a/src/assets/scss/main.scss b/src/assets/scss/main.scss index d4fa6cd..6254f42 100644 --- a/src/assets/scss/main.scss +++ b/src/assets/scss/main.scss @@ -146,7 +146,7 @@ button { } .character.active { - @apply bg-gray bg-none + @apply bg-gray bg-none; } .hair-deselect:has(:checked) { diff --git a/src/components/Effects.vue b/src/components/Effects.vue index 4df3424..f2d735a 100644 --- a/src/components/Effects.vue +++ b/src/components/Effects.vue @@ -146,12 +146,12 @@ const setupSocketListeners = () => { updateScene() }) - gameStore.connection?.on('weather', (data: WeatherState) => { + gameStore.connection!.on('weather', (data: WeatherState) => { weatherState.value = data updateScene() }) - gameStore.connection?.on('date', updateScene) + gameStore.connection!.on('date', updateScene) } const handleResize = () => { diff --git a/src/components/gui/Chat.vue b/src/components/gui/Chat.vue index 6ee0a80..e134030 100644 --- a/src/components/gui/Chat.vue +++ b/src/components/gui/Chat.vue @@ -79,7 +79,7 @@ const scrollToBottom = () => { }) } -gameStore.connection?.on('chat:message', (data: Chat) => { +gameStore.connection!.on('chat:message', (data: Chat) => { chats.value.push(data) scrollToBottom() diff --git a/src/components/gui/Clock.vue b/src/components/gui/Clock.vue index cebb827..e3ed41d 100644 --- a/src/components/gui/Clock.vue +++ b/src/components/gui/Clock.vue @@ -11,7 +11,7 @@ import { onUnmounted } from 'vue' const gameStore = useGameStore() // Listen for new date from socket -gameStore.connection?.on('date', (data: Date) => { +gameStore.connection!.on('date', (data: Date) => { gameStore.world.date = new Date(data) }) diff --git a/src/components/screens/Characters.vue b/src/components/screens/Characters.vue index 818fedf..cc7026f 100644 --- a/src/components/screens/Characters.vue +++ b/src/components/screens/Characters.vue @@ -145,7 +145,7 @@ setTimeout(() => { gameStore.connection?.emit('character:list') }, 750) -gameStore.connection?.on('character:list', (data: any) => { +gameStore.connection!.on('character:list', (data: any) => { characters.value = data isLoading.value = false @@ -160,17 +160,21 @@ gameStore.connection?.on('character:list', (data: any) => { function loginWithCharacter() { if (!selectedCharacterId.value) return - gameStore.connection?.emit('character:connect', { - characterId: selectedCharacterId.value, - characterHairId: selectedHairId.value - }, (response: { character: CharacterT, zone: Zone, characters: CharacterT[] }) => { - gameStore.setCharacter(response.character) - }) + gameStore.connection?.emit( + 'character:connect', + { + characterId: selectedCharacterId.value, + characterHairId: selectedHairId.value + }, + (response: { character: CharacterT; zone: Zone; characters: CharacterT[] }) => { + gameStore.setCharacter(response.character) + } + ) } // Create character logics function createCharacter() { - gameStore.connection?.on('character:create:success', (data: CharacterT) => { + gameStore.connection!.on('character:create:success', (data: CharacterT) => { gameStore.setCharacter(data) isCreateNewCharacterModalOpen.value = false })