mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-24 08:23:38 +02:00
Compare commits
No commits in common. "10c0b6b51e9fedfcce337670a32aac3aada4e7e8" and "652a554c9a8cef9b11ab2f1134acc8d458df8b5b" have entirely different histories.
10c0b6b51e
...
652a554c9a
5 changed files with 13 additions and 28 deletions
|
|
@ -82,24 +82,6 @@ class ResourcesField extends fields.TypedObjectField {
|
||||||
}
|
}
|
||||||
return data;
|
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 };
|
export { attributeField, ResourcesField, stressDamageReductionRule, bonusField };
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
"tier": 2,
|
"tier": 2,
|
||||||
"equipped": false,
|
"equipped": false,
|
||||||
"secondary": false,
|
"secondary": false,
|
||||||
"burden": "twoHanded",
|
"burden": "oneHanded",
|
||||||
"weaponFeatures": [
|
"weaponFeatures": [
|
||||||
{
|
{
|
||||||
"value": "brutal",
|
"value": "brutal",
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "daggerheart",
|
"id": "daggerheart",
|
||||||
"title": "Daggerheart",
|
"title": "Daggerheart",
|
||||||
"description": "An unofficial implementation of the Daggerheart system",
|
"description": "An unofficial implementation of the Daggerheart system",
|
||||||
"version": "1.9.2",
|
"version": "1.9.1",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "13.346",
|
"minimum": "13.346",
|
||||||
"verified": "13.351",
|
"verified": "13.351",
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ Parameters:
|
||||||
|
|
||||||
{{!-- Name & Tags --}}
|
{{!-- Name & Tags --}}
|
||||||
<div class="item-label" draggable="true">
|
<div class="item-label" draggable="true">
|
||||||
|
|
||||||
{{!-- Item Name --}}
|
{{!-- 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>
|
<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>
|
||||||
|
|
||||||
|
|
@ -47,12 +48,14 @@ Parameters:
|
||||||
{{#if (not ../hideTags)}}
|
{{#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 (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">
|
<div class="tag feature-form">
|
||||||
<span class="recall-value">{{localize (concat "DAGGERHEART.CONFIG.FeatureForm." system.featureForm)}}</span>
|
<span class="recall-value">{{localize (concat "DAGGERHEART.CONFIG.FeatureForm." system.featureForm)}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
{{/ "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs"}}
|
{{/ "systems/daggerheart/templates/sheets/global/partials/item-tags.hbs"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@
|
||||||
{{tag}}
|
{{tag}}
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{> @partial-block}}
|
{{#if @partial-block}}{{> @partial-block}}{{/if}}
|
||||||
</div>
|
</div>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue