1
0
forked from noxious/client

Fix zone list refresh after creating a zone

This commit is contained in:
2024-07-12 00:40:05 +02:00
parent cf19bb4baa
commit c5a19f3648
3 changed files with 11 additions and 8 deletions

View File

@ -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'