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": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.17.10",
|
"version": "20.17.11",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.11.tgz",
|
||||||
"integrity": "sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==",
|
"integrity": "sha512-Ept5glCK35R8yeyIeYlRIZtX6SLRyqMhOFTgj5SOkMpLTdw3SEHI9fHx60xaUZ+V1aJxQJODE+7/j5ocZydYTg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -146,7 +146,7 @@ button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.character.active {
|
.character.active {
|
||||||
@apply bg-gray bg-none
|
@apply bg-gray bg-none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hair-deselect:has(:checked) {
|
.hair-deselect:has(:checked) {
|
||||||
|
@ -146,12 +146,12 @@ const setupSocketListeners = () => {
|
|||||||
updateScene()
|
updateScene()
|
||||||
})
|
})
|
||||||
|
|
||||||
gameStore.connection?.on('weather', (data: WeatherState) => {
|
gameStore.connection!.on('weather', (data: WeatherState) => {
|
||||||
weatherState.value = data
|
weatherState.value = data
|
||||||
updateScene()
|
updateScene()
|
||||||
})
|
})
|
||||||
|
|
||||||
gameStore.connection?.on('date', updateScene)
|
gameStore.connection!.on('date', updateScene)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleResize = () => {
|
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)
|
chats.value.push(data)
|
||||||
scrollToBottom()
|
scrollToBottom()
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import { onUnmounted } from 'vue'
|
|||||||
const gameStore = useGameStore()
|
const gameStore = useGameStore()
|
||||||
|
|
||||||
// Listen for new date from socket
|
// Listen for new date from socket
|
||||||
gameStore.connection?.on('date', (data: Date) => {
|
gameStore.connection!.on('date', (data: Date) => {
|
||||||
gameStore.world.date = new Date(data)
|
gameStore.world.date = new Date(data)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ setTimeout(() => {
|
|||||||
gameStore.connection?.emit('character:list')
|
gameStore.connection?.emit('character:list')
|
||||||
}, 750)
|
}, 750)
|
||||||
|
|
||||||
gameStore.connection?.on('character:list', (data: any) => {
|
gameStore.connection!.on('character:list', (data: any) => {
|
||||||
characters.value = data
|
characters.value = data
|
||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
|
|
||||||
@ -160,17 +160,21 @@ gameStore.connection?.on('character:list', (data: any) => {
|
|||||||
function loginWithCharacter() {
|
function loginWithCharacter() {
|
||||||
if (!selectedCharacterId.value) return
|
if (!selectedCharacterId.value) return
|
||||||
|
|
||||||
gameStore.connection?.emit('character:connect', {
|
gameStore.connection?.emit(
|
||||||
|
'character:connect',
|
||||||
|
{
|
||||||
characterId: selectedCharacterId.value,
|
characterId: selectedCharacterId.value,
|
||||||
characterHairId: selectedHairId.value
|
characterHairId: selectedHairId.value
|
||||||
}, (response: { character: CharacterT, zone: Zone, characters: CharacterT[] }) => {
|
},
|
||||||
|
(response: { character: CharacterT; zone: Zone; characters: CharacterT[] }) => {
|
||||||
gameStore.setCharacter(response.character)
|
gameStore.setCharacter(response.character)
|
||||||
})
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create character logics
|
// Create character logics
|
||||||
function createCharacter() {
|
function createCharacter() {
|
||||||
gameStore.connection?.on('character:create:success', (data: CharacterT) => {
|
gameStore.connection!.on('character:create:success', (data: CharacterT) => {
|
||||||
gameStore.setCharacter(data)
|
gameStore.setCharacter(data)
|
||||||
isCreateNewCharacterModalOpen.value = false
|
isCreateNewCharacterModalOpen.value = false
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user