More map editor work

This commit is contained in:
2025-01-05 04:52:16 +01:00
parent 33afef5466
commit 57b21f1499
6 changed files with 27 additions and 46 deletions

View File

@ -44,21 +44,12 @@ export class Map extends BaseEntity {
@OneToMany(() => MapEventTile, (tile) => tile.map, { orphanRemoval: true })
mapEventTiles = new Collection<MapEventTile>(this)
@OneToMany(() => MapEventTileTeleport, (teleport) => teleport.toMap, { orphanRemoval: true })
mapEventTileTeleports = new Collection<MapEventTileTeleport>(this)
@OneToMany(() => PlacedMapObject, (pmo) => pmo.map, {
name: 'placedMapObjects',
orphanRemoval: true,
})
placedMapObjects = new Collection<PlacedMapObject>(this)
@OneToMany(() => Character, (character) => character.map)
characters = new Collection<Character>(this)
@OneToMany(() => Chat, (chat) => chat.map)
chats = new Collection<Chat>(this)
setId(id: UUID) {
this.id = id
return this
@ -149,15 +140,6 @@ export class Map extends BaseEntity {
return this.mapEventTiles
}
setMapEventTileTeleports(mapEventTileTeleports: Collection<MapEventTileTeleport>) {
this.mapEventTileTeleports = mapEventTileTeleports
return this
}
getMapEventTileTeleports() {
return this.mapEventTileTeleports
}
setPlacedMapObjects(placedMapObjects: Collection<PlacedMapObject>) {
this.placedMapObjects = placedMapObjects
return this
@ -166,22 +148,4 @@ export class Map extends BaseEntity {
getPlacedMapObjects() {
return this.placedMapObjects
}
setCharacters(characters: Collection<Character>) {
this.characters = characters
return this
}
getCharacters() {
return this.characters
}
setChats(chats: Collection<Chat>) {
this.chats = chats
return this
}
getChats() {
return this.chats
}
}