Add Character as TemplateElement to added character-relation specific assymetric gamesystems
All checks were successful
E2E Testing / test (push) Successful in 1m33s
All checks were successful
E2E Testing / test (push) Successful in 1m33s
This commit is contained in:
parent
93498845ec
commit
6a711ec579
@ -43,7 +43,22 @@ export class Character extends ModelComponent implements TemplateElement {
|
||||
|
||||
addAsymetricCharacterRelationGamesystem(gamesystem: Gamesystem<any, any>, recursiveCall: boolean = false) {
|
||||
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)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user