1
0
forked from noxious/client
This commit is contained in:
2024-08-23 20:47:14 +02:00
parent ad096d4ce3
commit 03db5920ea
4 changed files with 18 additions and 5 deletions

View File

@ -13,7 +13,8 @@ export const useGameStore = defineStore('game', {
character: null as Character | null,
isGmPanelOpen: false,
isMovingCamera: false,
isChatOpen: false
isChatOpen: false,
isInventoryOpen: false
}),
actions: {
setScreen(screen: string) {
@ -40,6 +41,9 @@ export const useGameStore = defineStore('game', {
toggleChat() {
this.isChatOpen = !this.isChatOpen
},
toggleInventory() {
this.isInventoryOpen = !this.isInventoryOpen
},
initConnection() {
this.connection = io(config.server_endpoint, {
secure: !config.development,
@ -73,6 +77,7 @@ export const useGameStore = defineStore('game', {
this.isGmPanelOpen = false
this.isMovingCamera = false
this.isChatOpen = false
this.isInventoryOpen = false
useCookies().remove('token')
}