diff --git a/src/app/editor/character-editor/character-editor.component.html b/src/app/editor/character-editor/character-editor.component.html
index 4844143..c9e990a 100644
--- a/src/app/editor/character-editor/character-editor.component.html
+++ b/src/app/editor/character-editor/character-editor.component.html
@@ -3,6 +3,6 @@
{{templateGamesystem.referenceGamesystem.componentName}}
-
+
diff --git a/src/app/editor/character-editor/character-editor.component.ts b/src/app/editor/character-editor/character-editor.component.ts
index 8d0a829..4d5e3a0 100644
--- a/src/app/editor/character-editor/character-editor.component.ts
+++ b/src/app/editor/character-editor/character-editor.component.ts
@@ -4,6 +4,7 @@ import {Gamesystem} from "../../project/game-model/gamesystems/Gamesystem";
import {TemplateGamesystem} from "../../project/game-model/gamesystems/TemplateGamesystem";
import {ProductGamesystem} from "../../project/game-model/gamesystems/ProductGamesystem";
import {SimpleGamesystem} from "../../project/game-model/gamesystems/SimpleGamesystem";
+import {ScriptAccount} from "../../project/game-model/scriptAccounts/ScriptAccount";
@Component({
selector: 'app-character-editor',
@@ -14,6 +15,7 @@ export class CharacterEditorComponent implements OnInit{
@Input() character: Character | undefined
@Input() referenceGamesystems: Gamesystem[] = []
+ @Input() scriptAccounts: ScriptAccount[] = []
templateSimpleGamesystems: TemplateGamesystem[] = []
templateProductGamesystems: ProductGamesystem[] = []
diff --git a/src/app/editor/editor.component.html b/src/app/editor/editor.component.html
index 3009a7f..c8ad774 100644
--- a/src/app/editor/editor.component.html
+++ b/src/app/editor/editor.component.html
@@ -16,7 +16,8 @@
[scriptAccounts]="gameModel!.scriptAccounts">
+ [character]="convertModelComponentToCharacter(modelComponent)"
+ [scriptAccounts]="gameModel!.scriptAccounts">
diff --git a/src/app/editor/gamesystem-editor/template-gamesystem-editor/template-gamesystem-editor.component.html b/src/app/editor/gamesystem-editor/template-gamesystem-editor/template-gamesystem-editor.component.html
index 4471bdf..d201e9c 100644
--- a/src/app/editor/gamesystem-editor/template-gamesystem-editor/template-gamesystem-editor.component.html
+++ b/src/app/editor/gamesystem-editor/template-gamesystem-editor/template-gamesystem-editor.component.html
@@ -1 +1 @@
-
+
diff --git a/src/app/editor/gamesystem-editor/template-gamesystem-editor/template-state-editor/template-state-editor.component.ts b/src/app/editor/gamesystem-editor/template-gamesystem-editor/template-state-editor/template-state-editor.component.ts
index dfab3fc..e0cb89c 100644
--- a/src/app/editor/gamesystem-editor/template-gamesystem-editor/template-state-editor/template-state-editor.component.ts
+++ b/src/app/editor/gamesystem-editor/template-gamesystem-editor/template-state-editor/template-state-editor.component.ts
@@ -42,10 +42,6 @@ export class TemplateStateEditorComponent {
this.dataSource.filter = filterValue.trim().toLowerCase();
}
- onCreateCondition(state: SimpleState, $event: ScriptAccountCondition) {
-
- }
-
onEditState(state: SimpleState) {
if(this.editedElement == null) {
this.editedElement = state
@@ -59,7 +55,12 @@ export class TemplateStateEditorComponent {
this.dataSource.data = this.templateGamesystem!.templateStates
}
- deleteCondition(state: SimpleState, $event: ScriptAccountCondition) {
+ onCreateCondition(state: SimpleState, condition: ScriptAccountCondition) {
+ state.addScriptAccountCondition(condition);
+ }
+
+ deleteCondition(state: SimpleState, condition: ScriptAccountCondition) {
+ state.removeScriptAccountCondition(condition.scriptAccount);
}
}