Compare commits

..

No commits in common. "e77b927a75d6d984211de13713c7823b27255bf0" and "37b088fe7d59c25cc2fbfe738c7cbd4a6c3bd92b" have entirely different histories.

4 changed files with 12 additions and 27 deletions

View file

@ -82,24 +82,6 @@ class ResourcesField extends fields.TypedObjectField {
}
return data;
}
/**
* Foundry bar attributes are unable to handle finding the schema field nor the label normally.
* This returns the element if its a valid resource key and overwrites the element's label for that retrieval.
*/
_getField(path) {
if (path.length === 0) return this;
const first = path.shift();
if (first === this.element.name) return this.element_getField(path);
const resources = CONFIG.DH.RESOURCE[this.actorType].all;
if (first in resources) {
this.element.label = resources[first].label;
return this.element._getField(path);
}
return undefined;
}
}
export { attributeField, ResourcesField, stressDamageReductionRule, bonusField };

View file

@ -33,7 +33,7 @@
"tier": 2,
"equipped": false,
"secondary": false,
"burden": "twoHanded",
"burden": "oneHanded",
"weaponFeatures": [
{
"value": "brutal",

View file

@ -40,19 +40,22 @@ Parameters:
{{!-- Name & Tags --}}
<div class="item-label" draggable="true">
{{!-- Item Name --}}
<span class="item-name">{{localize item.name}} {{#unless (or noExtensible (not item.system.description))}}<span class="expanded-icon"><i class="fa-solid fa-expand"></i></span>{{/unless}}</span>
{{!-- Tags Start --}}
{{#if (not ../hideTags)}}
{{#> "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs" item}}
{{#> "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs" item }}
{{#if (eq ../type 'feature')}}
{{#if (and system.featureForm (or (eq @root.document.type "adversary") (eq @root.document.type "environment")))}}
{{#if (or (eq @root.document.type 'adversary') (eq @root.document.type 'environment'))}}
{{#if system.featureForm}}
<div class="tag feature-form">
<span class="recall-value">{{localize (concat "DAGGERHEART.CONFIG.FeatureForm." system.featureForm)}}</span>
</div>
{{/if}}
{{/if}}
{{/if}}
{{/ "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs"}}
{{/if}}

View file

@ -4,5 +4,5 @@
{{tag}}
</div>
{{/each}}
{{> @partial-block}}
{{#if @partial-block}}{{> @partial-block}}{{/if}}
</div>