forked from noxious/client
Minor change
This commit is contained in:
parent
1c2e642fe3
commit
540425ca44
6
package-lock.json
generated
6
package-lock.json
generated
@ -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": {
|
||||
|
@ -146,7 +146,7 @@ button {
|
||||
}
|
||||
|
||||
.character.active {
|
||||
@apply bg-gray bg-none
|
||||
@apply bg-gray bg-none;
|
||||
}
|
||||
|
||||
.hair-deselect:has(:checked) {
|
||||
|
@ -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 = () => {
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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)
|
||||
})
|
||||
|
||||
|
@ -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', {
|
||||
gameStore.connection?.emit(
|
||||
'character:connect',
|
||||
{
|
||||
characterId: selectedCharacterId.value,
|
||||
characterHairId: selectedHairId.value
|
||||
}, (response: { character: CharacterT, zone: Zone, characters: CharacterT[] }) => {
|
||||
},
|
||||
(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
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user