1
0
forked from noxious/client

Bug fix for zoneEditor store, #109 : When zone tiles are updated and you switch back to the game, these aren't instantly visible, npm update

This commit is contained in:
2024-09-15 02:36:24 +02:00
parent 6e6c6f9b9e
commit 4be606778c
3 changed files with 5 additions and 5 deletions

View File

@ -8,8 +8,6 @@ type TeleportSettings = {
toPositionY: number
}
const gameStore = useGameStore()
export const useZoneEditorStore = defineStore('zoneEditor', {
state: () => ({
active: false,
@ -43,6 +41,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
}),
actions: {
toggleActive() {
const gameStore = useGameStore()
if (!this.active) gameStore.connection?.emit('zone:character:leave')
if (this.active) this.reset()
this.active = !this.active