Jelajahi Sumber

outsourced interfaces and updated services and imports

Warafear 10 bulan lalu
induk
melakukan
d3109862b5
60 mengubah file dengan 241 tambahan dan 401 penghapusan
  1. 5 5
      src/app/character/character-creator/character-creator.component.html
  2. 2 2
      src/app/character/character-creator/character-creator.component.ts
  3. 4 4
      src/app/character/character-picker/character-card/character-card.component.ts
  4. 1 2
      src/app/journal/journal-character/class/class.component.ts
  5. 1 2
      src/app/journal/journal-character/combined/combined.component.ts
  6. 5 5
      src/app/journal/journal-character/general/general.component.ts
  7. 1 2
      src/app/journal/journal-character/species/species.component.ts
  8. 1 2
      src/app/journal/journal-character/subclass/subclass.component.ts
  9. 1 2
      src/app/journal/journal-inventory/journal-inventory.component.ts
  10. 1 2
      src/app/journal/journal-inventory/simple-item-details/simple-item-details.component.ts
  11. 1 1
      src/app/journal/journal-spellbook/custom-spells-modal/custom-spells-modal.component.ts
  12. 1 1
      src/app/journal/journal-spellbook/journal-spellbook.component.html
  13. 3 3
      src/app/journal/journal-spellbook/journal-spellbook.component.ts
  14. 1 1
      src/app/journal/journal-spellcards/add-card/add-card.component.ts
  15. 1 1
      src/app/journal/journal-spellcards/journal-spellcards.component.ts
  16. 2 2
      src/app/journal/journal-spellcards/spellcard/spellcard.component.ts
  17. 1 1
      src/app/journal/journal-stats/ability-panel/ability-table/ability-details/ability-details.component.ts
  18. 1 1
      src/app/journal/journal-stats/ability-panel/ability-table/ability-modal/ability-modal.component.ts
  19. 1 1
      src/app/journal/journal-stats/ability-panel/ability-table/ability-table.component.ts
  20. 1 1
      src/app/journal/journal-stats/ability-panel/trait-table/trait-details/trait-details.component.ts
  21. 1 1
      src/app/journal/journal-stats/ability-panel/trait-table/trait-modal/trait-modal.component.ts
  22. 1 1
      src/app/journal/journal-stats/ability-panel/trait-table/trait-table.component.ts
  23. 3 3
      src/app/journal/journal-stats/attribute-panel/attribute-field/attribute-details/attribute-details.component.html
  24. 3 3
      src/app/journal/journal-stats/attribute-panel/attribute-field/attribute-details/attribute-details.component.ts
  25. 1 1
      src/app/journal/journal-stats/attribute-panel/attribute-field/attribute-field.component.ts
  26. 1 1
      src/app/journal/journal-stats/save-throw-panel/save-throw-field/save-throw-field.component.ts
  27. 1 2
      src/app/journal/journal-stats/skill-panel/skill-field/skill-field.component.ts
  28. 1 1
      src/app/journal/journal-stats/weapons-container/spell-table/favorite-spells-modal/favorite-spells-modal.component.ts
  29. 1 1
      src/app/journal/journal-stats/weapons-container/spell-table/spell-table.component.ts
  30. 1 1
      src/app/journal/journal-stats/weapons-container/weapon-table/weapon-details/weapon-details.component.ts
  31. 1 2
      src/app/journal/journal-stats/weapons-container/weapon-table/weapon-modal/weapon-modal.component.ts
  32. 1 2
      src/app/journal/journal-stats/weapons-container/weapon-table/weapon-table.component.ts
  33. 3 5
      src/app/journal/spell-modal/spell-modal.component.ts
  34. 1 1
      src/app/shared-components/full-spellcard/full-spellcard.component.ts
  35. 0 8
      src/enums/area-types.ts
  36. 0 16
      src/enums/damage-types.ts
  37. 0 10
      src/enums/schools.ts
  38. 0 8
      src/interfaces/ability.ts
  39. 0 6
      src/interfaces/attribute.ts
  40. 0 74
      src/interfaces/character.ts
  41. 0 6
      src/interfaces/class-data.ts
  42. 0 7
      src/interfaces/consumable.ts
  43. 0 6
      src/interfaces/damage.ts
  44. 0 7
      src/interfaces/food.ts
  45. 0 5
      src/interfaces/heal.ts
  46. 167 0
      src/interfaces/interfaces.ts
  47. 0 7
      src/interfaces/misc.ts
  48. 0 7
      src/interfaces/simple-item.ts
  49. 0 6
      src/interfaces/skill.ts
  50. 0 107
      src/interfaces/spell.ts
  51. 0 5
      src/interfaces/subclass-data.ts
  52. 0 6
      src/interfaces/traits.ts
  53. 0 29
      src/interfaces/weapon.ts
  54. 2 0
      src/pipes/duration/duration.pipe.ts
  55. 1 1
      src/services/class/class.service.ts
  56. 10 8
      src/services/data/data.service.ts
  57. 3 3
      src/services/list/list.service.spec.ts
  58. 1 1
      src/services/list/list.service.ts
  59. 1 1
      src/services/spells/spells.service.ts
  60. 1 1
      src/services/subclass/subclass.service.ts

+ 5 - 5
src/app/character/character-creator/character-creator.component.html

@@ -9,13 +9,13 @@
       <mat-label>{{ "creator.species" | translate }}</mat-label>
       <mat-select [(ngModel)]="characterSpecies" name="species">
         <mat-optgroup [label]="'Häufige Spezies'"></mat-optgroup>
