Fix Product Template Generation for Relations (generation was not triggered) #37
@ -76,6 +76,7 @@ export class GameModel {
|
||||
|
||||
let parentProductGamesystem: ProductGamesystem;
|
||||
if(parentGamesystem instanceof SimpleTemplateGamesystem) {
|
||||
console.log("Simple Template")
|
||||
parentProductGamesystem = ProductTemplateCreator.constructTemplateFromSimpleGamesystem(parentGamesystem, this, templateType!)
|
||||
} else if(parentGamesystem instanceof SimpleGamesystem) {
|
||||
if(simpleGamesystem instanceof SimpleTemplateGamesystem) {
|
||||
|
@ -4,6 +4,7 @@ import {ProductTemplateSystem} from "../templates/productGamesystem/ProductTempl
|
||||
import {Gamesystem} from "../gamesystems/Gamesystem";
|
||||
import {SimpleTemplateGamesystem} from "../templates/simpleGamesystem/SimpleTemplateGamesystem";
|
||||
import {TemplateType} from "../templates/TemplateType";
|
||||
import {ProductTemplateCreator} from "../templates/productGamesystem/ProductTemplateCreator";
|
||||
|
||||
export class CharacterRelation implements TemplateElement{
|
||||
|
||||
@ -23,6 +24,7 @@ export class CharacterRelation implements TemplateElement{
|
||||
templateGamesystem.addChildGamesystem(gamesystem);
|
||||
templateGamesystem.addChildGamesystem(gamesystem);
|
||||
this.characterRelationGamesystems.push(templateGamesystem);
|
||||
templateGamesystem.addTemplateElement(this);
|
||||
} else {
|
||||
console.log("Test")
|
||||
}
|
||||
|
@ -27,6 +27,8 @@ export class TemplateProductSystemGenerator extends ProductSystemGenerator {
|
||||
const productTemplateSystem = this.productGamesystem as ProductTemplateSystem
|
||||
productTemplateSystem.transitionMap.set(this.templateElement, generationResult.transitions)
|
||||
productTemplateSystem.stateMap.set(this.templateElement, generationResult.states)
|
||||
|
||||
console.log("Test")
|
||||
}
|
||||
|
||||
protected getTransitionConditions(transition: Transition<any>, leftSystem: boolean) {
|
||||
@ -41,7 +43,7 @@ export class TemplateProductSystemGenerator extends ProductSystemGenerator {
|
||||
const templateElement = this.determineTemplateElement(leftSystem)!;
|
||||
|
||||
if(transition instanceof SimpleTemplateTransition && transition.actionMap.has(templateElement)) {
|
||||
return transition.actionMap.get(this.templateElement)!
|
||||
return transition.actionMap.get(templateElement)!
|
||||
} else {
|
||||
return transition.scriptAccountActions;
|
||||
}
|
||||
@ -51,7 +53,7 @@ export class TemplateProductSystemGenerator extends ProductSystemGenerator {
|
||||
protected getStateConditions(state: State<any>, leftSystem: boolean): ScriptAccountCondition[] {
|
||||
const templateElement = this.determineTemplateElement(leftSystem)!
|
||||
if(state instanceof SimpleTemplateState && state.conditionMap.has(templateElement)) {
|
||||
return state.conditionMap.get(this.templateElement)!
|
||||
return state.conditionMap.get(templateElement)!
|
||||
} else {
|
||||
return state.conditions
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user