#137 : Added logic to set effects per zone in zone editor
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { useGameStore } from '@/stores/gameStore'
|
||||
import type { Zone, Object, Tile, ZoneObject, ZoneEffects } from '@/types'
|
||||
import type { Zone, Object, Tile, ZoneEffect } from '@/types'
|
||||
|
||||
export type TeleportSettings = {
|
||||
toZoneId: number
|
||||
@ -33,7 +33,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
width: 0,
|
||||
height: 0,
|
||||
pvp: false,
|
||||
effects: [] as ZoneEffects[]
|
||||
zoneEffects: [] as ZoneEffect[]
|
||||
},
|
||||
teleportSettings: {
|
||||
toZoneId: 0,
|
||||
@ -66,9 +66,9 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
if (!this.zone) return
|
||||
this.zone.pvp = pvp
|
||||
},
|
||||
setZoneEffects(zoneEffects: ZoneEffects) {
|
||||
setZoneEffects(zoneEffects: ZoneEffect[]) {
|
||||
if (!this.zone) return
|
||||
this.zone.zoneEffects = zoneEffects
|
||||
this.zoneSettings.zoneEffects = zoneEffects
|
||||
},
|
||||
setTool(tool: string) {
|
||||
this.tool = tool
|
||||
|
Reference in New Issue
Block a user