From 743af8c0a11acf7a32320c5481826862050cf3b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Fri, 19 Apr 2024 20:13:13 +0200 Subject: [PATCH] Serialize and Load Gernation Settings of Gamesystems --- .../parser/gamesystemParser/GamesystemParser.ts | 5 +++++ src/app/project/serializer/GamesystemSerializer.ts | 5 ++++- .../gamesystems/Characterbeziehungssystem.json | 2 +- .../gamesystems/ProductGamesystem/Letter.json | 14 ++++++++++++++ .../gamesystems/ProductGamesystem/Number.json | 14 ++++++++++++++ .../ProductGamesystem/ProductGamesystem.json | 13 +++++++++++++ testModel/script-accounts/Test.json | 6 ++++++ 7 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 testModel/gamesystems/ProductGamesystem/Letter.json create mode 100644 testModel/gamesystems/ProductGamesystem/Number.json create mode 100644 testModel/gamesystems/ProductGamesystem/ProductGamesystem.json create mode 100644 testModel/script-accounts/Test.json diff --git a/src/app/project/parser/gamesystemParser/GamesystemParser.ts b/src/app/project/parser/gamesystemParser/GamesystemParser.ts index 0e4ce93..5e7ad14 100644 --- a/src/app/project/parser/gamesystemParser/GamesystemParser.ts +++ b/src/app/project/parser/gamesystemParser/GamesystemParser.ts @@ -45,6 +45,7 @@ export class GamesystemParser { let simpleGamesystem if(gamesystemData.templateType != undefined) { simpleGamesystem = new SimpleTemplateGamesystem(gamesystemData.componentName, gamesystemData.componentDescription, gamesystemData.templateType) + simpleGamesystem.symmetric = gamesystemData.symmetric } else { simpleGamesystem = new SimpleGamesystem(gamesystemData.componentName, gamesystemData.componentDescription) } @@ -56,6 +57,7 @@ export class GamesystemParser { const transitionParser = new TransitionParser(simpleGamesystem.states, this.scriptAccounts) simpleGamesystem.transitions = transitionParser.parseTransitions(gamesystemData.transitions, gamesystemData.templateType) + simpleGamesystem.generateIsolatedStates = gamesystemData.generateIsolatedStates; return simpleGamesystem } @@ -66,8 +68,11 @@ export class GamesystemParser { productGamesystem = new ProductGamesystem(gamesystemData.componentName, gamesystemData.componentDescription); } else { productGamesystem = new ProductTemplateSystem(gamesystemData.componentName, gamesystemData.componentDescription, gamesystemData.templateType) + productGamesystem.symmetric = gamesystemData.symmetric } + productGamesystem.generateIsolatedStates = gamesystemData.generateIsolatedStates + const childsystemNames: string[] = [] for(let i=0; i