From 201f628bfafe0518cf7730ac7ef4b17d14741637 Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Fri, 14 Feb 2025 03:16:22 +0100 Subject: [PATCH] Saving teleports works again --- src/application/types.ts | 2 +- .../gameMaster/mapEditor/mapPartials/MapEventTiles.vue | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/application/types.ts b/src/application/types.ts index f930451..c9c09db 100644 --- a/src/application/types.ts +++ b/src/application/types.ts @@ -100,7 +100,7 @@ export enum MapEventTileType { export type MapEventTile = { id: string - mapId: string + map: string type: MapEventTileType positionX: number positionY: number diff --git a/src/components/gameMaster/mapEditor/mapPartials/MapEventTiles.vue b/src/components/gameMaster/mapEditor/mapPartials/MapEventTiles.vue index 726bc78..cada9d0 100644 --- a/src/components/gameMaster/mapEditor/mapPartials/MapEventTiles.vue +++ b/src/components/gameMaster/mapEditor/mapPartials/MapEventTiles.vue @@ -94,15 +94,14 @@ function pencil(pointer: Phaser.Input.Pointer, map: MapT) { const newEventTile = { id: uuidv4() as UUID, - mapId: map.id, - map: map, + map: map.id, type: mapEditor.drawMode.value === 'blocking tile' ? MapEventTileType.BLOCK : MapEventTileType.TELEPORT, positionX: tile.x, positionY: tile.y, teleport: mapEditor.drawMode.value === 'teleport' ? { - toMap: mapEditor.teleportSettings.value.toMapId, + toMapId: mapEditor.teleportSettings.value.toMapId, toPositionX: mapEditor.teleportSettings.value.toPositionX, toPositionY: mapEditor.teleportSettings.value.toPositionY, toRotation: mapEditor.teleportSettings.value.toRotation