Map editor WIP

This commit is contained in:
2025-01-05 04:01:43 +01:00
parent 813ddbd8b1
commit 33afef5466
5 changed files with 20 additions and 16 deletions

View File

@ -38,16 +38,19 @@ export class Map extends BaseEntity {
@Property()
updatedAt = new Date()
@OneToMany(() => MapEffect, (effect) => effect.map)
@OneToMany(() => MapEffect, (effect) => effect.map, { orphanRemoval: true })
mapEffects = new Collection<MapEffect>(this)
@OneToMany(() => MapEventTile, (tile) => tile.map)
@OneToMany(() => MapEventTile, (tile) => tile.map, { orphanRemoval: true })
mapEventTiles = new Collection<MapEventTile>(this)
@OneToMany(() => MapEventTileTeleport, (teleport) => teleport.toMap)
@OneToMany(() => MapEventTileTeleport, (teleport) => teleport.toMap, { orphanRemoval: true })
mapEventTileTeleports = new Collection<MapEventTileTeleport>(this)
@OneToMany(() => PlacedMapObject, (object) => object.map)
@OneToMany(() => PlacedMapObject, (pmo) => pmo.map, {
name: 'placedMapObjects',
orphanRemoval: true,
})
placedMapObjects = new Collection<PlacedMapObject>(this)
@OneToMany(() => Character, (character) => character.map)