Saving teleports works again

This commit is contained in:
Dennis Postma 2025-02-14 03:16:22 +01:00
parent af99d66595
commit 201f628bfa
2 changed files with 3 additions and 4 deletions

View File

@ -100,7 +100,7 @@ export enum MapEventTileType {
export type MapEventTile = {
id: string
mapId: string
map: string
type: MapEventTileType
positionX: number
positionY: number

View File

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