1- import { TotalHdProperty } from './TotalHdProperty.js' ;
2- import { ClassProperty } from './ClassProperty.js' ;
3- import { HealthProperty } from './HealthProperty.js' ;
4- import { HdSizeProperty } from './HdSizeProperty.js' ;
5- import { ConHpBonusProperty } from './ConHpBonusProperty.js' ;
6- import { FeatsProperty } from './FeatsProperty.js' ;
7- import { LanguagesProperty } from './LanguagesProperty.js' ;
8- import { GearProperty } from './GearProperty.js' ;
9- import { SkillsProperty } from './SkillsProperty.js' ;
10- import { MeleeAttacksProperty } from './MeleeAttacksProperty.js' ;
11- import { RangedAttacksProperty } from './RangedAttacksProperty.js' ;
12- import { SpecialAttacksProperty } from './SpecialAttacksProperty.js' ;
13- import { SpellsProperty } from './SpellsProperty.js' ;
14- import { SpellLikesProperty } from './SpellLikesProperty.js' ;
15- import { SpaceProperty } from './SpaceProperty.js' ;
16- import { AlignmentBlockProperty } from './AlignmentBlockProperty.js' ;
17- import { CrProperty } from './CrProperty.js' ;
18- import { SpecialAbilitiesProperty } from './SpecialAbilitiesProperty.js' ;
19- import { ImmunitiesProperty } from './ImmunitiesProperty.js' ;
20- import { DvProperty } from './DvProperty.js' ;
1+ import { TotalHdProperty } from './ComputedProperties/ TotalHdProperty.js' ;
2+ import { ClassProperty } from './ComputedProperties/ ClassProperty.js' ;
3+ import { HealthProperty } from './ComputedProperties/ HealthProperty.js' ;
4+ import { HdSizeProperty } from './ComputedProperties/ HdSizeProperty.js' ;
5+ import { ConHpBonusProperty } from './ComputedProperties/ ConHpBonusProperty.js' ;
6+ import { FeatsProperty } from './ComputedProperties/ FeatsProperty.js' ;
7+ import { LanguagesProperty } from './ComputedProperties/ LanguagesProperty.js' ;
8+ import { GearProperty } from './ComputedProperties/ GearProperty.js' ;
9+ import { SkillsProperty } from './ComputedProperties/ SkillsProperty.js' ;
10+ import { MeleeAttacksProperty } from './ComputedProperties/ MeleeAttacksProperty.js' ;
11+ import { RangedAttacksProperty } from './ComputedProperties/ RangedAttacksProperty.js' ;
12+ import { SpecialAttacksProperty } from './ComputedProperties/ SpecialAttacksProperty.js' ;
13+ import { SpellsProperty } from './ComputedProperties/ SpellsProperty.js' ;
14+ import { SpellLikesProperty } from './ComputedProperties/ SpellLikesProperty.js' ;
15+ import { SpaceProperty } from './ComputedProperties/ SpaceProperty.js' ;
16+ import { AlignmentBlockProperty } from './ComputedProperties/ AlignmentBlockProperty.js' ;
17+ import { CrProperty } from './ComputedProperties/ CrProperty.js' ;
18+ import { SpecialAbilitiesProperty } from './ComputedProperties/ SpecialAbilitiesProperty.js' ;
19+ import { ImmunitiesProperty } from './ComputedProperties/ ImmunitiesProperty.js' ;
20+ import { DvProperty } from './ComputedProperties/ DvProperty.js' ;
2121
2222export class PropertyStore {
2323 static ComputedProperties = {
@@ -66,7 +66,11 @@ export class PropertyStore {
6666 // console.log(sortedProperties);
6767
6868 for ( const sortedProperty of sortedProperties ) {
69- this . properties [ sortedProperty [ 0 ] ] = sortedProperty [ 1 ] . getProperty ( ) ;
69+ try {
70+ this . properties [ sortedProperty [ 0 ] ] = sortedProperty [ 1 ] . getProperty ( ) ;
71+ } catch ( e ) {
72+ this . properties [ sortedProperty [ 0 ] ] = undefined ;
73+ }
7074 }
7175
7276 console . log ( this . properties ) ;
@@ -85,6 +89,7 @@ export class PropertyStore {
8589 this . calculateDependencyDepth ( computedProperty , 0 ) ;
8690 }
8791
92+ /*
8893 let p = PropertyStore.ComputedProperties[Object.keys(PropertyStore.ComputedProperties)[0]];
8994 // console.log(p);
9095 for (const [key, computedProperty] of Object.entries(PropertyStore.ComputedProperties)) {
@@ -96,6 +101,7 @@ export class PropertyStore {
96101 // console.log(p);
97102 this.updateDependencyDepth(p, p.dependencyDepth);
98103
104+ */
99105 for ( const [ key , computedProperty ] of Object . entries ( PropertyStore . ComputedProperties ) ) {
100106 // console.log('Name: ' + computedProperty.constructor.name + ', depth: ' + computedProperty.dependencyDepth);
101107 }
@@ -129,6 +135,4 @@ export class PropertyStore {
129135 this . updateDependencyDepth ( dependency , depth - 1 ) ;
130136 }
131137 }
132-
133-
134138}
0 commit comments