Include Condition and Action Overview in InteractionEditor
All checks were successful
E2E Testing / test (push) Successful in 1m17s
All checks were successful
E2E Testing / test (push) Successful in 1m17s
This commit is contained in:
parent
e45a3a77ea
commit
1c60504565
@ -94,7 +94,49 @@
|
|||||||
<td mat-cell *matCellDef="let element" [attr.colspan]="columnsToDisplayWithExpand.length">
|
<td mat-cell *matCellDef="let element" [attr.colspan]="columnsToDisplayWithExpand.length">
|
||||||
<div class="example-element-detail"
|
<div class="example-element-detail"
|
||||||
[@detailExpand]="element == expandedElement ? 'expanded' : 'collapsed'">
|
[@detailExpand]="element == expandedElement ? 'expanded' : 'collapsed'">
|
||||||
<p>Expanded Detail</p>
|
<mat-accordion>
|
||||||
|
<mat-expansion-panel>
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title>Conditions</mat-panel-title>
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<mat-tab-group>
|
||||||
|
<mat-tab label="ScriptAccount Conditions">
|
||||||
|
<app-scriptaccount-condition-editor [scriptAccounts]="gameModel!.scriptAccounts" [conditions]="element.scriptAccountConditions"></app-scriptaccount-condition-editor>
|
||||||
|
</mat-tab>
|
||||||
|
<mat-tab label="Inventory Conditions">
|
||||||
|
<p>Inventory Conditions</p>
|
||||||
|
</mat-tab>
|
||||||
|
<mat-tab label="Gamesystem Conditions">
|
||||||
|
<p>Gamesystem Conditions</p>
|
||||||
|
</mat-tab>
|
||||||
|
</mat-tab-group>
|
||||||
|
</mat-expansion-panel>
|
||||||
|
|
||||||
|
<mat-expansion-panel>
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title>Actions</mat-panel-title>
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<mat-tab-group>
|
||||||
|
<mat-tab label="ScriptAccount Actions">
|
||||||
|
<app-scriptaccount-action-editor [scriptAccounts]="gameModel!.scriptAccounts"></app-scriptaccount-action-editor>
|
||||||
|
</mat-tab>
|
||||||
|
<mat-tab label="Inventory Actions">
|
||||||
|
<p>Inventory Actions</p>
|
||||||
|
</mat-tab>
|
||||||
|
<mat-tab label="Gamesystem Actions">
|
||||||
|
<p>Gamesystem Actions</p>
|
||||||
|
</mat-tab>
|
||||||
|
</mat-tab-group>
|
||||||
|
</mat-expansion-panel>
|
||||||
|
|
||||||
|
|
||||||
|
<mat-expansion-panel *ngIf="isInteractionSequence(element)" (closed)="false">
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title>Sequence Elements</mat-panel-title>
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
|
||||||
|
</mat-expansion-panel>
|
||||||
|
</mat-accordion>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -20,7 +20,7 @@ tr.example-element-row:not(.example-expanded-row):active {
|
|||||||
|
|
||||||
.example-element-detail {
|
.example-element-detail {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.example-element-diagram {
|
.example-element-diagram {
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
import {Character} from "../characters/Character";
|
import {Character} from "../characters/Character";
|
||||||
import {Condition} from "./condition/Condition";
|
import {Condition} from "./condition/Condition";
|
||||||
|
import {ScriptAccountCondition} from "../gamesystems/conditions/ScriptAccountCondition";
|
||||||
|
import {InventoryCondition} from "./condition/InventoryCondition";
|
||||||
|
import {GamesystemCondition} from "./condition/GamesystemCondition";
|
||||||
|
|
||||||
export abstract class AbstractInteraction {
|
export abstract class AbstractInteraction {
|
||||||
sourceCharacter: Character
|
sourceCharacter: Character
|
||||||
@ -18,4 +21,16 @@ export abstract class AbstractInteraction {
|
|||||||
|
|
||||||
abstract equals(other: AbstractInteraction): boolean
|
abstract equals(other: AbstractInteraction): boolean
|
||||||
abstract validate(requieredCharacter: Character): boolean
|
abstract validate(requieredCharacter: Character): boolean
|
||||||
|
|
||||||
|
get scriptAccountConditions() {
|
||||||
|
return this.conditions.filter(condition => condition instanceof ScriptAccountCondition);
|
||||||
|
}
|
||||||
|
|
||||||
|
get inventoryConditions() {
|
||||||
|
return this.conditions.filter(condition => condition instanceof InventoryCondition)
|
||||||
|
}
|
||||||
|
|
||||||
|
get gamesystemConditions() {
|
||||||
|
return this.conditions.filter(condition => condition instanceof GamesystemCondition)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
import {Gamesystem} from "../../gamesystems/Gamesystem";
|
import {Gamesystem} from "../../gamesystems/Gamesystem";
|
||||||
import {State} from "../../gamesystems/states/State";
|
import {State} from "../../gamesystems/states/State";
|
||||||
|
import {Condition} from "./Condition";
|
||||||
|
import {CharacterDependency} from "../CharacterDependency";
|
||||||
|
|
||||||
export class GamesystemCondition {
|
export class GamesystemCondition extends Condition {
|
||||||
targetGamesystem: Gamesystem<any, any>
|
targetGamesystem: Gamesystem<any, any>
|
||||||
requieredState: State<any>;
|
requieredState: State<any>;
|
||||||
|
|
||||||
|
|
||||||
constructor(targetGamesystem: Gamesystem<any, any>, requieredState: State<any>) {
|
constructor(characterDependency: CharacterDependency, targetGamesystem: Gamesystem<any, any>, requieredState: State<any>) {
|
||||||
|
super(characterDependency);
|
||||||
this.targetGamesystem = targetGamesystem;
|
this.targetGamesystem = targetGamesystem;
|
||||||
this.requieredState = requieredState;
|
this.requieredState = requieredState;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user