diff --git a/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts b/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts index 328928e..f6ee0d4 100644 --- a/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts +++ b/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts @@ -8,6 +8,7 @@ import {ProductGamesystem} from "../../../../project/game-model/gamesystems/Prod import {SimpleGamesystem} from "../../../../project/game-model/gamesystems/SimpleGamesystem"; import {ProductState} from "../../../../project/game-model/gamesystems/states/ProductState"; import {State} from "../../../../project/game-model/gamesystems/states/State"; +import {SimpleTemplateGamesystem} from "../../../../project/game-model/gamesystems/SimpleTemplateGamesystem"; @Component({ selector: 'app-product-state-editor', @@ -45,7 +46,7 @@ export class ProductStateEditorComponent implements OnInit{ generateColumnNamesRecursively(gamesystem: ProductGamesystem, nestedColumnName: string) { gamesystem.innerGamesystems.forEach(innerGamesystem => { - if(innerGamesystem instanceof SimpleGamesystem) { + if(innerGamesystem instanceof SimpleGamesystem || innerGamesystem instanceof SimpleTemplateGamesystem) { this.displayedColumns.push(nestedColumnName + innerGamesystem.componentName); } else { this.generateColumnNamesRecursively(innerGamesystem as ProductGamesystem, nestedColumnName + innerGamesystem.componentName + "."); diff --git a/testModel/gamesystems/ProductTemplate/ProductTemplate.json b/testModel/gamesystems/ProductTemplate/ProductTemplate.json index 4db1651..74d9bf8 100644 --- a/testModel/gamesystems/ProductTemplate/ProductTemplate.json +++ b/testModel/gamesystems/ProductTemplate/ProductTemplate.json @@ -3,7 +3,10 @@ "componentDescription": "", "childsystems": [ { - "componentName": "New Gamesystem 1" + "componentName": "SimpleTemplate 1" + }, + { + "componentName": "SimpleTemplate 2" } ], "templateType": 1 diff --git a/testModel/gamesystems/ProductTemplate/New Gamesystem 1.json b/testModel/gamesystems/ProductTemplate/SimpleTemplate 1.json similarity index 69% rename from testModel/gamesystems/ProductTemplate/New Gamesystem 1.json rename to testModel/gamesystems/ProductTemplate/SimpleTemplate 1.json index 3f981b3..f8435a5 100644 --- a/testModel/gamesystems/ProductTemplate/New Gamesystem 1.json +++ b/testModel/gamesystems/ProductTemplate/SimpleTemplate 1.json @@ -1,5 +1,5 @@ { - "componentName": "New Gamesystem 1", + "componentName": "SimpleTemplate 1", "componentDescription": "", "states": [], "transitions": [], diff --git a/testModel/gamesystems/ProductTemplate/SimpleTemplate 2.json b/testModel/gamesystems/ProductTemplate/SimpleTemplate 2.json new file mode 100644 index 0000000..f55b0a8 --- /dev/null +++ b/testModel/gamesystems/ProductTemplate/SimpleTemplate 2.json @@ -0,0 +1,7 @@ +{ + "componentName": "SimpleTemplate 2", + "componentDescription": "", + "states": [], + "transitions": [], + "templateType": 1 +} \ No newline at end of file