forked from noxious/client
Replaced some code vars for consistency, added start of teleport logics
This commit is contained in:
@ -2,6 +2,12 @@ import { defineStore } from 'pinia'
|
||||
import { useGameStore } from '@/stores/game'
|
||||
import type { Zone, Object, Tile, ZoneObject } from '@/types'
|
||||
|
||||
type TeleportSettings = {
|
||||
x: number
|
||||
y: number
|
||||
zoneId: number
|
||||
}
|
||||
|
||||
export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
state: () => ({
|
||||
active: false,
|
||||
@ -20,7 +26,12 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
isObjectListModalShown: false,
|
||||
isZoneListModalShown: false,
|
||||
isCreateZoneModalShown: false,
|
||||
isSettingsModalShown: false
|
||||
isSettingsModalShown: false,
|
||||
teleportSettings: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
zoneId: 0
|
||||
}
|
||||
}),
|
||||
actions: {
|
||||
toggleActive() {
|
||||
@ -93,6 +104,9 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
toggleCreateZoneModal() {
|
||||
this.isCreateZoneModalShown = !this.isCreateZoneModalShown
|
||||
},
|
||||
setTeleportSettings(teleportSettings: TeleportSettings) {
|
||||
this.teleportSettings = teleportSettings
|
||||
},
|
||||
reset() {
|
||||
this.zoneList = []
|
||||
this.tileList = []
|
||||
|
Reference in New Issue
Block a user