diff --git a/app/main.ts b/app/main.ts index 449ef21..ba1a8b6 100644 --- a/app/main.ts +++ b/app/main.ts @@ -76,6 +76,12 @@ function createWindow(): BrowserWindow { click: () => { win!.webContents.send('context-menu', "new-gamesystem-character"); } + }, + { + label: "Character-Relation", + click: () => { + win!.webContents.send('context-menu', "new-gamesystem-character_relation"); + } } ] }, diff --git a/src/app/project/game-model/templates/TemplateType.ts b/src/app/project/game-model/templates/TemplateType.ts index 6961052..f8318e7 100644 --- a/src/app/project/game-model/templates/TemplateType.ts +++ b/src/app/project/game-model/templates/TemplateType.ts @@ -1,3 +1,4 @@ export enum TemplateType { - CHARACTER + CHARACTER, + CHARACTER_RELATION } diff --git a/src/app/project/game-model/templates/TemplateTypeUtilities.ts b/src/app/project/game-model/templates/TemplateTypeUtilities.ts index 7efc792..837b610 100644 --- a/src/app/project/game-model/templates/TemplateTypeUtilities.ts +++ b/src/app/project/game-model/templates/TemplateTypeUtilities.ts @@ -4,6 +4,8 @@ export class TemplateTypeUtilities { static fromString(string: string) { if(string === 'character') { return TemplateType.CHARACTER + } else if(string === 'character_relation') { + return TemplateType.CHARACTER_RELATION } } } diff --git a/testModel/characters/Astrid Hofferson.json b/testModel/characters/Astrid Hofferson.json index 014ec69..9437d7c 100644 --- a/testModel/characters/Astrid Hofferson.json +++ b/testModel/characters/Astrid Hofferson.json @@ -1,50 +1,5 @@ { "componentName": "Astrid Hofferson", "componentDescription": "", - "characterSpecificTemplateSystems": [ - { - "componentName": "TemplateGamesystem", - "states": [ - { - "stateLabel": "A", - "conditionMap": [ - { - "scriptAccount": "Luftfeuchtigkeit", - "minValue": 0, - "maxValue": "10" - } - ] - }, - { - "stateLabel": "B", - "conditionMap": [ - { - "scriptAccount": "New ScriptAccount", - "minValue": 0, - "maxValue": 100 - } - ] - } - ], - "transitions": [ - { - "startingState": "A", - "endingState": "B", - "conditionMap": [ - { - "scriptAccount": "Temperature", - "minValue": 0, - "maxValue": 10 - } - ], - "actionMap": [ - { - "changingValue": 10, - "scriptAccount": "Luftfeuchtigkeit" - } - ] - } - ] - } - ] + "characterSpecificTemplateSystems": [] } \ No newline at end of file diff --git a/testModel/characters/Hicks Haddock.json b/testModel/characters/Hicks Haddock.json index 158b912..1f75bd9 100644 --- a/testModel/characters/Hicks Haddock.json +++ b/testModel/characters/Hicks Haddock.json @@ -1,60 +1,5 @@ { "componentName": "Hicks Haddock", "componentDescription": "", - "characterSpecificTemplateSystems": [ - { - "componentName": "TemplateGamesystem", - "states": [ - { - "stateLabel": "A", - "conditionMap": [ - { - "scriptAccount": "Luftfeuchtigkeit", - "minValue": 0, - "maxValue": "10" - } - ] - }, - { - "stateLabel": "B", - "conditionMap": [ - { - "scriptAccount": "New ScriptAccount", - "minValue": 0, - "maxValue": 100 - } - ] - } - ], - "transitions": [ - { - "startingState": "A", - "endingState": "B", - "conditionMap": [], - "actionMap": [] - } - ] - }, - { - "componentName": "Letters", - "states": [ - { - "stateLabel": "A", - "conditionMap": [] - }, - { - "stateLabel": "B", - "conditionMap": [] - } - ], - "transitions": [ - { - "startingState": "A", - "endingState": "B", - "conditionMap": [], - "actionMap": [] - } - ] - } - ] + "characterSpecificTemplateSystems": [] } \ No newline at end of file diff --git a/testModel/gamesystems/NormalGamesystem.json b/testModel/gamesystems/NormalGamesystem.json deleted file mode 100644 index 7525520..0000000 --- a/testModel/gamesystems/NormalGamesystem.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "componentName": "NormalGamesystem", - "componentDescription": "", - "states": [], - "transitions": [] -} \ No newline at end of file diff --git a/testModel/gamesystems/Producttest/Letters.json b/testModel/gamesystems/Producttest/Letters.json deleted file mode 100644 index 9bab958..0000000 --- a/testModel/gamesystems/Producttest/Letters.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "componentName": "Letters", - "componentDescription": "", - "states": [ - { - "initial": false, - "conditions": [], - "stateLabel": "A", - "stateDescription": "" - }, - { - "initial": false, - "conditions": [], - "stateLabel": "B", - "stateDescription": "" - } - ], - "transitions": [ - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "A", - "endingState": "B" - } - ], - "templateType": 0 -} \ No newline at end of file diff --git a/testModel/gamesystems/Producttest/Numbers.json b/testModel/gamesystems/Producttest/Numbers.json deleted file mode 100644 index 89f1e28..0000000 --- a/testModel/gamesystems/Producttest/Numbers.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "componentName": "Numbers", - "componentDescription": "", - "states": [ - { - "initial": false, - "conditions": [], - "stateLabel": "1", - "stateDescription": "" - }, - { - "initial": false, - "conditions": [], - "stateLabel": "2", - "stateDescription": "" - } - ], - "transitions": [ - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "1", - "endingState": "2" - } - ] -} \ No newline at end of file diff --git a/testModel/gamesystems/Producttest/Producttest.json b/testModel/gamesystems/Producttest/Producttest.json deleted file mode 100644 index 239e216..0000000 --- a/testModel/gamesystems/Producttest/Producttest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "componentName": "Producttest", - "componentDescription": "", - "childsystems": [ - { - "componentName": "Letters" - }, - { - "componentName": "Numbers" - } - ], - "templateType": 0 -} \ No newline at end of file diff --git a/testModel/gamesystems/TemplateGamesystem.json b/testModel/gamesystems/TemplateGamesystem.json deleted file mode 100644 index 0a1da3d..0000000 --- a/testModel/gamesystems/TemplateGamesystem.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "componentName": "TemplateGamesystem", - "componentDescription": "", - "states": [ - { - "initial": false, - "conditions": [ - { - "scriptAccount": "Luftfeuchtigkeit", - "minValue": 0, - "maxValue": "10" - } - ], - "stateLabel": "A", - "stateDescription": "" - }, - { - "initial": false, - "conditions": [ - { - "scriptAccount": "New ScriptAccount", - "minValue": 0, - "maxValue": 100 - } - ], - "stateLabel": "B", - "stateDescription": "" - } - ], - "transitions": [ - { - "scriptAccountActions": [ - { - "changingValue": 10, - "scriptAccount": "Luftfeuchtigkeit" - } - ], - "scriptAccountConditions": [ - { - "scriptAccount": "Temperature", - "minValue": 0, - "maxValue": 10 - } - ], - "startingState": "A", - "endingState": "B" - } - ], - "templateType": 0 -} \ 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 deleted file mode 100644 index a815ccb..0000000 --- a/testModel/gamesystems/Weathersystem/Season.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "componentName": "Season", - "componentDescription": "Ein simples Gamesystem zur Modellierung verschiedener Jahreszeiten und deren Übergänge", - "states": [ - { - "initial": true, - "conditions": [ - { - "scriptAccount": "Temperature", - "minValue": 0, - "maxValue": "10" - } - ], - "stateLabel": "Frühling", - "stateDescription": "" - }, - { - "initial": false, - "conditions": [ - { - "scriptAccount": "Temperature", - "minValue": "10", - "maxValue": "30" - } - ], - "stateLabel": "Sommer", - "stateDescription": "" - }, - { - "initial": false, - "conditions": [ - { - "scriptAccount": "Temperature", - "minValue": "10", - "maxValue": "20" - } - ], - "stateLabel": "Herbst", - "stateDescription": "" - }, - { - "initial": false, - "conditions": [ - { - "scriptAccount": "Temperature", - "minValue": "-10", - "maxValue": "10" - } - ], - "stateLabel": "Winter", - "stateDescription": "" - } - ], - "transitions": [ - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "Frühling", - "endingState": "Sommer" - }, - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "Sommer", - "endingState": "Herbst" - }, - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "Herbst", - "endingState": "Winter" - }, - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "Winter", - "endingState": "Frühling" - } - ] -} \ No newline at end of file diff --git a/testModel/gamesystems/Weathersystem/Weather.json b/testModel/gamesystems/Weathersystem/Weather.json deleted file mode 100644 index b9de825..0000000 --- a/testModel/gamesystems/Weathersystem/Weather.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "componentName": "Weather", - "componentDescription": "A small Gamesystem about local weather events", - "states": [ - { - "initial": true, - "conditions": [], - "stateLabel": "Sonne", - "stateDescription": "" - }, - { - "initial": false, - "conditions": [ - { - "scriptAccount": "Temperature", - "minValue": 0, - "maxValue": "30" - } - ], - "stateLabel": "Regen", - "stateDescription": "" - }, - { - "initial": false, - "conditions": [], - "stateLabel": "Wolke", - "stateDescription": "" - }, - { - "initial": false, - "conditions": [ - { - "scriptAccount": "Temperature", - "minValue": "-5", - "maxValue": 0 - } - ], - "stateLabel": "Schnee", - "stateDescription": "" - } - ], - "transitions": [ - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "Sonne", - "endingState": "Wolke" - }, - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "Wolke", - "endingState": "Sonne" - }, - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "Wolke", - "endingState": "Regen" - }, - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "Regen", - "endingState": "Wolke" - }, - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "Wolke", - "endingState": "Schnee" - }, - { - "scriptAccountActions": [], - "scriptAccountConditions": [], - "startingState": "Schnee", - "endingState": "Wolke" - } - ] -} \ No newline at end of file diff --git a/testModel/gamesystems/Weathersystem/Weathersystem.json b/testModel/gamesystems/Weathersystem/Weathersystem.json deleted file mode 100644 index b9abfec..0000000 --- a/testModel/gamesystems/Weathersystem/Weathersystem.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "componentName": "Weathersystem", - "componentDescription": "Ein Wettersystem, dass sich aus normalem Wetter (Sonne, Regen, Wolke, Schnee, Sturm etc.) und zusätzlich den Jahreszeiten (Frühling, Sommer, Herbst, Winter, etc.) zusammensetzt.", - "childsystems": [ - { - "componentName": "Season" - }, - { - "componentName": "Weather" - } - ] -} \ No newline at end of file diff --git a/testModel/script-accounts/Luftfeuchtigkeit.json b/testModel/script-accounts/Luftfeuchtigkeit.json deleted file mode 100644 index b4593b2..0000000 --- a/testModel/script-accounts/Luftfeuchtigkeit.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "componentName": "Luftfeuchtigkeit", - "componentDescription": "", - "minValue": 0, - "maxValue": 100 -} \ No newline at end of file diff --git a/testModel/script-accounts/New ScriptAccount.json b/testModel/script-accounts/New ScriptAccount.json deleted file mode 100644 index c4a4176..0000000 --- a/testModel/script-accounts/New ScriptAccount.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "componentName": "New ScriptAccount", - "componentDescription": "", - "minValue": 0, - "maxValue": 100 -} \ No newline at end of file diff --git a/testModel/script-accounts/Temperature.json b/testModel/script-accounts/Temperature.json deleted file mode 100644 index 91a3a6c..0000000 --- a/testModel/script-accounts/Temperature.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "componentName": "Temperature", - "componentDescription": "", - "minValue": -30, - "maxValue": 50 -} \ No newline at end of file