forked from noxious/client
Fix zone list refresh after creating a zone
This commit is contained in:
@ -7,6 +7,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
zone: null as Zone | null,
|
||||
tool: 'move',
|
||||
drawMode: 'tile',
|
||||
zoneList: [] as Zone[],
|
||||
tileList: [] as Tile[],
|
||||
objectList: [] as Object[],
|
||||
selectedTile: null as Tile | null,
|
||||
@ -44,6 +45,9 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
setDrawMode(mode: string) {
|
||||
this.drawMode = mode
|
||||
},
|
||||
setZoneList(zones: Zone[]) {
|
||||
this.zoneList = zones
|
||||
},
|
||||
setTileList(tiles: Tile[]) {
|
||||
this.tileList = tiles
|
||||
},
|
||||
@ -70,6 +74,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
this.isCreateZoneModalShown = !this.isCreateZoneModalShown
|
||||
},
|
||||
reset() {
|
||||
this.zoneList = []
|
||||
this.tileList = []
|
||||
this.objectList = []
|
||||
this.tool = 'move'
|
||||
|
Reference in New Issue
Block a user