template-systems #41

Merged
sebastian merged 30 commits from template-systems into main 2024-04-19 21:10:01 +02:00
Showing only changes of commit 6a711ec579 - Show all commits

View File

@ -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)
}
}
}