Compare commits

...

5 commits

Author SHA1 Message Date
WBHarry
8024cac565 Raised version 2026-03-15 11:44:28 +01:00
Carlos Fernandez
1bd3daed43
Fix adversary feature type not rendering (#1731) 2026-03-15 00:20:49 +01:00
WBHarry
08a9bbdf05 Corrected KnuckleBlades to be twohanded 2026-03-14 12:15:20 +01:00
Carlos Fernandez
9d6c26e8c4
Fix retrieving resource attribute bars in token (#1730) 2026-03-14 06:22:33 -04:00
WBHarry
7d50ba409f Fixed so that damage buttons show up for players on their own messages 2026-03-13 01:25:52 +01:00
6 changed files with 33 additions and 14 deletions

View file

@ -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 };

View file

@ -143,7 +143,11 @@ export default class DHRoll extends Roll {
const metagamingSettings = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Metagaming);
const chatData = await this._prepareChatRenderContext({ flavor, isPrivate, ...options });
return foundry.applications.handlebars.renderTemplate(template, { ...chatData, metagamingSettings });
return foundry.applications.handlebars.renderTemplate(template, {
...chatData,
parent: chatData.parent,
metagamingSettings
});
}
/** @inheritDoc */

View file

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

View file

@ -2,7 +2,7 @@
"id": "daggerheart",
"title": "Daggerheart",
"description": "An unofficial implementation of the Daggerheart system",
"version": "1.9.0",
"version": "1.9.2",
"compatibility": {
"minimum": "13.346",
"verified": "13.351",

View file

@ -40,23 +40,20 @@ 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>
{{!-- 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 --}}
{{!-- 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")))}}
<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"}}
{{/ "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs"}}
{{/if}}
{{!--Tags End --}}

View file

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