Assign ScriptAccountActions to expanded ineraction
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
fe63b30115
commit
bc0617eb85
@ -123,13 +123,16 @@
|
|||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
<mat-tab-group>
|
<mat-tab-group>
|
||||||
<mat-tab label="ScriptAccount Actions">
|
<mat-tab label="ScriptAccount Actions">
|
||||||
<app-scriptaccount-action-editor [scriptAccounts]="gameModel!.scriptAccounts" [actions]="element.scriptAccountActions"
|
<app-scriptaccount-action-editor [scriptAccounts]="gameModel!.scriptAccounts" [actions]="getInterActionAsSolidInteraction(element)!.scriptAccountActions"
|
||||||
(onAddAction)="onAddAction(element, $event)" (onRemoveAction)="onRemoveAction(element, $event)"
|
(onAddAction)="onAddAction(element, $event)" (onRemoveAction)="onRemoveAction(element, $event)"
|
||||||
[enableEditing]="true"
|
[enableEditing]="true"
|
||||||
></app-scriptaccount-action-editor>
|
></app-scriptaccount-action-editor>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="Inventory Actions">
|
<mat-tab label="Inventory Itemgroup Actions">
|
||||||
<p>Inventory Actions</p>
|
|
||||||
|
</mat-tab>
|
||||||
|
<mat-tab label="Inventory Item Actions">
|
||||||
|
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="Gamesystem Actions">
|
<mat-tab label="Gamesystem Actions">
|
||||||
<p>Gamesystem Actions</p>
|
<p>Gamesystem Actions</p>
|
||||||
|
@ -47,6 +47,13 @@ export class CharacterInteractionEditorComponent implements OnInit{
|
|||||||
return interaction instanceof InteractionSequences
|
return interaction instanceof InteractionSequences
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getInterActionAsSolidInteraction(interaction: AbstractInteraction) {
|
||||||
|
if(interaction instanceof Interaction) {
|
||||||
|
return interaction as Interaction;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
addInteraction() {
|
addInteraction() {
|
||||||
const interaction = new Interaction(this.character!, undefined, "")
|
const interaction = new Interaction(this.character!, undefined, "")
|
||||||
this.editedElement = interaction;
|
this.editedElement = interaction;
|
||||||
|
@ -2,6 +2,9 @@ import {Character} from "../characters/Character";
|
|||||||
import {Condition} from "./condition/Condition";
|
import {Condition} from "./condition/Condition";
|
||||||
import {Action} from "./actions/Action";
|
import {Action} from "./actions/Action";
|
||||||
import {AbstractInteraction} from "./AbstractInteraction";
|
import {AbstractInteraction} from "./AbstractInteraction";
|
||||||
|
import {ScriptAccountCondition} from "../gamesystems/conditions/ScriptAccountCondition";
|
||||||
|
import {ScriptAccountAction} from "../gamesystems/actions/ScriptAccountAction";
|
||||||
|
import {InventoryCondition} from "./condition/InventoryCondition";
|
||||||
|
|
||||||
export class Interaction extends AbstractInteraction{
|
export class Interaction extends AbstractInteraction{
|
||||||
|
|
||||||
@ -34,6 +37,10 @@ export class Interaction extends AbstractInteraction{
|
|||||||
return validCharacters && validLabel;
|
return validCharacters && validLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get scriptAccountActions() : ScriptAccountAction[]{
|
||||||
|
return this.actions.filter(condition => condition instanceof ScriptAccountAction).map(condition => condition as ScriptAccountAction)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
addAction(action: Action) {
|
addAction(action: Action) {
|
||||||
this.actions.push(action);
|
this.actions.push(action);
|
||||||
|
Loading…
Reference in New Issue
Block a user