Remove generated Duplicate Transitions
All checks were successful
E2E Testing / test (push) Successful in 1m33s
All checks were successful
E2E Testing / test (push) Successful in 1m33s
This commit is contained in:
parent
7acf334db9
commit
ec69b9f436
@ -34,7 +34,11 @@ export class ProductGamesystemGenerator extends AbstractProductGamesystemGenerat
|
||||
transition.scriptAccountActions = this.generateCombinedActions(leftTransition.scriptAccountActions, rightTransition.scriptAccountActions);
|
||||
transition.scriptAccountConditions = this.generateCombinedConditions(leftTransition.scriptAccountConditions, rightTransition.scriptAccountConditions);
|
||||
|
||||
if(generatedTransitions.find(generatedTransition => generatedTransition.startingState.equals(startingState) && generatedTransition.endingState.equals(endingState)) == undefined) {
|
||||
generatedTransitions.push(transition)
|
||||
} else {
|
||||
console.log(transition)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,11 @@ export class ProductTemplateGamesystemGenerator<TemplateReference> extends Abstr
|
||||
|
||||
transition.scriptAccountConditions = this.generateCombinedConditions(leftConditions, rightConditions);
|
||||
|
||||
if(generatedTransitions.find(generatedTransition => generatedTransition.startingState.equals(startingState) && generatedTransition.endingState.equals(endingState)) == undefined) {
|
||||
generatedTransitions.push(transition)
|
||||
} else {
|
||||
console.log(transition)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ import {ProductTransition} from "../transitions/ProductTransition";
|
||||
import {State} from "./State";
|
||||
import {SimpleState} from "./SimpleState";
|
||||
import {Transition} from "../transitions/Transition";
|
||||
import {SimpleTemplateState} from "./SimpleTemplateState";
|
||||
|
||||
export class ProductState extends State<ProductTransition> {
|
||||
innerStates: State<any>[] = [];
|
||||
@ -29,6 +30,10 @@ export class ProductState extends State<ProductTransition> {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(state instanceof SimpleTemplateState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for(let i=0; i<this.innerStates.length; i++) {
|
||||
if(!this.innerStates[i].equals((state as ProductState).innerStates[i])) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user