diff --git a/module/data/fields/actorField.mjs b/module/data/fields/actorField.mjs index 69ba6bf1..25e04317 100644 --- a/module/data/fields/actorField.mjs +++ b/module/data/fields/actorField.mjs @@ -82,6 +82,24 @@ 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 }; diff --git a/src/packs/items/weapons/weapon_Knuckle_Blades_U8gfyvxoHm024inM.json b/src/packs/items/weapons/weapon_Knuckle_Blades_U8gfyvxoHm024inM.json index 56ff6d62..ffe92071 100644 --- a/src/packs/items/weapons/weapon_Knuckle_Blades_U8gfyvxoHm024inM.json +++ b/src/packs/items/weapons/weapon_Knuckle_Blades_U8gfyvxoHm024inM.json @@ -33,7 +33,7 @@ "tier": 2, "equipped": false, "secondary": false, - "burden": "oneHanded", + "burden": "twoHanded", "weaponFeatures": [ { "value": "brutal", diff --git a/templates/sheets/global/partials/inventory-item-V2.hbs b/templates/sheets/global/partials/inventory-item-V2.hbs index 86d2e2d3..a758a28f 100644 --- a/templates/sheets/global/partials/inventory-item-V2.hbs +++ b/templates/sheets/global/partials/inventory-item-V2.hbs @@ -40,23 +40,20 @@ Parameters: {{!-- Name & Tags --}}
+ {{!-- Item Name --}} + {{localize item.name}} {{#unless (or noExtensible (not item.system.description))}}{{/unless}} - {{!-- Item Name --}} - {{localize item.name}} {{#unless (or noExtensible (not item.system.description))}}{{/unless}} - - {{!-- Tags Start --}} + {{!-- Tags Start --}} {{#if (not ../hideTags)}} - {{#> "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs" item }} - {{#if (eq ../type 'feature')}} - {{#if (or (eq @root.document.type 'adversary') (eq @root.document.type 'environment'))}} - {{#if system.featureForm}} + {{#> "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")))}}
{{localize (concat "DAGGERHEART.CONFIG.FeatureForm." system.featureForm)}}
{{/if}} {{/if}} - {{/if}} - {{/ "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs"}} + {{/ "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs"}} {{/if}} {{!--Tags End --}} diff --git a/templates/sheets/global/partials/item-tags.hbs b/templates/sheets/global/partials/item-tags.hbs index b30fcbf2..2edc1eac 100644 --- a/templates/sheets/global/partials/item-tags.hbs +++ b/templates/sheets/global/partials/item-tags.hbs @@ -4,5 +4,5 @@ {{tag}}
{{/each}} - {{#if @partial-block}}{{> @partial-block}}{{/if}} + {{> @partial-block}} \ No newline at end of file