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:
@ -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
|
||||
|
Reference in New Issue
Block a user