+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -105,7 +104,7 @@ import { onBeforeUnmount, onMounted, ref } from 'vue'
const mapEditor = useMapEditorComposable()
-const emit = defineEmits(['save', 'clear', 'open-maps', 'open-settings', 'close-editor', 'open-lists', 'close-lists'])
+const emit = defineEmits(['save', 'clear', 'open-maps', 'open-settings', 'close-editor'])
// States
const toolbar = ref(null)
@@ -113,14 +112,10 @@ const isMapEditorSettingsModalOpen = ref(false)
const selectPencilOpen = ref(false)
const selectEraserOpen = ref(false)
const checkboxValue = ref
(false)
+const listOpen = ref(false)
// drawMode
function setDrawMode(value: string) {
- if (mapEditor.tool.value === 'paint' || mapEditor.tool.value === 'pencil' || mapEditor.tool.value === 'eraser') {
- emit('close-lists')
- if (value === 'tile' || value === 'map_object') emit('open-lists')
- }
-
mapEditor.setDrawMode(value)
selectPencilOpen.value = false
selectEraserOpen.value = false
@@ -149,13 +144,11 @@ function handleModeClick(mode: string, type: 'pencil' | 'eraser') {
function handleClick(tool: string) {
if (tool === 'mapEditorSettings') {
isMapEditorSettingsModalOpen.value = true
- emit('close-lists')
- }
- if (tool === 'settings') {
- emit('open-settings')
- emit('close-lists')
+ listOpen.value = false
+ } else if (tool === 'settings') {
+ listOpen.value = false
} else if (tool === 'move') {
- emit('close-lists')
+ listOpen.value = false
mapEditor.setTool(tool)
} else {
mapEditor.setTool(tool)
diff --git a/src/components/gameMaster/mapEditor/partials/lists/MapObjectList.vue b/src/components/gameMaster/mapEditor/partials/lists/MapObjectList.vue
deleted file mode 100644
index 0b785aa..0000000
--- a/src/components/gameMaster/mapEditor/partials/lists/MapObjectList.vue
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
![Object]()
-
-
-
-
-
-
diff --git a/src/components/gameMaster/mapEditor/partials/lists/TileList.vue b/src/components/gameMaster/mapEditor/partials/lists/TileList.vue
deleted file mode 100644
index f7f24b1..0000000
--- a/src/components/gameMaster/mapEditor/partials/lists/TileList.vue
+++ /dev/null
@@ -1,151 +0,0 @@
-
-
-
-
-
![]()
tileProcessor.processTile(group.parent)"
- :class="{
- 'border-cyan shadow-lg': isActiveTile(group.parent),
- 'border-transparent hover:border-gray-300': !isActiveTile(group.parent)
- }"
- />
-
{{ getTileCategory(group.parent) }}
-
- {{ group.children.length + 1 }}
-
-
-
-
-
-
-
-
{{ selectedGroup.parent.name }} Group
-
-
-
![]()
-
{{ getTileCategory(selectedGroup.parent) }}
-
-
-
![]()
-
{{ getTileCategory(childTile) }}
-
-
-
-
-
-
-
diff --git a/src/components/screens/MapEditor.vue b/src/components/screens/MapEditor.vue
index c72202f..c559fee 100644
--- a/src/components/screens/MapEditor.vue
+++ b/src/components/screens/MapEditor.vue
@@ -5,9 +5,10 @@
Loading...
-
+
-
+
+
@@ -21,10 +22,11 @@ import config from '@/application/config'
import 'phaser'
import type { Map as MapT } from '@/application/types'
import Map from '@/components/gameMaster/mapEditor/Map.vue'
-import ListPanel from '@/components/gameMaster/mapEditor/partials/ListPanel.vue'
import MapList from '@/components/gameMaster/mapEditor/partials/MapList.vue'
+import MapObjectList from '@/components/gameMaster/mapEditor/partials/MapObjectList.vue'
import MapSettings from '@/components/gameMaster/mapEditor/partials/MapSettings.vue'
import TeleportModal from '@/components/gameMaster/mapEditor/partials/TeleportModal.vue'
+import TileList from '@/components/gameMaster/mapEditor/partials/TileList.vue'
import Toolbar from '@/components/gameMaster/mapEditor/partials/Toolbar.vue'
import { useMapEditorComposable } from '@/composables/useMapEditorComposable'
import { loadAllTileTextures } from '@/services/mapService'
@@ -38,7 +40,6 @@ const mapEditor = useMapEditorComposable()
const gameStore = useGameStore()
const mapModal = useTemplateRef('mapModal')
-const list = useTemplateRef('list')
const mapSettingsModal = useTemplateRef('mapSettingsModal')
const isLoaded = ref(false)
@@ -93,7 +94,7 @@ function save() {
pvp: currentMap.pvp,
mapEffects: currentMap.mapEffects,
mapEventTiles: currentMap.mapEventTiles,
- placedMapObjects: currentMap.placedMapObjects.map(({ id, mapObject, depth, isRotated, positionX, positionY }) => ({ id, mapObject, depth, isRotated, positionX, positionY })) ?? []
+ placedMapObjects: currentMap.placedMapObjects.map(({ id, mapObject, isRotated, positionX, positionY }) => ({ id, mapObject, isRotated, positionX, positionY })) ?? []
}
gameStore.connection?.emit('gm:map:update', data, (response: MapT) => {
diff --git a/src/components/utilities/Debug.vue b/src/components/utilities/Debug.vue
index f22b6e8..564dae6 100644
--- a/src/components/utilities/Debug.vue
+++ b/src/components/utilities/Debug.vue
@@ -1,7 +1,15 @@