mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Improved description enrichment to not bloat it outside of the CompendiumBrowser
This commit is contained in:
parent
83c3da0130
commit
e1fef44d21
7 changed files with 46 additions and 41 deletions
|
|
@ -53,14 +53,14 @@ export default class DHArmor extends AttachableItem {
|
|||
}
|
||||
|
||||
/**@inheritdoc */
|
||||
async getDescriptionData() {
|
||||
async getDescriptionData({ inCompendiumBrowser }) {
|
||||
const baseDescription = this.description;
|
||||
const allFeatures = CONFIG.DH.ITEM.allArmorFeatures();
|
||||
const features = this.armorFeatures.map(x => allFeatures[x.value]).filter(x => x);
|
||||
|
||||
const prefix = await foundry.applications.handlebars.renderTemplate(
|
||||
'systems/daggerheart/templates/sheets/items/armor/description.hbs',
|
||||
{ item: this.parent, features }
|
||||
{ item: this.parent, features, inCompendiumBrowser }
|
||||
);
|
||||
|
||||
return { prefix, value: baseDescription, suffix: null };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue