modules/ageSystemItem.js
/** Returns owner's Focus value, base on Item's useFocus property
     * TODO = figure out how/if derived data can be input to another Item
     */
Returns owner's Focus value, base on Item's useFocus property
TODO = figure out how/if derived data can be input to another Item
Returns owner ' s Focus value base on Item ' s useFocus property TODO = figure out how / if derived data can be input to another Item
_ownerFocusValue() {
        const itemData = this.data;
        const data = itemData.data;
        const owner = this.actor;
        if (data.useFocus === null || data.useFocus === "" || this.isOwned === false || owner === null) {
            return null;
        };
        const ownerFoci = owner.data.items.filter(a => a.type === "focus");
        const expectedFocus = data.useFocus.toLowerCase();
        const validFocus = ownerFoci.filter(c => c.name.toLowerCase() === expectedFocus);
        if (validFocus.length < 1) {
            return 0;
        } else {
            const value = validFocus[0].data.initialValue;
            return value;
        };    
    }
_ownerFocusValue ( ) { const itemData = this . data ; const data = itemData . data ; const owner = this . actor ; if ( data . useFocus === null || data . useFocus === "" || this . isOwned === false || owner === null ) { return null ; } ; const ownerFoci = owner . data . items . filter ( a => a . type === "focus" ) ; const expectedFocus = data . useFocus . toLowerCase ( ) ; const validFocus = ownerFoci . filter ( c => c . name . toLowerCase ( ) === expectedFocus ) ; if ( validFocus . length < 1 ) { return 0 ; } else { const value = validFocus [ 0 ] . data . initialValue ; return value ; } ; }
Returns owner's Focus value, base on Item's useFocus property
 TODO = figure out how/if derived data can be input to another Item
Returns owner ' s Focus value base on Item ' s useFocus property TODO = figure out how / if derived data can be input to another Item