Teleport modal restored, and expanded undo/redo to include all placed and erase edits across each map element type (map object advanced actions WIP)
This commit is contained in:
@ -34,6 +34,7 @@ import { MapStorage } from '@/storage/storages'
|
||||
import { useGameStore } from '@/stores/gameStore'
|
||||
import { Game, Scene } from 'phavuer'
|
||||
import { ref, useTemplateRef } from 'vue'
|
||||
import teleportModal from '@/components/gameMaster/mapEditor/partials/TeleportModal.vue'
|
||||
|
||||
const mapStorage = new MapStorage()
|
||||
const mapEditor = useMapEditorComposable()
|
||||
@ -41,6 +42,7 @@ const gameStore = useGameStore()
|
||||
|
||||
const mapModal = useTemplateRef('mapModal')
|
||||
const mapSettingsModal = useTemplateRef('mapSettingsModal')
|
||||
const teleportSettings = useTemplateRef('teleportModal')
|
||||
|
||||
const isLoaded = ref(false)
|
||||
|
||||
@ -86,15 +88,9 @@ function save() {
|
||||
if (!currentMap) return
|
||||
|
||||
const data = {
|
||||
...currentMap,
|
||||
mapId: currentMap.id,
|
||||
name: currentMap.name,
|
||||
width: currentMap.width,
|
||||
height: currentMap.height,
|
||||
tiles: currentMap.tiles,
|
||||
pvp: currentMap.pvp,
|
||||
mapEffects: currentMap.mapEffects,
|
||||
mapEventTiles: currentMap.mapEventTiles,
|
||||
placedMapObjects: currentMap.placedMapObjects.map(({ id, mapObject, isRotated, positionX, positionY }) => ({ id, mapObject, isRotated, positionX, positionY })) ?? []
|
||||
placedMapObjects: currentMap.placedMapObjects.map(({ id, mapObject, depth, isRotated, positionX, positionY }) => ({ id, mapObject, depth, isRotated, positionX, positionY })) ?? []
|
||||
}
|
||||
|
||||
gameStore.connection?.emit('gm:map:update', data, (response: MapT) => {
|
||||
|
Reference in New Issue
Block a user