Compare commits
No commits in common. "cb2e706ac765145e7033ac15044809ba79e87d4d" and "968e357845c7b62f9c71e1259b8372d448fdf523" have entirely different histories.
cb2e706ac7
...
968e357845
@ -1,3 +1,3 @@
|
|||||||
<app-simple-gamesystem-editor *ngIf="isSimpleGamesystem()" [templateElement]="templateElement" [simpleGamesystem]="convertGamesystemToSimpleGamesystem()" [scriptAccunts]="scriptAccounts"></app-simple-gamesystem-editor>
|
<app-simple-gamesystem-editor *ngIf="isSimpleGamesystem()" [templateElement]="templateElement" [simpleGamesystem]="convertGamesystemToSimpleGamesystem()" [scriptAccunts]="scriptAccounts"></app-simple-gamesystem-editor>
|
||||||
<app-product-gamesystem-editor *ngIf="!isSimpleGamesystem()" [templateElement]="templateElement" [gamesystem]="convertGamesystemToProductGamesystem()"
|
<app-product-gamesystem-editor *ngIf="!isSimpleGamesystem()" [gamesystem]="convertGamesystemToProductGamesystem()"
|
||||||
(onOpenGamesystemEditor)="onOpenGamesystemEditor($event)"></app-product-gamesystem-editor>
|
(onOpenGamesystemEditor)="onOpenGamesystemEditor($event)"></app-product-gamesystem-editor>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<app-product-state-editor [templateElement]="templateElement" [gamesystem]="gamesystem" (onOpenGamesystemEditor)="onOpenGamesystemEditor($event)"></app-product-state-editor>
|
<app-product-state-editor [gamesystem]="gamesystem" (onOpenGamesystemEditor)="onOpenGamesystemEditor($event)"></app-product-state-editor>
|
||||||
<div id="productStateEditor">
|
<div id="productStateEditor">
|
||||||
<app-product-transition-editor [templateElement]="templateElement" [gamesystem]="gamesystem" (onOpenGamesystem)="onOpenGamesystemEditor($event)"></app-product-transition-editor>
|
<app-product-transition-editor [gamesystem]="gamesystem" (onOpenGamesystem)="onOpenGamesystemEditor($event)"></app-product-transition-editor>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,7 +4,6 @@ import {
|
|||||||
} from "../transition-editor/product-transition-editor/product-transition-editor.component";
|
} from "../transition-editor/product-transition-editor/product-transition-editor.component";
|
||||||
import {ProductGamesystem} from "../../../project/game-model/gamesystems/ProductGamesystem";
|
import {ProductGamesystem} from "../../../project/game-model/gamesystems/ProductGamesystem";
|
||||||
import {SimpleGamesystem} from "../../../project/game-model/gamesystems/SimpleGamesystem";
|
import {SimpleGamesystem} from "../../../project/game-model/gamesystems/SimpleGamesystem";
|
||||||
import {TemplateElement} from "../../../project/game-model/templates/TemplateElement";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -16,7 +15,6 @@ import {TemplateElement} from "../../../project/game-model/templates/TemplateEle
|
|||||||
export class ProductGamesystemEditorComponent {
|
export class ProductGamesystemEditorComponent {
|
||||||
|
|
||||||
@Input() gamesystem: ProductGamesystem | undefined
|
@Input() gamesystem: ProductGamesystem | undefined
|
||||||
@Input() templateElement: TemplateElement | undefined
|
|
||||||
@Output("onOpenGamesystemEditor") openGamesystemEditorEmitter = new EventEmitter<SimpleGamesystem>();
|
@Output("onOpenGamesystemEditor") openGamesystemEditorEmitter = new EventEmitter<SimpleGamesystem>();
|
||||||
|
|
||||||
onOpenGamesystemEditor(gamesystem: SimpleGamesystem) {
|
onOpenGamesystemEditor(gamesystem: SimpleGamesystem) {
|
||||||
|
@ -8,8 +8,6 @@ import {ProductGamesystem} from "../../../../project/game-model/gamesystems/Prod
|
|||||||
import {SimpleGamesystem} from "../../../../project/game-model/gamesystems/SimpleGamesystem";
|
import {SimpleGamesystem} from "../../../../project/game-model/gamesystems/SimpleGamesystem";
|
||||||
import {ProductState} from "../../../../project/game-model/gamesystems/states/ProductState";
|
import {ProductState} from "../../../../project/game-model/gamesystems/states/ProductState";
|
||||||
import {State} from "../../../../project/game-model/gamesystems/states/State";
|
import {State} from "../../../../project/game-model/gamesystems/states/State";
|
||||||
import {TemplateElement} from "../../../../project/game-model/templates/TemplateElement";
|
|
||||||
import {ProductTemplateSystem} from "../../../../project/game-model/templates/productGamesystem/ProductTemplateSystem";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-product-state-editor',
|
selector: 'app-product-state-editor',
|
||||||
@ -26,7 +24,6 @@ import {ProductTemplateSystem} from "../../../../project/game-model/templates/pr
|
|||||||
export class ProductStateEditorComponent implements OnInit{
|
export class ProductStateEditorComponent implements OnInit{
|
||||||
|
|
||||||
@Input() gamesystem: ProductGamesystem | undefined
|
@Input() gamesystem: ProductGamesystem | undefined
|
||||||
@Input() templateElement: TemplateElement | undefined
|
|
||||||
@Output('onOpenGamesystemEditor') openGamesystemEditorEmitter = new EventEmitter<SimpleGamesystem>();
|
@Output('onOpenGamesystemEditor') openGamesystemEditorEmitter = new EventEmitter<SimpleGamesystem>();
|
||||||
displayedColumns: string[] = [];
|
displayedColumns: string[] = [];
|
||||||
expandedColumns: string[] = []
|
expandedColumns: string[] = []
|
||||||
@ -39,13 +36,7 @@ export class ProductStateEditorComponent implements OnInit{
|
|||||||
this.generateColumnNamesRecursively(this.gamesystem!, "");
|
this.generateColumnNamesRecursively(this.gamesystem!, "");
|
||||||
this.displayedColumns.push('Initial');
|
this.displayedColumns.push('Initial');
|
||||||
this.expandedColumns = [...this.displayedColumns, 'expand'];
|
this.expandedColumns = [...this.displayedColumns, 'expand'];
|
||||||
|
|
||||||
if(this.templateElement == undefined) {
|
|
||||||
this.datasource.data = this.gamesystem!.states;
|
this.datasource.data = this.gamesystem!.states;
|
||||||
} else if(this.gamesystem instanceof ProductTemplateSystem) {
|
|
||||||
this.datasource.data = this.gamesystem!.stateMap.get(this.templateElement)!
|
|
||||||
}
|
|
||||||
|
|
||||||
this.datasource.filterPredicate = (data: ProductState, filter: string) => {
|
this.datasource.filterPredicate = (data: ProductState, filter: string) => {
|
||||||
const leaf_states = LeafGamesystemCalculator.calcLeafStates(data);
|
const leaf_states = LeafGamesystemCalculator.calcLeafStates(data);
|
||||||
return leaf_states.some((state) => state.stateLabel.toLowerCase().includes(filter))
|
return leaf_states.some((state) => state.stateLabel.toLowerCase().includes(filter))
|
||||||
|
@ -8,8 +8,6 @@ import {ProductGamesystem} from "../../../../project/game-model/gamesystems/Prod
|
|||||||
import {SimpleGamesystem} from "../../../../project/game-model/gamesystems/SimpleGamesystem";
|
import {SimpleGamesystem} from "../../../../project/game-model/gamesystems/SimpleGamesystem";
|
||||||
import {ProductTransition} from "../../../../project/game-model/gamesystems/transitions/ProductTransition";
|
import {ProductTransition} from "../../../../project/game-model/gamesystems/transitions/ProductTransition";
|
||||||
import {ProductState} from "../../../../project/game-model/gamesystems/states/ProductState";
|
import {ProductState} from "../../../../project/game-model/gamesystems/states/ProductState";
|
||||||
import {TemplateElement} from "../../../../project/game-model/templates/TemplateElement";
|
|
||||||
import {ProductTemplateSystem} from "../../../../project/game-model/templates/productGamesystem/ProductTemplateSystem";
|
|
||||||
class DisplayedColumnName {
|
class DisplayedColumnName {
|
||||||
displayedName: string
|
displayedName: string
|
||||||
internalName: string
|
internalName: string
|
||||||
@ -36,7 +34,6 @@ export class ProductTransitionEditorComponent implements OnInit{
|
|||||||
|
|
||||||
@Input() gamesystem: ProductGamesystem | undefined
|
@Input() gamesystem: ProductGamesystem | undefined
|
||||||
@Output() onOpenGamesystem = new EventEmitter<SimpleGamesystem>();
|
@Output() onOpenGamesystem = new EventEmitter<SimpleGamesystem>();
|
||||||
@Input() templateElement: TemplateElement | undefined
|
|
||||||
|
|
||||||
dataSource = new MatTableDataSource<ProductTransition>();
|
dataSource = new MatTableDataSource<ProductTransition>();
|
||||||
displayedColumns: DisplayedColumnName[] = [];
|
displayedColumns: DisplayedColumnName[] = [];
|
||||||
@ -55,12 +52,7 @@ export class ProductTransitionEditorComponent implements OnInit{
|
|||||||
this.columns = this.displayedColumns.map(column => column.internalName)
|
this.columns = this.displayedColumns.map(column => column.internalName)
|
||||||
this.columnsToDisplayWithExpand = [...this.columns, 'expand']
|
this.columnsToDisplayWithExpand = [...this.columns, 'expand']
|
||||||
|
|
||||||
if(this.templateElement == undefined) {
|
|
||||||
this.dataSource.data = this.gamesystem.transitions;
|
this.dataSource.data = this.gamesystem.transitions;
|
||||||
} else if(this.gamesystem instanceof ProductTemplateSystem){
|
|
||||||
this.dataSource.data = this.gamesystem!.transitionMap.get(this.templateElement)!
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dataSource.filterPredicate = (data: ProductTransition, filter: string) => {
|
this.dataSource.filterPredicate = (data: ProductTransition, filter: string) => {
|
||||||
const leaf_starting_states = LeafGamesystemCalculator.calcLeafStates(data.startingState);
|
const leaf_starting_states = LeafGamesystemCalculator.calcLeafStates(data.startingState);
|
||||||
const leaf_ending_states = LeafGamesystemCalculator.calcLeafStates(data.endingState);
|
const leaf_ending_states = LeafGamesystemCalculator.calcLeafStates(data.endingState);
|
||||||
|
@ -3,48 +3,9 @@
|
|||||||
"componentDescription": "",
|
"componentDescription": "",
|
||||||
"characterSpecificTemplateSystems": [
|
"characterSpecificTemplateSystems": [
|
||||||
{
|
{
|
||||||
"componentName": "TemplateGamesystem",
|
"componentName": "Letters",
|
||||||
"states": [
|
"states": [],
|
||||||
{
|
"transitions": []
|
||||||
"stateLabel": "A",
|
|
||||||
"conditionMap": [
|
|
||||||
{
|
|
||||||
"scriptAccount": "Luftfeuchtigkeit",
|
|
||||||
"minValue": 0,
|
|
||||||
"maxValue": "10"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"stateLabel": "B",
|
|
||||||
"conditionMap": [
|
|
||||||
{
|
|
||||||
"scriptAccount": "New ScriptAccount",
|
|
||||||
"minValue": 0,
|
|
||||||
"maxValue": 100
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transitions": [
|
|
||||||
{
|
|
||||||
"startingState": "A",
|
|
||||||
"endingState": "B",
|
|
||||||
"conditionMap": [
|
|
||||||
{
|
|
||||||
"scriptAccount": "Temperature",
|
|
||||||
"minValue": 0,
|
|
||||||
"maxValue": 10
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"actionMap": [
|
|
||||||
{
|
|
||||||
"changingValue": 10,
|
|
||||||
"scriptAccount": "Luftfeuchtigkeit"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -37,24 +37,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"componentName": "Letters",
|
"componentName": "Letters",
|
||||||
"states": [
|
"states": [],
|
||||||
{
|
"transitions": []
|
||||||
"stateLabel": "A",
|
|
||||||
"conditionMap": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"stateLabel": "B",
|
|
||||||
"conditionMap": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transitions": [
|
|
||||||
{
|
|
||||||
"startingState": "A",
|
|
||||||
"endingState": "B",
|
|
||||||
"conditionMap": [],
|
|
||||||
"actionMap": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,27 +1,7 @@
|
|||||||
{
|
{
|
||||||
"componentName": "Letters",
|
"componentName": "Letters",
|
||||||
"componentDescription": "",
|
"componentDescription": "",
|
||||||
"states": [
|
"states": [],
|
||||||
{
|
"transitions": [],
|
||||||
"initial": false,
|
|
||||||
"conditions": [],
|
|
||||||
"stateLabel": "A",
|
|
||||||
"stateDescription": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"initial": false,
|
|
||||||
"conditions": [],
|
|
||||||
"stateLabel": "B",
|
|
||||||
"stateDescription": ""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transitions": [
|
|
||||||
{
|
|
||||||
"scriptAccountActions": [],
|
|
||||||
"scriptAccountConditions": [],
|
|
||||||
"startingState": "A",
|
|
||||||
"endingState": "B"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"templateType": 0
|
"templateType": 0
|
||||||
}
|
}
|
@ -1,26 +1,6 @@
|
|||||||
{
|
{
|
||||||
"componentName": "Numbers",
|
"componentName": "Numbers",
|
||||||
"componentDescription": "",
|
"componentDescription": "",
|
||||||
"states": [
|
"states": [],
|
||||||
{
|
"transitions": []
|
||||||
"initial": false,
|
|
||||||
"conditions": [],
|
|
||||||
"stateLabel": "1",
|
|
||||||
"stateDescription": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"initial": false,
|
|
||||||
"conditions": [],
|
|
||||||
"stateLabel": "2",
|
|
||||||
"stateDescription": ""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transitions": [
|
|
||||||
{
|
|
||||||
"scriptAccountActions": [],
|
|
||||||
"scriptAccountConditions": [],
|
|
||||||
"startingState": "1",
|
|
||||||
"endingState": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user