-        @for (species of translator.commonRaces; track species) {
+        @for (species of list.commonRaces; track species) {
           <mat-option [value]="species">{{
             "species." + species | translate
           }}</mat-option>
         }
         <mat-optgroup [label]="'Andere Spezies'"></mat-optgroup>
-        @for (species of translator.otherRaces; track species) {
+        @for (species of list.otherRaces; track species) {
           <mat-option [value]="species">{{
             "species." + species | translate
           }}</mat-option>
@@ -25,7 +25,7 @@
     <mat-form-field appearance="outline">
       <mat-label>{{ "creator.class" | translate }}</mat-label>
       <mat-select [(ngModel)]="characterClass" name="class">
-        @for (characterClass of translator.classes; track characterClass) {
+        @for (characterClass of list.classes; track characterClass) {
           <mat-option [value]="characterClass">{{
             "classes." + characterClass | translate
           }}</mat-option>
@@ -35,7 +35,7 @@
     <mat-form-field appearance="outline">
       <mat-label>{{ "creator.background" | translate }}</mat-label>
       <mat-select [(ngModel)]="characterBackground" name="background">
-        @for (background of translator.backgrounds; track background) {
+        @for (background of list.backgrounds; track background) {
           <mat-option [value]="background">{{
             "backgrounds." + background | translate
           }}</mat-option>
@@ -45,7 +45,7 @@
     <mat-form-field appearance="outline">
       <mat-label>{{ "creator.gender" | translate }}</mat-label>
       <mat-select [(ngModel)]="characterGender" name="gender">
-        @for (gender of translator.genders; track gender) {
+        @for (gender of list.genders; track gender) {
           <mat-option [value]="gender">{{
             "genders." + gender | translate
           }}</mat-option>

+ 2 - 2
src/app/character/character-creator/character-creator.component.ts

@@ -1,7 +1,7 @@
 import { Component } from '@angular/core';
 import { DataService } from 'src/services/data/data.service';
 import { Router } from '@angular/router';
-import { TranslatorService } from 'src/services/translator/translator.service';
+import { ListService } from 'src/services/list/list.service';
 import { TranslateService } from '@ngx-translate/core';
 
 interface characterData {
@@ -58,7 +58,7 @@ export class CharacterCreatorComponent {
   public constructor(
     public dataAccessor: DataService,
     private Router: Router,
-    public translator: TranslatorService,
+    public list: ListService,
     public translate: TranslateService,
   ) {}
 

+ 4 - 4
src/app/character/character-picker/character-card/character-card.component.ts

@@ -7,7 +7,7 @@ import {
   ElementRef,
 } from '@angular/core';
 import { DataService } from 'src/services/data/data.service';
-import { TranslatorService } from 'src/services/translator/translator.service';
+import { ListService } from 'src/services/list/list.service';
 
 @Component({
   selector: 'character-card',
@@ -27,12 +27,12 @@ export class CharacterCardComponent {
 
   constructor(
     private dataAccessor: DataService,
-    private translator: TranslatorService,
+    private list: ListService,
     private renderer: Renderer2,
     private el: ElementRef,
   ) {
-    this.races = this.translator.races;
-    this.classes = this.translator.classes;
+    this.races = this.list.races;
+    this.classes = this.list.classes;
   }
 
   ngOnInit() {

+ 1 - 2
src/app/journal/journal-character/class/class.component.ts

@@ -3,9 +3,8 @@ import { ClassService } from 'src/services/class/class.service';
 import { DataService } from 'src/services/data/data.service';
 import { ModalService } from 'src/services/modal/modal.service';
 import { AbilityModalComponent } from '../../journal-stats/ability-panel/ability-table/ability-modal/ability-modal.component';
-import { Ability } from 'src/interfaces/ability';
+import { Ability, Trait } from 'src/interfaces/interfaces';
 import { TraitModalComponent } from '../../journal-stats/ability-panel/trait-table/trait-modal/trait-modal.component';
-import { Trait } from 'src/interfaces/traits';
 
 @Component({
   selector: 'class',

+ 1 - 2
src/app/journal/journal-character/combined/combined.component.ts

@@ -1,8 +1,7 @@
 import { Component } from '@angular/core';
-import { Ability } from 'src/interfaces/ability';
+import { Ability, Trait } from 'src/interfaces/interfaces';
 import { DataService } from 'src/services/data/data.service';
 import { ModalService } from 'src/services/modal/modal.service';
-import { Trait } from 'src/interfaces/traits';
 import { AbilityModalComponent } from '../../journal-stats/ability-panel/ability-table/ability-modal/ability-modal.component';
 import { TraitModalComponent } from '../../journal-stats/ability-panel/trait-table/trait-modal/trait-modal.component';
 import { ClassService } from 'src/services/class/class.service';

+ 5 - 5
src/app/journal/journal-character/general/general.component.ts

@@ -1,6 +1,6 @@
 import { Component } from '@angular/core';
 import { DataService } from 'src/services/data/data.service';
-import { TranslatorService } from 'src/services/translator/translator.service';
+import { ListService } from 'src/services/list/list.service';
 
 @Component({
   selector: 'general',
@@ -16,15 +16,15 @@ export class GeneralComponent {
 
   public constructor(
     public dataAccessor: DataService,
-    private translator: TranslatorService,
+    private list: ListService,
   ) {}
 
   ngOnInit(): void {
     this.data = this.dataAccessor.characterData;
     this.image = this.dataAccessor.image.value;
-    this.races = this.translator.races;
-    this.classes = this.translator.classes;
-    this.genders = this.translator.genders;
+    this.races = this.list.races;
+    this.classes = this.list.classes;
+    this.genders = this.list.genders;
   }
 
   public updateData(): void {

+ 1 - 2
src/app/journal/journal-character/species/species.component.ts

@@ -1,9 +1,8 @@
 import { Component } from '@angular/core';
-import { Trait } from 'src/interfaces/traits';
+import { Trait, Ability } from 'src/interfaces/interfaces';
 import { DataService } from 'src/services/data/data.service';
 import { SpeciesService } from 'src/services/species/species.service';
 import { ModalService } from 'src/services/modal/modal.service';
-import { Ability } from 'src/interfaces/ability';
 import { AbilityModalComponent } from '../../journal-stats/ability-panel/ability-table/ability-modal/ability-modal.component';
 import { TraitModalComponent } from '../../journal-stats/ability-panel/trait-table/trait-modal/trait-modal.component';
 

+ 1 - 2
src/app/journal/journal-character/subclass/subclass.component.ts

@@ -2,8 +2,7 @@ import { Component } from '@angular/core';
 import { SubclassService } from 'src/services/subclass/subclass.service';
 import { DataService } from 'src/services/data/data.service';
 import { ModalService } from 'src/services/modal/modal.service';
-import { Ability } from 'src/interfaces/ability';
-import { Trait } from 'src/interfaces/traits';
+import { Ability, Trait } from 'src/interfaces/interfaces';
 import { AbilityModalComponent } from '../../journal-stats/ability-panel/ability-table/ability-modal/ability-modal.component';
 import { TraitModalComponent } from '../../journal-stats/ability-panel/trait-table/trait-modal/trait-modal.component';
 

+ 1 - 2
src/app/journal/journal-inventory/journal-inventory.component.ts

@@ -7,8 +7,7 @@ import {
 } from '@angular/cdk/drag-drop';
 import { DetailsService } from 'src/services/details/details.service';
 import { DataService } from 'src/services/data/data.service';
-import { SimpleItem } from 'src/interfaces/simple-item';
-import { Food } from 'src/interfaces/food';
+import { SimpleItem, Food } from 'src/interfaces/interfaces';
 import { SimpleItemDetailsComponent } from './simple-item-details/simple-item-details.component';
 import { ModalService } from 'src/services/modal/modal.service';
 import { SimpleItemModalComponent } from './simple-item-modal/simple-item-modal.component';

+ 1 - 2
src/app/journal/journal-inventory/simple-item-details/simple-item-details.component.ts

@@ -1,6 +1,5 @@
 import { Component, Input } from '@angular/core';
-import { Food } from 'src/interfaces/food';
-import { SimpleItem } from 'src/interfaces/simple-item';
+import { SimpleItem } from 'src/interfaces/interfaces';
 import { DetailsService } from 'src/services/details/details.service';
 
 @Component({

+ 1 - 1
src/app/journal/journal-spellbook/custom-spells-modal/custom-spells-modal.component.ts

@@ -1,5 +1,5 @@
 import { Component, Input } from '@angular/core';
-import { Spell } from 'src/interfaces/spell';
+import { Spell } from 'src/interfaces/interfaces';
 import { ModalService } from 'src/services/modal/modal.service';
 import { TranslateService } from '@ngx-translate/core';
 

+ 1 - 1
src/app/journal/journal-spellbook/journal-spellbook.component.html

@@ -17,7 +17,7 @@
 
     <divider></divider>
     <div class="class-picker t-075">
-      @for (className of translator.magicClasses; track className) {
+      @for (className of list.magicClasses; track className) {
         <div class="class">
           <div
             [id]="className"

+ 3 - 3
src/app/journal/journal-spellbook/journal-spellbook.component.ts

@@ -1,8 +1,8 @@
 import { Component, inject } from '@angular/core';
-import { TranslatorService } from 'src/services/translator/translator.service';
+import { ListService } from 'src/services/list/list.service';
 import { ModalService } from 'src/services/modal/modal.service';
 import { DataService } from 'src/services/data/data.service';
-import { Spell } from 'src/interfaces/spell';
+import { Spell } from 'src/interfaces/interfaces';
 import { CustomSpellsModalComponent } from './custom-spells-modal/custom-spells-modal.component';
 import { SpellsService } from 'src/services/spells/spells.service';
 import { FullSpellcardComponent } from 'src/app/shared-components/full-spellcard/full-spellcard.component';
@@ -29,7 +29,7 @@ export class JournalSpellbookComponent {
   public filteredSpells: Spell[] = [];
 
   // Services
-  public translator = inject(TranslatorService);
+  public list = inject(ListService);
   public modalAccessor = inject(ModalService);
   public dataAccessor = inject(DataService);
   private spellsService = inject(SpellsService);

+ 1 - 1
src/app/journal/journal-spellcards/add-card/add-card.component.ts

@@ -1,6 +1,6 @@
 import { Component, Input, Output, EventEmitter, inject } from '@angular/core';
 import { DataService } from 'src/services/data/data.service';
-import { Spell } from 'src/interfaces/spell';
+import { Spell } from 'src/interfaces/interfaces';
 import { SpellsService } from 'src/services/spells/spells.service';
 import { TranslateService } from '@ngx-translate/core';
 

+ 1 - 1
src/app/journal/journal-spellcards/journal-spellcards.component.ts

@@ -4,7 +4,7 @@ import {
   moveItemInArray,
   transferArrayItem,
 } from '@angular/cdk/drag-drop';
-import { Spell } from 'src/interfaces/spell';
+import { Spell } from 'src/interfaces/interfaces';
 import { DataService } from 'src/services/data/data.service';
 import { ModalService } from 'src/services/modal/modal.service';
 import { SpellsService } from 'src/services/spells/spells.service';

+ 2 - 2
src/app/journal/journal-spellcards/spellcard/spellcard.component.ts

@@ -1,5 +1,5 @@
-import { Component, Input, Output, EventEmitter } from '@angular/core';
-import { Spell } from 'src/interfaces/spell';
+import { Component, Input } from '@angular/core';
+import { Spell } from 'src/interfaces/interfaces';
 import { TranslateService } from '@ngx-translate/core';
 
 @Component({

+ 1 - 1
src/app/journal/journal-stats/ability-panel/ability-table/ability-details/ability-details.component.ts

@@ -1,6 +1,6 @@
 import { Component, Input } from '@angular/core';
 import { DetailsService } from 'src/services/details/details.service';
-import { Ability } from 'src/interfaces/ability';
+import { Ability } from 'src/interfaces/interfaces';
 
 @Component({
   selector: 'app-ability-details',

+ 1 - 1
src/app/journal/journal-stats/ability-panel/ability-table/ability-modal/ability-modal.component.ts

@@ -1,7 +1,7 @@
 import { Component, Input, OnInit, OnDestroy } from '@angular/core';
 import { Editor } from 'ngx-editor';
 import { ModalService } from 'src/services/modal/modal.service';
-import { Ability } from 'src/interfaces/ability';
+import { Ability } from 'src/interfaces/interfaces';
 
 @Component({
   selector: 'ability-modal',

+ 1 - 1
src/app/journal/journal-stats/ability-panel/ability-table/ability-table.component.ts

@@ -6,7 +6,7 @@ import {
   moveItemInArray,
 } from '@angular/cdk/drag-drop';
 import { DataService } from 'src/services/data/data.service';
-import { Ability } from 'src/interfaces/ability';
+import { Ability } from 'src/interfaces/interfaces';
 import { AbilityDetailsComponent } from './ability-details/ability-details.component';
 import { DetailsService } from 'src/services/details/details.service';
 import { ModalService } from 'src/services/modal/modal.service';

+ 1 - 1
src/app/journal/journal-stats/ability-panel/trait-table/trait-details/trait-details.component.ts

@@ -1,6 +1,6 @@
 import { Component, Input } from '@angular/core';
 import { DetailsService } from 'src/services/details/details.service';
-import { Trait } from 'src/interfaces/traits';
+import { Trait } from 'src/interfaces/interfaces';
 
 @Component({
   selector: 'trait-details',

+ 1 - 1
src/app/journal/journal-stats/ability-panel/trait-table/trait-modal/trait-modal.component.ts

@@ -1,6 +1,6 @@
 import { Component, Input, OnInit, OnDestroy } from '@angular/core';
 import { Editor } from 'ngx-editor';
-import { Trait } from 'src/interfaces/traits';
+import { Trait } from 'src/interfaces/interfaces';
 import { ModalService } from 'src/services/modal/modal.service';
 
 @Component({

+ 1 - 1
src/app/journal/journal-stats/ability-panel/trait-table/trait-table.component.ts

@@ -7,7 +7,7 @@ import {
 } from '@angular/cdk/drag-drop';
 import { DataService } from 'src/services/data/data.service';
 import { DetailsService } from 'src/services/details/details.service';
-import { Trait } from 'src/interfaces/traits';
+import { Trait } from 'src/interfaces/interfaces';
 import { TraitDetailsComponent } from './trait-details/trait-details.component';
 import { ModalService } from 'src/services/modal/modal.service';
 import { TraitModalComponent } from './trait-modal/trait-modal.component';

+ 3 - 3
src/app/journal/journal-stats/attribute-panel/attribute-field/attribute-details/attribute-details.component.html

@@ -99,7 +99,7 @@
           (selectionChange)="showButtons()"
           multiple
         >
-          @for (type of translator.damageTypes; track type) {
+          @for (type of list.damageTypes; track type) {
             <mat-option [value]="type">
               {{ "damageTypes." + type | translate }}
             </mat-option>
@@ -127,7 +127,7 @@
           (selectionChange)="showButtons()"
           multiple
         >
-          @for (type of translator.damageTypes; track type) {
+          @for (type of list.damageTypes; track type) {
             <mat-option [value]="type">
               {{ "damageTypes." + type | translate }}
             </mat-option>
@@ -157,7 +157,7 @@
           (change)="showButtons()"
           multiple
         >
-          @for (type of translator.damageTypes; track type) {
+          @for (type of list.damageTypes; track type) {
             <mat-option [value]="type">
               {{ "damageTypes." + type | translate }}
             </mat-option>

+ 3 - 3
src/app/journal/journal-stats/attribute-panel/attribute-field/attribute-details/attribute-details.component.ts

@@ -1,9 +1,9 @@
 import { Component, Input } from '@angular/core';
 import { DetailsService } from 'src/services/details/details.service';
 import { DataService } from 'src/services/data/data.service';
-import { Attribute } from 'src/interfaces/attribute';
+import { Attribute } from 'src/interfaces/interfaces';
 import { TranslateService } from '@ngx-translate/core';
-import { TranslatorService } from 'src/services/translator/translator.service';
+import { ListService } from 'src/services/list/list.service';
 
 @Component({
   selector: 'app-attribute-details',
@@ -23,7 +23,7 @@ export class AttributeDetailsComponent {
   public constructor(
     public detailsService: DetailsService,
     public translate: TranslateService,
-    public translator: TranslatorService,
+    public list: ListService,
     public dataAccessor: DataService,
   ) {
     this.resistances = this.dataAccessor.resistances.resistances;

+ 1 - 1
src/app/journal/journal-stats/attribute-panel/attribute-field/attribute-field.component.ts

@@ -1,5 +1,5 @@
 import { Component, Input } from '@angular/core';
-import { Attribute } from 'src/interfaces/attribute';
+import { Attribute } from 'src/interfaces/interfaces';
 import { DataService } from 'src/services/data/data.service';
 import { DetailsService } from 'src/services/details/details.service';
 import { Observable } from 'rxjs';

+ 1 - 1
src/app/journal/journal-stats/save-throw-panel/save-throw-field/save-throw-field.component.ts

@@ -1,7 +1,7 @@
 import { Component, Input } from '@angular/core';
 import { DataService } from 'src/services/data/data.service';
 import { Observable } from 'rxjs';
-import { Attribute } from 'src/interfaces/attribute';
+import { Attribute } from 'src/interfaces/interfaces';
 import { DetailsService } from 'src/services/details/details.service';
 import { SaveThrowDetailsComponent } from '../save-throw-details/save-throw-details.component';
 import { TranslateService } from '@ngx-translate/core';

+ 1 - 2
src/app/journal/journal-stats/skill-panel/skill-field/skill-field.component.ts

@@ -1,9 +1,8 @@
 import { Component, Input } from '@angular/core';
-import { Skill } from 'src/interfaces/skill';
+import { Skill, Attribute } from 'src/interfaces/interfaces';
 import { DataService } from 'src/services/data/data.service';
 import { DetailsService } from 'src/services/details/details.service';
 import { Observable } from 'rxjs';
-import { Attribute } from 'src/interfaces/attribute';
 import { SkillDetailsComponent } from '../skill-details/skill-details.component';
 import { TranslateService } from '@ngx-translate/core';
 

+ 1 - 1
src/app/journal/journal-stats/weapons-container/spell-table/favorite-spells-modal/favorite-spells-modal.component.ts

@@ -1,5 +1,5 @@
 import { Component, Input } from '@angular/core';
-import { Spell } from 'src/interfaces/spell';
+import { Spell } from 'src/interfaces/interfaces';
 import { ModalService } from 'src/services/modal/modal.service';
 import { TranslateService } from '@ngx-translate/core';
 import { UtilsService } from 'src/services/utils/utils.service';

+ 1 - 1
src/app/journal/journal-stats/weapons-container/spell-table/spell-table.component.ts

@@ -3,7 +3,7 @@ import { DataService } from 'src/services/data/data.service';
 import { ModalService } from 'src/services/modal/modal.service';
 import { DetailsService } from 'src/services/details/details.service';
 import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
-import { Spell } from 'src/interfaces/spell';
+import { Spell } from 'src/interfaces/interfaces';
 import { FullSpellcardComponent } from 'src/app/shared-components/full-spellcard/full-spellcard.component';
 import { FavoriteSpellsModalComponent } from './favorite-spells-modal/favorite-spells-modal.component';
 import { TranslateService } from '@ngx-translate/core';

+ 1 - 1
src/app/journal/journal-stats/weapons-container/weapon-table/weapon-details/weapon-details.component.ts

@@ -1,6 +1,6 @@
 import { Component, Input } from '@angular/core';
 import { DetailsService } from 'src/services/details/details.service';
-import { Weapon } from 'src/interfaces/weapon';
+import { Weapon } from 'src/interfaces/interfaces';
 
 @Component({
   selector: 'app-weapon-details',

+ 1 - 2
src/app/journal/journal-stats/weapons-container/weapon-table/weapon-modal/weapon-modal.component.ts

@@ -1,6 +1,5 @@
 import { Component, Input } from '@angular/core';
-import { Weapon } from 'src/interfaces/weapon';
-import { Damage } from 'src/interfaces/damage';
+import { Weapon, Damage } from 'src/interfaces/interfaces';
 import { ModalService } from 'src/services/modal/modal.service';
 import { Editor } from 'ngx-editor';
 

+ 1 - 2
src/app/journal/journal-stats/weapons-container/weapon-table/weapon-table.component.ts

@@ -1,7 +1,6 @@
 import { Component, EventEmitter, Output } from '@angular/core';
 import { DataService } from 'src/services/data/data.service';
-import { Attribute } from 'src/interfaces/attribute';
-import { Weapon } from 'src/interfaces/weapon';
+import { Attribute, Weapon } from 'src/interfaces/interfaces';
 import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
 import { DetailsService } from 'src/services/details/details.service';
 import { WeaponDetailsComponent } from './weapon-details/weapon-details.component';

+ 3 - 5
src/app/journal/spell-modal/spell-modal.component.ts

@@ -1,9 +1,7 @@
 import { Component, Input } from '@angular/core';
 import { ModalService } from 'src/services/modal/modal.service';
-import { TranslatorService } from 'src/services/translator/translator.service';
-import { Damage } from 'src/interfaces/damage';
-import { Heal } from 'src/interfaces/heal';
-import { Spell } from 'src/interfaces/spell';
+import { ListService } from 'src/services/list/list.service';
+import { Damage, Heal, Spell } from 'src/interfaces/interfaces';
 import { Editor } from 'ngx-editor';
 
 @Component({
@@ -91,7 +89,7 @@ export class SpellModalComponent {
   // #endregion
   public constructor(
     private modalAccessor: ModalService,
-    public translator: TranslatorService,
+    public list: ListService,
   ) {}
 
   public ngOnInit(): void {

+ 1 - 1
src/app/shared-components/full-spellcard/full-spellcard.component.ts

@@ -1,5 +1,5 @@
 import { Component, Input, inject } from '@angular/core';
-import { Spell } from 'src/interfaces/spell';
+import { Spell } from 'src/interfaces/interfaces';
 import { ModalService } from 'src/services/modal/modal.service';
 import { UtilsService } from 'src/services/utils/utils.service';
 import { TranslateService } from '@ngx-translate/core';

+ 0 - 8
src/enums/area-types.ts

@@ -1,8 +0,0 @@
-export enum AreaTypes {
-  cone = 'Kegel',
-  sphere = 'Kugel',
-  circle = 'Kreis',
-  line = 'Linie',
-  square = 'Quadrat',
-  cube = 'Würfel',
-}

+ 0 - 16
src/enums/damage-types.ts

@@ -1,16 +0,0 @@
-export enum DamageTypes {
-  acid = 'Säure',
-  bludgeoning = 'Wucht',
-  cold = 'Kälte',
-  fire = 'Feuer',
-  force = 'Energie',
-  lightning = 'Blitz',
-  necrotic = 'Nekrotisch',
-  piercing = 'Stich',
-  poison = 'Gift',
-  psychic = 'Psychisch',
-  radiant = 'Gleißend',
-  slashing = 'Hieb',
-  thunder = 'Donner',
-  holy = 'Heilig',
-}

+ 0 - 10
src/enums/schools.ts

@@ -1,10 +0,0 @@
-export enum Schools {
-  divination = 'Wahrsagerei',
-  transmutation = 'Verwandlung',
-  abjuration = 'Abjuration',
-  conjuration = 'Beschwörung',
-  enchantment = 'Verzauberung',
-  evocation = 'Hervorrufung',
-  illusion = 'Illusion',
-  necromancy = 'Nekromantie',
-}

+ 0 - 8
src/interfaces/ability.ts

@@ -1,8 +0,0 @@
-export interface Ability {
-  name: string;
-  shortDescription: string;
-  longDescription: string;
-  cost: string;
-  charges: number;
-  currentlyUsedCharges: number;
-}

+ 0 - 6
src/interfaces/attribute.ts

@@ -1,6 +0,0 @@
-export interface Attribute {
-  name: string;
-  value: number;
-  proficiency: boolean;
-  advantage?: 'none' | 'advantage' | 'disadvantage';
-}

+ 0 - 74
src/interfaces/character.ts

@@ -1,74 +0,0 @@
-export interface Character {
-  characterData: {
-    name: string;
-    race: string;
-    class: string;
-    subclass: string;
-    level: string;
-    background: string;
-    experience: string;
-    inspiration: string;
-    proficiencyBonus: string;
-  };
-  appearance: {
-    age: string;
-    height: string;
-    weight: string;
-    eyes: string;
-    skin: string;
-    hair: string;
-  };
-  attributes: {
-    strength: [string, boolean];
-    dexterity: [string, boolean];
-    constitution: [string, boolean];
-    intelligence: [string, boolean];
-    wisdom: [string, boolean];
-    charisma: [string, boolean];
-  };
-  skills: {
-    acrobatics: [string, boolean];
-    animalHandling: [string, boolean];
-    arcana: [string, boolean];
-    athletics: [string, boolean];
-    deception: [string, boolean];
-    history: [string, boolean];
-    insight: [string, boolean];
-    intimidation: [string, boolean];
-    investigation: [string, boolean];
-    medicine: [string, boolean];
-    nature: [string, boolean];
-    perception: [string, boolean];
-    performance: [string, boolean];
-    persuasion: [string, boolean];
-    religion: [string, boolean];
-    sleightOfHand: [string, boolean];
-    stealth: [string, boolean];
-    survival: [string, boolean];
-  };
-  combatStats: {
-    armorClass: string;
-    initiative: string;
-    speed: string;
-    hitPointMaximum: string;
-    currentHitPoints: string;
-    temporaryHitPoints: string;
-    hitDice: string;
-    deathSaveSuccesses: string;
-    deathSaveFailures: string;
-  };
-  weapons: {
-    name: string;
-    attackBonus: string;
-    damage: string;
-    damageType: string;
-    range: string;
-    description: string;
-  };
-  personality: {
-    personalityTraits: string;
-    ideals: string;
-    bonds: string;
-    flaws: string;
-  };
-}

+ 0 - 6
src/interfaces/class-data.ts

@@ -1,6 +0,0 @@
-export interface ClassData {
-  title: string;
-  subclassLevel: number;
-  description: string;
-  features: any[];
-}

+ 0 - 7
src/interfaces/consumable.ts

@@ -1,7 +0,0 @@
-export interface Consumable {
-  name: string;
-  weight: number;
-  value: number;
-  quantity: number;
-  description: string;
-}

+ 0 - 6
src/interfaces/damage.ts

@@ -1,6 +0,0 @@
-export interface Damage {
-  diceNumber: number;
-  diceType: number;
-  damageType: string;
-  additionalDamage?: number;
-}

+ 0 - 7
src/interfaces/food.ts

@@ -1,7 +0,0 @@
-export interface Food {
-  name: string;
-  isReady: boolean;
-  quantity: number;
-  weight: number;
-  description?: string;
-}

+ 0 - 5
src/interfaces/heal.ts

@@ -1,5 +0,0 @@
-export interface Heal {
-  diceNumber: number;
-  diceType: number;
-  additionalHeal?: number;
-}

+ 167 - 0
src/interfaces/interfaces.ts

@@ -0,0 +1,167 @@
+// #region CHARACTER DATA
+export interface Ability {
+  name: string;
+  shortDescription: string;
+  longDescription: string;
+  cost: string;
+  charges: number;
+  currentlyUsedCharges: number;
+}
+
+export interface Attribute {
+  name: string;
+  value: number;
+  proficiency: boolean;
+  advantage?: 'none' | 'advantage' | 'disadvantage';
+}
+
+export interface Skill {
+  name: string;
+  proficiency: boolean;
+  bardicExpertise?: boolean;
+  advantage?: 'none' | 'advantage' | 'disadvantage';
+}
+
+export interface Trait {
+  name: string;
+  shortDescription: string;
+  longDescription: string;
+  origin: string;
+}
+// #endregion
+
+// #region CLASSES AND SUBCLASSES
+export interface ClassData {
+  title: string;
+  subclassLevel: number;
+  description: string;
+  features: any[];
+}
+
+export interface SubclassData {
+  title: string;
+  description: string;
+  features: any[];
+}
+// #endregion
+
+// #region EQUIPMENT
+export interface Weapon {
+  name: string;
+  damage: Damage[];
+  attackBonus: string;
+  useAttributeModifier: boolean;
+  hasAdditionalDamage: boolean;
+  additionalDamage: number;
+  range: number[];
+  hasReach: boolean;
+  throwRange?: number[];
+  proficient: boolean;
+  isVersatile: boolean;
+  isTwoHanded: boolean;
+  isFinesse: boolean;
+  isRanged: boolean;
+  canBeThrown: boolean;
+  weight: string;
+  versatileDamage?: string;
+  isMagical: boolean;
+  magicBonus?: number;
+  description: string;
+}
+
+export interface SimpleItem {
+  name: string;
+  weight: number;
+  value: number;
+  quantity: number;
+  description?: string;
+}
+
+export interface Consumable {
+  name: string;
+  weight: number;
+  value: number;
+  quantity: number;
+  description: string;
+}
+
+export interface Food {
+  name: string;
+  isReady: boolean;
+  quantity: number;
+  weight: number;
+  description?: string;
+}
+
+export interface Misc {
+  name: string;
+  weight: number;
+  value: number;
+  quantity: number;
+  description?: string;
+}
+// #endregion
+
+// #region DAMAGE AND HEAL
+export interface Damage {
+  diceNumber: number;
+  diceType: number;
+  damageType: string;
+  additionalDamage?: number;
+}
+
+export interface Heal {
+  diceNumber: number;
+  diceType: number;
+  additionalHeal?: number;
+}
+// #endregion
+
+// #region SPELLS
+export interface Spell {
+  id: number;
+  isCustom: boolean;
+  german: string;
+  english: string;
+  image: string;
+  classes: string[];
+  level: number;
+  timeToCast: number;
+  cost:
+    | 'action'
+    | 'bonus'
+    | 'reaction'
+    | 'rounds'
+    | 'minutes'
+    | 'hours'
+    | 'days';
+  duration: number;
+  durationType:
+    | 'instant'
+    | 'rounds'
+    | 'minutes'
+    | 'hours'
+    | 'days'
+    | 'permanent';
+  isRitual: boolean;
+  needsConcentration: boolean;
+  needsVerbal: boolean;
+  needsSomatic: boolean;
+  needsMaterial: boolean;
+  school: string;
+  description_de: string;
+  description_en: string;
+  needsAttackRoll: boolean;
+  needsSavingThrow: boolean;
+  savingThrowAttribute?: string;
+  isRanged: boolean;
+  range?: number;
+  hasAreaOfEffect: boolean;
+  length?: number;
+  areaOfEffectType?: string;
+  doesDamage: boolean;
+  damage?: Damage[];
+  doesHeal: boolean;
+  heal?: Heal;
+}
+// #endregion

+ 0 - 7
src/interfaces/misc.ts

@@ -1,7 +0,0 @@
-export interface Misc {
-  name: string;
-  weight: number;
-  value: number;
-  quantity: number;
-  description?: string;
-}

+ 0 - 7
src/interfaces/simple-item.ts

@@ -1,7 +0,0 @@
-export interface SimpleItem {
-  name: string;
-  weight: number;
-  value: number;
-  quantity: number;
-  description?: string;
-}

+ 0 - 6
src/interfaces/skill.ts

@@ -1,6 +0,0 @@
-export interface Skill {
-  name: string;
-  proficiency: boolean;
-  bardicExpertise?: boolean;
-  advantage?: 'none' | 'advantage' | 'disadvantage';
-}

+ 0 - 107
src/interfaces/spell.ts

@@ -1,107 +0,0 @@
-export interface Spell {
-  id: number;
-  isCustom: boolean;
-  german: string;
-  english: string;
-  image: string;
-  classes: string[];
-  level: number;
-  timeToCast: number;
-  cost:
-    | 'action'
-    | 'bonus'
-    | 'reaction'
-    | 'rounds'
-    | 'minutes'
-    | 'hours'
-    | 'days';
-  duration: number;
-  durationType:
-    | 'instant'
-    | 'rounds'
-    | 'minutes'
-    | 'hours'
-    | 'days'
-    | 'permanent';
-  isRitual: boolean;
-  needsConcentration: boolean;
-  needsVerbal: boolean;
-  needsSomatic: boolean;
-  needsMaterial: boolean;
-  school: string;
-  description_de: string;
-  description_en: string;
-  needsAttackRoll: boolean;
-  needsSavingThrow: boolean;
-  savingThrowAttribute?: string;
-  isRanged: boolean;
-  range?: number;
-  hasAreaOfEffect: boolean;
-  length?: number;
-  areaOfEffectType?: string;
-  doesDamage: boolean;
-  damage?: Damage[];
-  doesHeal: boolean;
-  heal?: Heal;
-}
-
-// Possible Additions
-
-// Number of targets
-// Material
-
-interface Damage {
-  diceNumber: number;
-  diceType: number;
-  damageType: string;
-  additionalDamage?: number;
-}
-
-// additions
-
-interface Heal {
-  diceNumber: number;
-  diceType: number;
-  additionalHeal?: number;
-}
-
-// export interface Spell1 {
-//   id: number;
-//   isCustom: boolean;
-//   german: string;
-//   english: string;
-//   image: string;
-//   classes: string[];
-//   level: number;
-//   timeToCast: number;
-//   cost:
-//     | 'action'
-//     | 'bonus'
-//     | 'reaction'
-//     | 'rounds'
-//     | 'minutes'
-//     | 'hours'
-//     | 'days';
-//   duration: number;
-//   durationType: 'rounds' | 'minutes' | 'hours' | 'days' | 'permanent';
-//   isRitual: boolean;
-//   needsConcentration: boolean;
-//   needsVerbal: boolean;
-//   needsSomatic: boolean;
-//   needsMaterial: boolean;
-//   school: string;
-//   description_de: string;
-//   description_en: string;
-//   needsAttackRoll: boolean;
-//   needsSavingThrow: boolean;
-//   savingThrowAttribute?: string;
-//   isRanged: boolean;
-//   range?: number;
-//   hasAreaOfEffect: boolean;
-//   length?: number;
-//   areaOfEffectType?: string;
-//   doesDamage: boolean;
-//   damage?: Damage[];
-//   doesHeal: boolean;
-//   heal?: Heal;
-// }

+ 0 - 5
src/interfaces/subclass-data.ts

@@ -1,5 +0,0 @@
-export interface SubclassData {
-  title: string;
-  description: string;
-  features: any[];
-}

+ 0 - 6
src/interfaces/traits.ts

@@ -1,6 +0,0 @@
-export interface Trait {
-  name: string;
-  shortDescription: string;
-  longDescription: string;
-  origin: string;
-}

+ 0 - 29
src/interfaces/weapon.ts

@@ -1,29 +0,0 @@
-export interface Weapon {
-  name: string;
-  damage: Damage[];
-  attackBonus: string;
-  useAttributeModifier: boolean;
-  hasAdditionalDamage: boolean;
-  additionalDamage: number;
-  range: number[];
-  hasReach: boolean;
-  throwRange?: number[];
-  proficient: boolean;
-  isVersatile: boolean;
-  isTwoHanded: boolean;
-  isFinesse: boolean;
-  isRanged: boolean;
-  canBeThrown: boolean;
-  weight: string;
-  versatileDamage?: string;
-  isMagical: boolean;
-  magicBonus?: number;
-  description: string;
-}
-
-interface Damage {
-  diceNumber: number;
-  diceType: number;
-  damageType: string;
-  additionalDamage?: number;
-}

+ 2 - 0
src/pipes/duration/duration.pipe.ts

@@ -5,6 +5,8 @@ import { TranslateService } from '@ngx-translate/core';
   name: 'duration',
   standalone: true,
 })
+
+// Currently not in use!
 export class DurationPipe implements PipeTransform {
   public constructor(public translate: TranslateService) {}
   transform(value: number): string {

+ 1 - 1
src/services/class/class.service.ts

@@ -1,5 +1,5 @@
 import { Injectable } from '@angular/core';
-import { ClassData } from 'src/interfaces/class-data';
+import { ClassData } from 'src/interfaces/interfaces';
 
 @Injectable({
   providedIn: 'root',

+ 10 - 8
src/services/data/data.service.ts

@@ -1,14 +1,16 @@
 import { Injectable } from '@angular/core';
 import Localbase from 'localbase';
 import { BehaviorSubject } from 'rxjs';
-import { Attribute } from 'src/interfaces/attribute';
-import { Skill } from 'src/interfaces/skill';
-import { Weapon } from 'src/interfaces/weapon';
-import { Spell } from 'src/interfaces/spell';
-import { Ability } from 'src/interfaces/ability';
-import { Trait } from 'src/interfaces/traits';
-import { SimpleItem } from 'src/interfaces/simple-item';
-import { Food } from 'src/interfaces/food';
+import {
+  Weapon,
+  Food,
+  SimpleItem,
+  Trait,
+  Ability,
+  Spell,
+  Skill,
+  Attribute,
+} from 'src/interfaces/interfaces';
 import { SpellsService } from '../spells/spells.service';
 
 @Injectable({

+ 3 - 3
src/services/translator/translator.service.spec.ts → src/services/list/list.service.spec.ts

@@ -1,13 +1,13 @@
 import { TestBed } from '@angular/core/testing';
 
-import { TranslatorService } from './translator.service';
+import { ListService } from './list.service';
 
 describe('TranslatorService', () => {
-  let service: TranslatorService;
+  let service: ListService;
 
   beforeEach(() => {
     TestBed.configureTestingModule({});
-    service = TestBed.inject(TranslatorService);
+    service = TestBed.inject(ListService);
   });
 
   it('should be created', () => {

+ 1 - 1
src/services/translator/translator.service.ts → src/services/list/list.service.ts

@@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
 @Injectable({
   providedIn: 'root',
 })
-export class TranslatorService {
+export class ListService {
   constructor() {}
 
   public races: string[] = [

+ 1 - 1
src/services/spells/spells.service.ts

@@ -1,5 +1,5 @@
 import { Injectable, inject } from '@angular/core';
-import { Spell } from 'src/interfaces/spell';
+import { Spell } from 'src/interfaces/interfaces';
 import { Subject } from 'rxjs';
 import { TranslateService } from '@ngx-translate/core';
 

+ 1 - 1
src/services/subclass/subclass.service.ts

@@ -1,5 +1,5 @@
 import { Injectable } from '@angular/core';
-import { SubclassData } from 'src/interfaces/subclass-data';
+import { SubclassData } from 'src/interfaces/interfaces';
 
 @Injectable({
   providedIn: 'root',