Introduce Symetric and Asymetric Template Relation Systems #40

Merged
sebastian merged 23 commits from assymetric-template-relation-systems into template-systems 2024-04-19 20:04:54 +02:00
17 changed files with 12 additions and 452 deletions
Showing only changes of commit b2b4b936cd - Show all commits

View File

@ -76,6 +76,12 @@ function createWindow(): BrowserWindow {
click: () => { click: () => {
win!.webContents.send('context-menu', "new-gamesystem-character"); win!.webContents.send('context-menu', "new-gamesystem-character");
} }
},
{
label: "Character-Relation",
click: () => {
win!.webContents.send('context-menu', "new-gamesystem-character_relation");
}
} }
] ]
}, },

View File

@ -1,3 +1,4 @@
export enum TemplateType { export enum TemplateType {
CHARACTER CHARACTER,
CHARACTER_RELATION
} }

View File

@ -4,6 +4,8 @@ export class TemplateTypeUtilities {
static fromString(string: string) { static fromString(string: string) {
if(string === 'character') { if(string === 'character') {
return TemplateType.CHARACTER return TemplateType.CHARACTER
} else if(string === 'character_relation') {
return TemplateType.CHARACTER_RELATION
} }
} }
} }

View File

@ -1,50 +1,5 @@
{ {
"componentName": "Astrid Hofferson", "componentName": "Astrid Hofferson",
"componentDescription": "", "componentDescription": "",
"characterSpecificTemplateSystems": [ "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"
}
]
}
]
}
]
} }

View File

@ -1,60 +1,5 @@
{ {
"componentName": "Hicks Haddock", "componentName": "Hicks Haddock",
"componentDescription": "", "componentDescription": "",
"characterSpecificTemplateSystems": [ "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": []
}
]
}
]
} }

View File

@ -1,6 +0,0 @@
{
"componentName": "NormalGamesystem",
"componentDescription": "",
"states": [],
"transitions": []
}

View File

@ -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
}

View File

@ -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"
}
]
}

View File

@ -1,13 +0,0 @@
{
"componentName": "Producttest",
"componentDescription": "",
"childsystems": [
{
"componentName": "Letters"
},
{
"componentName": "Numbers"
}
],
"templateType": 0
}

View File

@ -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
}

View File

@ -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"
}
]
}

View File

@ -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"
}
]
}

View File

@ -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"
}
]
}

View File

@ -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"
}
]
}

View File

@ -1,6 +0,0 @@
{
"componentName": "Luftfeuchtigkeit",
"componentDescription": "",
"minValue": 0,
"maxValue": 100
}

View File

@ -1,6 +0,0 @@
{
"componentName": "New ScriptAccount",
"componentDescription": "",
"minValue": 0,
"maxValue": 100
}

View File

@ -1,6 +0,0 @@
{
"componentName": "Temperature",
"componentDescription": "",
"minValue": -30,
"maxValue": 50
}