Add Character as TemplateElement to added character-relation specific assymetric gamesystems
All checks were successful
E2E Testing / test (push) Successful in 1m33s

This commit is contained in:
Sebastian Böckelmann 2024-04-19 13:49:01 +02:00
parent 93498845ec
commit 6a711ec579

View File

@ -43,7 +43,22 @@ export class Character extends ModelComponent implements TemplateElement {
addAsymetricCharacterRelationGamesystem(gamesystem: Gamesystem<any, any>, recursiveCall: boolean = false) { addAsymetricCharacterRelationGamesystem(gamesystem: Gamesystem<any, any>, recursiveCall: boolean = false) {
if(!this.isTemplateSystemCharacterRelationSpecific(gamesystem.componentName)) { if(!this.isTemplateSystemCharacterRelationSpecific(gamesystem.componentName)) {
this.assymetricCharacterRelationSpecificTemplateSystems.push(gamesystem) if(gamesystem instanceof SimpleTemplateGamesystem) {
this.assymetricCharacterRelationSpecificTemplateSystems.push(gamesystem);
gamesystem.addTemplateElement(this);
} else if(gamesystem instanceof ProductTemplateSystem) {
this.characterSpecificTemplateSystems.push(gamesystem);
gamesystem.addTemplateElement(this);
if(!recursiveCall) {
gamesystem.innerGamesystems.forEach(innerGamesystem => this.addAsymetricCharacterRelationGamesystem(innerGamesystem, true))
}
}
if(gamesystem.parentGamesystem != undefined) {
this.addAsymetricCharacterRelationGamesystem(gamesystem.parentGamesystem, true)
}
} }
} }