From 3efa6124351bbfce8c8cb5a4fe8dd410807a763e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Fri, 19 Apr 2024 14:52:59 +0200 Subject: [PATCH] Open CharacterRelationSpecific Gamesystem in GamesystemEditor --- .../character-editor.component.html | 17 ++++++++++++++++- .../game-model/characters/CharacterRelation.ts | 4 +++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/app/editor/character-editor/character-editor.component.html b/src/app/editor/character-editor/character-editor.component.html index eefda53..959cad6 100644 --- a/src/app/editor/character-editor/character-editor.component.html +++ b/src/app/editor/character-editor/character-editor.component.html @@ -38,6 +38,21 @@ Character-Relations -

{{characterRelation.firstCharacter.componentName}} - {{characterRelation.secondCharacter.componentName}}

+ + + + {{characterRelation.firstCharacter.componentName}} - {{characterRelation.secondCharacter.componentName}} + +

Templatesystems: {{characterRelation.characterRelationGamesystems.length}}

+ + + + {{templateSystem.componentName}} + + + + +
+
diff --git a/src/app/project/game-model/characters/CharacterRelation.ts b/src/app/project/game-model/characters/CharacterRelation.ts index e5a5d96..68dfdfd 100644 --- a/src/app/project/game-model/characters/CharacterRelation.ts +++ b/src/app/project/game-model/characters/CharacterRelation.ts @@ -18,11 +18,13 @@ export class CharacterRelation implements TemplateElement{ } addCharacterRelationSystem(gamesystem: Gamesystem) { - if((gamesystem instanceof SimpleTemplateGamesystem || gamesystem instanceof ProductTemplateSystem) && this.isGamesystemCharacterRelationSpecific(gamesystem.componentName)) { + if((gamesystem instanceof SimpleTemplateGamesystem || gamesystem instanceof ProductTemplateSystem) && !this.isGamesystemCharacterRelationSpecific(gamesystem.componentName)) { const templateGamesystem = new ProductTemplateSystem(gamesystem.componentName, gamesystem.componentDescription, TemplateType.CHARACTER_RELATION); templateGamesystem.addChildGamesystem(gamesystem); templateGamesystem.addChildGamesystem(gamesystem); this.characterRelationGamesystems.push(templateGamesystem); + } else { + console.log("Test") } }