Ignore ParentGamesystem in TemplatePersisting
All checks were successful
E2E Testing / test (push) Successful in 1m31s

This commit is contained in:
Sebastian Böckelmann 2024-04-13 07:40:06 +02:00
parent 225d6ab43c
commit bf8324bf16
2 changed files with 15 additions and 3 deletions

View File

@ -9,7 +9,7 @@ import {SimpleTemplateGamesystem} from "../game-model/gamesystems/SimpleTemplate
export class CharacterSerializer {
private static ignoredKeys: string[] = ['unsaved', 'type', 'incomingTransitions', 'outgoingTransitions', 'initial', 'conditions', 'stateDescription', 'templateType']
private static ignoredKeys: string[] = ['unsaved', 'type', 'incomingTransitions', 'outgoingTransitions', 'initial', 'conditions', 'stateDescription', 'templateType', 'parentGamesystem']
public static serializeCharacters(characters: Character[]): StoreComponent[] {
const storedCharacters: StoreComponent[] = []
@ -26,7 +26,8 @@ export class CharacterSerializer {
if(value instanceof Gamesystem) {
return {
...value,
componentDescription: undefined
componentDescription: undefined,
parentGamesystem: undefined
}
}

View File

@ -1,5 +1,16 @@
{
"componentName": "New Character",
"componentDescription": "",
"characterSpecificGamesystems": []
"characterSpecificGamesystems": [
{
"componentName": "SimpleTemplate 1",
"states": [],
"transitions": []
},
{
"componentName": "SimpleTemplate 2",
"states": [],
"transitions": []
}
]
}