diff --git a/src/app/project/game-model/gamesystems/ProductTemplateSystem.ts b/src/app/project/game-model/gamesystems/ProductTemplateSystem.ts index 70a727a..6ae6b51 100644 --- a/src/app/project/game-model/gamesystems/ProductTemplateSystem.ts +++ b/src/app/project/game-model/gamesystems/ProductTemplateSystem.ts @@ -7,8 +7,9 @@ import {ProductGamesystemGenerator} from "./productSystemGenerator/ProductGamesy import {SimpleGamesystem} from "./SimpleGamesystem"; import {GameModel} from "../GameModel"; import {TemplateType} from "../TemplateType"; +import {TemplateGamesystem} from "./TemplateGamesystem"; -export class ProductTemplateSystem extends ProductGamesystem { +export class ProductTemplateSystem extends ProductGamesystem implements TemplateGamesystem{ stateMap: Map = new Map(); transitionMap: Map = new Map(); @@ -28,4 +29,8 @@ export class ProductTemplateSystem extends ProductGamesystem const productSystemGenerator = new ProductTemplateGamesystemGenerator(this, referenceTemplate); productSystemGenerator.generateFromChildsystems() } + + addReferenceKey(referenceTemplate: ReferenceTemplate): void { + this.generateTemplateFromChildsystems(referenceTemplate) + } } diff --git a/src/app/project/game-model/gamesystems/SimpleTemplateGamesystem.ts b/src/app/project/game-model/gamesystems/SimpleTemplateGamesystem.ts index 4d3cfa0..21119b5 100644 --- a/src/app/project/game-model/gamesystems/SimpleTemplateGamesystem.ts +++ b/src/app/project/game-model/gamesystems/SimpleTemplateGamesystem.ts @@ -3,8 +3,9 @@ import {Gamesystem} from "./Gamesystem"; import {SimpleState} from "./states/SimpleState"; import {SimpleTemplateTransition} from "./transitions/SimpleTemplateTransition"; import {TemplateType} from "../TemplateType"; +import {TemplateGamesystem} from "./TemplateGamesystem"; -export class SimpleTemplateGamesystem extends Gamesystem, SimpleTemplateTransition> { +export class SimpleTemplateGamesystem extends Gamesystem, SimpleTemplateTransition> implements TemplateGamesystem{ createState(label: string, description: string): SimpleState | undefined { if(label == null) { return undefined; diff --git a/src/app/project/game-model/gamesystems/TemplateGamesystem.ts b/src/app/project/game-model/gamesystems/TemplateGamesystem.ts new file mode 100644 index 0000000..1b77e6b --- /dev/null +++ b/src/app/project/game-model/gamesystems/TemplateGamesystem.ts @@ -0,0 +1,3 @@ +export interface TemplateGamesystem { + addReferenceKey(referenceTemplate: ReferenceTemplate): void; +}