diff --git a/src/app/editor/gamesystem-editor/product-gamesystem-editor/LeafGamesystemCalculator.ts b/src/app/editor/gamesystem-editor/product-gamesystem-editor/LeafGamesystemCalculator.ts index 2d0c7d0..bebc1d7 100644 --- a/src/app/editor/gamesystem-editor/product-gamesystem-editor/LeafGamesystemCalculator.ts +++ b/src/app/editor/gamesystem-editor/product-gamesystem-editor/LeafGamesystemCalculator.ts @@ -4,15 +4,17 @@ import {ProductGamesystem} from "../../../project/game-model/gamesystems/Product import {State} from "../../../project/game-model/gamesystems/states/State"; import {SimpleState} from "../../../project/game-model/gamesystems/states/SimpleState"; import {ProductState} from "../../../project/game-model/gamesystems/states/ProductState"; +import {SimpleTemplateGamesystem} from "../../../project/game-model/gamesystems/SimpleTemplateGamesystem"; export class LeafGamesystemCalculator { static calcLeafGeamesystems(gamesystem: Gamesystem) { - if(gamesystem instanceof SimpleGamesystem) { + if(gamesystem instanceof SimpleGamesystem || gamesystem instanceof SimpleTemplateGamesystem) { return [gamesystem]; } else { const product_gamesystem = gamesystem as ProductGamesystem; const leaf_gamesystems: SimpleGamesystem[] = []; + console.log(product_gamesystem) product_gamesystem.innerGamesystems.forEach(innerGamesystem => { LeafGamesystemCalculator.calcLeafGeamesystems(innerGamesystem).forEach(leafGamesystem => leaf_gamesystems.push(leafGamesystem)) }) diff --git a/testModel/characters/New Character.json b/testModel/characters/New Character.json new file mode 100644 index 0000000..d97eee6 --- /dev/null +++ b/testModel/characters/New Character.json @@ -0,0 +1,5 @@ +{ + "componentName": "New Character", + "componentDescription": "", + "characterSpecificGamesystems": [] +} \ No newline at end of file