diff --git a/src/app/editor/gamesystem-editor/gamesystem-editor.component.html b/src/app/editor/gamesystem-editor/gamesystem-editor.component.html
index 2eb564e..598d904 100644
--- a/src/app/editor/gamesystem-editor/gamesystem-editor.component.html
+++ b/src/app/editor/gamesystem-editor/gamesystem-editor.component.html
@@ -1,3 +1,11 @@
+
+ Template
+
+ None
+ Character
+ Location
+
+
diff --git a/src/app/editor/gamesystem-editor/gamesystem-editor.component.ts b/src/app/editor/gamesystem-editor/gamesystem-editor.component.ts
index f14dda3..17e5dad 100644
--- a/src/app/editor/gamesystem-editor/gamesystem-editor.component.ts
+++ b/src/app/editor/gamesystem-editor/gamesystem-editor.component.ts
@@ -5,6 +5,7 @@ import { Transition } from '../../project/game-model/gamesystems/transitions/Tra
import {ScriptAccount} from "../../project/game-model/scriptAccounts/ScriptAccount";
import {SimpleGamesystem} from "../../project/game-model/gamesystems/SimpleGamesystem";
import {ProductGamesystem} from "../../project/game-model/gamesystems/ProductGamesystem";
+import {TemplateType} from "../../project/game-model/gamesystems/TemplateType";
@Component({
selector: 'app-gamesystem-editor',
@@ -40,4 +41,6 @@ export class GamesystemEditorComponent implements OnInit{
onOpenGamesystemEditor(gamesystem: SimpleGamesystem) {
this.openGamesystemEmitter.emit(gamesystem);
}
+
+ protected readonly TemplateType = TemplateType;
}
diff --git a/src/app/project/game-model/gamesystems/Gamesystem.ts b/src/app/project/game-model/gamesystems/Gamesystem.ts
index 2e94174..1dc3788 100644
--- a/src/app/project/game-model/gamesystems/Gamesystem.ts
+++ b/src/app/project/game-model/gamesystems/Gamesystem.ts
@@ -1,13 +1,15 @@
-import {SimpleGamesystem} from "./SimpleGamesystem";
import {ProductGamesystem} from "./ProductGamesystem";
import {ModelComponent} from "../ModelComponent";
import {ModelComponentType} from "../ModelComponentType";
+import {TemplateType} from "./TemplateType";
export abstract class Gamesystem extends ModelComponent{
states: S[] = [];
transitions: T[] = [];
parentGamesystem: ProductGamesystem | undefined
+
+ template: TemplateType = TemplateType.NONE
constructor(gamesystemName: string, gamesystemDescription: string) {
super(gamesystemName, gamesystemDescription, ModelComponentType.GAMESYTEM);
}
diff --git a/src/app/project/game-model/gamesystems/TemplateType.ts b/src/app/project/game-model/gamesystems/TemplateType.ts
new file mode 100644
index 0000000..2338ef5
--- /dev/null
+++ b/src/app/project/game-model/gamesystems/TemplateType.ts
@@ -0,0 +1,5 @@
+export enum TemplateType {
+ NONE,
+ CHARACTER,
+ LOCATION
+}
diff --git a/src/app/project/parser/gamesystemParser/GamesystemParser.ts b/src/app/project/parser/gamesystemParser/GamesystemParser.ts
index e085bba..e40fa92 100644
--- a/src/app/project/parser/gamesystemParser/GamesystemParser.ts
+++ b/src/app/project/parser/gamesystemParser/GamesystemParser.ts
@@ -36,6 +36,8 @@ export class GamesystemParser {
} else {
parsedSystem = this.parseSimpleGamesystem(parsedGamesystemData)
}
+ parsedSystem.template = parsedGamesystemData.template
+
this.parsedGamesystems.push(parsedSystem);
}
diff --git a/testModel/gamesystems/Characterstimmung.json b/testModel/gamesystems/Characterstimmung.json
new file mode 100644
index 0000000..eb0d4d4
--- /dev/null
+++ b/testModel/gamesystems/Characterstimmung.json
@@ -0,0 +1,63 @@
+{
+ "componentName": "Characterstimmung",
+ "componentDescription": "Mit diesem Characterspezifischen System soll die Grundstimmung eines Characters modelliert werden. Mit diesem System kann bspw. beschrieben werden, ob ein Character gerade glücklich, wütend, traurig etc. ist",
+ "states": [
+ {
+ "initial": true,
+ "conditions": [],
+ "stateLabel": "Glücklich",
+ "stateDescription": ""
+ },
+ {
+ "initial": false,
+ "conditions": [],
+ "stateLabel": "Wütend",
+ "stateDescription": ""
+ },
+ {
+ "initial": false,
+ "conditions": [],
+ "stateLabel": "Traurig",
+ "stateDescription": ""
+ }
+ ],
+ "transitions": [
+ {
+ "scriptAccountActions": [],
+ "scriptAccountConditions": [],
+ "startingState": "Glücklich",
+ "endingState": "Wütend"
+ },
+ {
+ "scriptAccountActions": [],
+ "scriptAccountConditions": [],
+ "startingState": "Glücklich",
+ "endingState": "Traurig"
+ },
+ {
+ "scriptAccountActions": [],
+ "scriptAccountConditions": [],
+ "startingState": "Wütend",
+ "endingState": "Traurig"
+ },
+ {
+ "scriptAccountActions": [],
+ "scriptAccountConditions": [],
+ "startingState": "Wütend",
+ "endingState": "Glücklich"
+ },
+ {
+ "scriptAccountActions": [],
+ "scriptAccountConditions": [],
+ "startingState": "Traurig",
+ "endingState": "Glücklich"
+ },
+ {
+ "scriptAccountActions": [],
+ "scriptAccountConditions": [],
+ "startingState": "Traurig",
+ "endingState": "Wütend"
+ }
+ ],
+ "template": 1
+}
\ No newline at end of file
diff --git a/testModel/gamesystems/Testsystem.json b/testModel/gamesystems/Testsystem.json
deleted file mode 100644
index 654df19..0000000
--- a/testModel/gamesystems/Testsystem.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "componentName": "Testsystem",
- "componentDescription": "",
- "states": [
- {
- "initial": false,
- "conditions": [],
- "stateLabel": "A",
- "stateDescription": ""
- },
- {
- "initial": false,
- "conditions": [],
- "stateLabel": "B",
- "stateDescription": ""
- }
- ],
- "transitions": [
- {
- "scriptAccountActions": [
- {
- "changingValue": 5,
- "scriptAccount": "New ScriptAccount"
- }
- ],
- "scriptAccountConditions": [
- {
- "scriptAccount": "Temperature",
- "minValue": 0,
- "maxValue": "10"
- }
- ],
- "startingState": "A",
- "endingState": "B"
- }
- ]
-}
\ No newline at end of file
diff --git a/testModel/gamesystems/Weathersystem/Season.json b/testModel/gamesystems/Weathersystem/Season.json
index a815ccb..0d38734 100644
--- a/testModel/gamesystems/Weathersystem/Season.json
+++ b/testModel/gamesystems/Weathersystem/Season.json
@@ -76,5 +76,6 @@
"startingState": "Winter",
"endingState": "Frühling"
}
- ]
+ ],
+ "template": 0
}
\ No newline at end of file
diff --git a/testModel/gamesystems/Weathersystem/Weather.json b/testModel/gamesystems/Weathersystem/Weather.json
index b9de825..39afb9f 100644
--- a/testModel/gamesystems/Weathersystem/Weather.json
+++ b/testModel/gamesystems/Weathersystem/Weather.json
@@ -76,5 +76,6 @@
"startingState": "Schnee",
"endingState": "Wolke"
}
- ]
+ ],
+ "template": 0
}
\ No newline at end of file