Introduce Symetric and Asymetric Template Relation Systems #40
@ -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