template-systems #41
@ -10,6 +10,9 @@ export class SimpleTemplateState extends SimpleState {
|
||||
addTemplateElement(templateElement: TemplateElement) {
|
||||
if(!this.conditionMap.has(templateElement)) {
|
||||
this.conditionMap.set(templateElement, this.conditions)
|
||||
}
|
||||
|
||||
if(!this.initialMap.has(templateElement)) {
|
||||
this.initialMap.set(templateElement, this.initial);
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,10 @@ export class CharacterSerializer {
|
||||
return value.componentName
|
||||
}
|
||||
|
||||
if(key === 'conditionMap' || key === 'actionMap') {
|
||||
if(key === 'conditionMap' || key === 'actionMap' || key === 'initialMap') {
|
||||
if(key === 'initialMap') {
|
||||
console.log(value)
|
||||
}
|
||||
if(value.get(character) == undefined) {
|
||||
return []
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import {ProductTemplateSystem} from "../game-model/templates/productGamesystem/P
|
||||
|
||||
export class GamesystemSerializer {
|
||||
|
||||
private static IGNORED_SIMPLE_ATTRIBUTES = ["parentGamesystem", 'incomingTransitions', "outgoingTransitions", "unsaved", "type", "conditionMap", "actionMap"]
|
||||
private static IGNORED_SIMPLE_ATTRIBUTES = ["parentGamesystem", 'incomingTransitions', "outgoingTransitions", "unsaved", "type", "conditionMap", "actionMap", "initialMap"]
|
||||
|
||||
public static serializeGamesystems(gamesystems: Gamesystem<any, any>[]): StoreComponent[] {
|
||||
let storedGamesystems: StoreComponent[] = []
|
||||
|
@ -2,5 +2,69 @@
|
||||
"componentName": "Astrid Hofferson",
|
||||
"componentDescription": "",
|
||||
"characterSpecificTemplateSystems": [],
|
||||
"characterRelationGamesystems": []
|
||||
"characterRelationGamesystems": [
|
||||
{
|
||||
"componentName": "Characterbeziehungssystem",
|
||||
"states": [
|
||||
{
|
||||
"stateLabel": "Feind",
|
||||
"conditionMap": [],
|
||||
"initialMap": true
|
||||
},
|
||||
{
|
||||
"stateLabel": "Freund",
|
||||
"conditionMap": [],
|
||||
"initialMap": false
|
||||
},
|
||||
{
|
||||
"stateLabel": "Fester Freund",
|
||||
"conditionMap": [],
|
||||
"initialMap": false
|
||||
},
|
||||
{
|
||||
"stateLabel": "Eltern",
|
||||
"conditionMap": [],
|
||||
"initialMap": false
|
||||
},
|
||||
{
|
||||
"stateLabel": "Geschwister",
|
||||
"conditionMap": [],
|
||||
"initialMap": false
|
||||
},
|
||||
{
|
||||
"stateLabel": "Großeltern",
|
||||
"conditionMap": [],
|
||||
"initialMap": false
|
||||
}
|
||||
],
|
||||
"transitions": [
|
||||
{
|
||||
"startingState": "Feind",
|
||||
"endingState": "Freund",
|
||||
"conditionMap": [],
|
||||
"actionMap": []
|
||||
},
|
||||
{
|
||||
"startingState": "Freund",
|
||||
"endingState": "Feind",
|
||||
"conditionMap": [],
|
||||
"actionMap": []
|
||||
},
|
||||
{
|
||||
"startingState": "Freund",
|
||||
"endingState": "Fester Freund",
|
||||
"conditionMap": [],
|
||||
"actionMap": []
|
||||
},
|
||||
{
|
||||
"startingState": "Fester Freund",
|
||||
"endingState": "Feind",
|
||||
"conditionMap": [],
|
||||
"actionMap": []
|
||||
}
|
||||
],
|
||||
"generateIsolatedStates": true,
|
||||
"symmetric": true
|
||||
}
|
||||
]
|
||||
}
|
@ -8,27 +8,33 @@
|
||||
"states": [
|
||||
{
|
||||
"stateLabel": "Feind",
|
||||
"conditionMap": []
|
||||
"conditionMap": [],
|
||||
"initialMap": false
|
||||
},
|
||||
{
|
||||
"stateLabel": "Freund",
|
||||
"conditionMap": []
|
||||
"conditionMap": [],
|
||||
"initialMap": false
|
||||
},
|
||||
{
|
||||
"stateLabel": "Fester Freund",
|
||||
"conditionMap": []
|
||||
"conditionMap": [],
|
||||
"initialMap": true
|
||||
},
|
||||
{
|
||||
"stateLabel": "Eltern",
|
||||
"conditionMap": []
|
||||
"conditionMap": [],
|
||||
"initialMap": false
|
||||
},
|
||||
{
|
||||
"stateLabel": "Geschwister",
|
||||
"conditionMap": []
|
||||
"conditionMap": [],
|
||||
"initialMap": false
|
||||
},
|
||||
{
|
||||
"stateLabel": "Großeltern",
|
||||
"conditionMap": []
|
||||
"conditionMap": [],
|
||||
"initialMap": false
|
||||
}
|
||||
],
|
||||
"transitions": [
|
||||
|
@ -9,7 +9,7 @@
|
||||
"stateDescription": ""
|
||||
},
|
||||
{
|
||||
"initial": true,
|
||||
"initial": false,
|
||||
"conditions": [],
|
||||
"stateLabel": "Freund",
|
||||
"stateDescription": ""
|
||||
|
Loading…
Reference in New Issue
Block a user