diff --git a/src/app/project/game-model/gamesystems/productSystemGenerator/ProductSystemGenerator.ts b/src/app/project/game-model/gamesystems/productSystemGenerator/ProductSystemGenerator.ts index d84bbb0..a9b3eab 100644 --- a/src/app/project/game-model/gamesystems/productSystemGenerator/ProductSystemGenerator.ts +++ b/src/app/project/game-model/gamesystems/productSystemGenerator/ProductSystemGenerator.ts @@ -114,8 +114,6 @@ export class ProductSystemGenerator { if(generatedTransitions.find(generatedTransition => generatedTransition.startingState.equals(startingState) && generatedTransition.endingState.equals(endingState)) == undefined) { generatedTransitions.push(transition) - } else { - console.log(transition) } } @@ -130,8 +128,6 @@ export class ProductSystemGenerator { if(generatedTransitions.find(generatedTransition => generatedTransition.startingState.equals(startingState) && generatedTransition.endingState.equals(endingState)) == undefined) { generatedTransitions.push(transition) - } else { - console.log(transition) } } } diff --git a/src/app/project/parser/gamesystemParser/GamesystemParser.ts b/src/app/project/parser/gamesystemParser/GamesystemParser.ts index eafbfa8..564d4ce 100644 --- a/src/app/project/parser/gamesystemParser/GamesystemParser.ts +++ b/src/app/project/parser/gamesystemParser/GamesystemParser.ts @@ -50,10 +50,10 @@ export class GamesystemParser { const stateParser = new StateParser(this.scriptAccounts); - simpleGamesystem.states = stateParser.parseStates(gamesystemData.states) + simpleGamesystem.states = stateParser.parseStates(gamesystemData.states, gamesystemData.templateType) const transitionParser = new TransitionParser(simpleGamesystem.states, this.scriptAccounts) - simpleGamesystem.transitions = transitionParser.parseTransitions(gamesystemData.transitions) + simpleGamesystem.transitions = transitionParser.parseTransitions(gamesystemData.transitions, gamesystemData.templateType) return simpleGamesystem diff --git a/src/app/project/parser/gamesystemParser/StateParser.ts b/src/app/project/parser/gamesystemParser/StateParser.ts index 8da602a..1c9cf1f 100644 --- a/src/app/project/parser/gamesystemParser/StateParser.ts +++ b/src/app/project/parser/gamesystemParser/StateParser.ts @@ -2,6 +2,8 @@ import {SimpleState} from "../../game-model/gamesystems/states/SimpleState"; import {ScriptAccount} from "../../game-model/scriptAccounts/ScriptAccount"; import {ScriptAccountCondition} from "../../game-model/gamesystems/conditions/ScriptAccountCondition"; import {ScriptAccountConditionParser} from "./ScriptAccountConditionParser"; +import {TemplateType} from "../../game-model/templates/TemplateType"; +import {SimpleTemplateState} from "../../game-model/templates/simpleGamesystem/SimpleTemplateState"; export class StateParser { @@ -12,23 +14,28 @@ export class StateParser { this.conditionParser = new ScriptAccountConditionParser(scriptAccounts) } - public parseStates(stateData: any): SimpleState[] { + public parseStates(stateData: any, templateType: TemplateType | undefined): SimpleState[] { const parsedStates: SimpleState[] = [] for(let i=0; i