Exclude SiblingTemplates to be automatically specified only by recursive call
All checks were successful
E2E Testing / test (push) Successful in 1m31s
All checks were successful
E2E Testing / test (push) Successful in 1m31s
This commit is contained in:
parent
bf5403814a
commit
4d4efa49c9
@ -15,7 +15,7 @@ export class Character extends ModelComponent implements TemplateElement {
|
|||||||
super(componentName, componentDescription, ModelComponentType.CHARACTER);
|
super(componentName, componentDescription, ModelComponentType.CHARACTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
addCharacterSpecificSimpleTemplatesystem(gamesystem: Gamesystem<any, any>) {
|
addCharacterSpecificSimpleTemplatesystem(gamesystem: Gamesystem<any, any>, recursiveCall: boolean = false) {
|
||||||
if(!this.isTemplateSystemCharacterSpecific(gamesystem.componentName)) {
|
if(!this.isTemplateSystemCharacterSpecific(gamesystem.componentName)) {
|
||||||
if(gamesystem instanceof SimpleTemplateGamesystem) {
|
if(gamesystem instanceof SimpleTemplateGamesystem) {
|
||||||
this.characterSpecificTemplateSystems.push(gamesystem)
|
this.characterSpecificTemplateSystems.push(gamesystem)
|
||||||
@ -23,10 +23,15 @@ export class Character extends ModelComponent implements TemplateElement {
|
|||||||
} else if(gamesystem instanceof ProductTemplateSystem) {
|
} else if(gamesystem instanceof ProductTemplateSystem) {
|
||||||
this.characterSpecificTemplateSystems.push(gamesystem)
|
this.characterSpecificTemplateSystems.push(gamesystem)
|
||||||
gamesystem.addTemplateElement(this)
|
gamesystem.addTemplateElement(this)
|
||||||
|
|
||||||
|
if(!recursiveCall) {
|
||||||
|
gamesystem.innerGamesystems.forEach(innerGamesystem => this.addCharacterSpecificSimpleTemplatesystem(innerGamesystem, true))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gamesystem.parentGamesystem != undefined) {
|
if(gamesystem.parentGamesystem != undefined) {
|
||||||
this.addCharacterSpecificSimpleTemplatesystem(gamesystem.parentGamesystem)
|
this.addCharacterSpecificSimpleTemplatesystem(gamesystem.parentGamesystem, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user