Merge remote-tracking branch 'origin/main' into feature/new-design-FE

This commit is contained in:
2024-10-12 21:37:58 +02:00
10 changed files with 544 additions and 127 deletions

View File

@ -1,8 +1,8 @@
import { defineStore } from 'pinia'
import { useGameStore } from '@/stores/gameStore'
import type { Zone, Object, Tile, ZoneObject } from '@/types'
import type { Zone, Object, Tile, ZoneObject, ZoneEffects } from '@/types'
type TeleportSettings = {
export type TeleportSettings = {
toZoneId: number
toPositionX: number
toPositionY: number
@ -33,14 +33,15 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
name: '',
width: 0,
height: 0,
pvp: false
pvp: false,
effects: [] as ZoneEffects[]
},
teleportSettings: {
toZoneId: 0,
toPositionX: 0,
toPositionY: 0,
toRotation: 0
}
} as TeleportSettings
}
},
actions: {
@ -66,6 +67,10 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
if (!this.zone) return
this.zone.pvp = pvp
},
setZoneEffects(zoneEffects: ZoneEffects) {
if (!this.zone) return
this.zone.zoneEffects = zoneEffects
},
setTool(tool: string) {
this.tool = tool
},