diff --git a/src/components/utilities/zoneEditor/ZoneEditor.vue b/src/components/utilities/zoneEditor/ZoneEditor.vue
index 2b26dbe..585b9ac 100644
--- a/src/components/utilities/zoneEditor/ZoneEditor.vue
+++ b/src/components/utilities/zoneEditor/ZoneEditor.vue
@@ -94,18 +94,18 @@ watch(objectList, (newObjects) => {
})
function eraser(tile: Phaser.Tilemaps.Tile) {
- if (zoneEditorStore.drawMode === 'tile') {
+ if (zoneEditorStore.eraserMode === 'tile') {
placeTile(zoneTilemap, tiles, tile.x, tile.y, 'blank_tile')
zoneTiles[tile.y][tile.x] = 'blank_tile'
}
- if (zoneEditorStore.drawMode === 'object') {
+ if (zoneEditorStore.eraserMode === 'object') {
zoneObjects.value = zoneObjects.value.filter((object) => {
return object.position_x !== tile.x || object.position_y !== tile.y
})
}
- if (zoneEditorStore.drawMode === 'blocking tile') {
+ if (zoneEditorStore.eraserMode === 'blocking tile') {
zoneEventTiles.value = zoneEventTiles.value.filter((zoneTileEvent) => {
return zoneTileEvent.position_x !== tile.x || zoneTileEvent.position_y !== tile.y
})
diff --git a/src/components/utilities/zoneEditor/partials/ObjectList.vue b/src/components/utilities/zoneEditor/partials/ObjectList.vue
index 1099c80..47c02e7 100644
--- a/src/components/utilities/zoneEditor/partials/ObjectList.vue
+++ b/src/components/utilities/zoneEditor/partials/ObjectList.vue
@@ -9,10 +9,10 @@
-
-
-
-
+
+
+
+
@@ -58,12 +58,12 @@ const gameStore = useGameStore()
const isModalOpen = ref(false)
const zoneEditorStore = useZoneEditorStore()
const searchQuery = ref('')
-const objectDepth = ref(0)
+// const objectDepth = ref(0)
const selectedTags = ref([])
-watch(objectDepth, (depth) => {
- zoneEditorStore.setObjectDepth(depth)
-})
+// watch(objectDepth, (depth) => {
+// zoneEditorStore.setObjectDepth(depth)
+// })
const uniqueTags = computed(() => {
const allTags = zoneEditorStore.objectList.flatMap((obj) => obj.tags || [])
diff --git a/src/components/utilities/zoneEditor/partials/Toolbar.vue b/src/components/utilities/zoneEditor/partials/Toolbar.vue
index e6bb7fa..e1f6a76 100644
--- a/src/components/utilities/zoneEditor/partials/Toolbar.vue
+++ b/src/components/utilities/zoneEditor/partials/Toolbar.vue
@@ -39,23 +39,23 @@
(E)
- {{ zoneEditorStore.drawMode }}
+ {{ zoneEditorStore.eraserMode }}
-
+
Tile
-
+
Object
-
+
Teleport
- Blocking tile
+ Blocking tile
@@ -112,6 +112,11 @@ function setDrawMode(value: string) {
}
zoneEditorStore.setDrawMode(value)
selectPencilOpen.value = false
+}
+
+// drawMode
+function setEraserMode(value: string) {
+ zoneEditorStore.setEraserMode(value)
selectEraserOpen.value = false
}
diff --git a/src/stores/zoneEditor.ts b/src/stores/zoneEditor.ts
index d27e493..6f3582c 100644
--- a/src/stores/zoneEditor.ts
+++ b/src/stores/zoneEditor.ts
@@ -8,6 +8,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
zone: null as Zone | null,
tool: 'move',
drawMode: 'tile',
+ eraserMode: 'tile',
zoneList: [] as Zone[],
tileList: [] as Tile[],
objectList: [] as Object[],
@@ -55,6 +56,9 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
setDrawMode(mode: string) {
this.drawMode = mode
},
+ setEraserMode(mode: string) {
+ this.eraserMode = mode
+ },
setZoneList(zones: Zone[]) {
this.zoneList = zones
},