mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-22 23:43:37 +02:00
Adjust spacing of compendium browser tags (#1720)
This commit is contained in:
parent
3b6809064d
commit
26ac2c5380
6 changed files with 27 additions and 10 deletions
|
|
@ -53,14 +53,14 @@ export default class DHArmor extends AttachableItem {
|
|||
}
|
||||
|
||||
/**@inheritdoc */
|
||||
async getDescriptionData({ inCompendium }) {
|
||||
async getDescriptionData() {
|
||||
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, inCompendium, features }
|
||||
{ item: this.parent, features }
|
||||
);
|
||||
|
||||
return { prefix, value: baseDescription, suffix: null };
|
||||
|
|
|
|||
|
|
@ -138,10 +138,10 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
|||
* @param {object} [options] - Options that modify the styling of the rendered template. { headerStyle: undefined|'none'|'large' }
|
||||
* @returns {string}
|
||||
*/
|
||||
async getEnrichedDescription(options = { inCompendium: false }) {
|
||||
async getEnrichedDescription() {
|
||||
if (!this.metadata.hasDescription) return '';
|
||||
|
||||
const { prefix, value, suffix } = await this.getDescriptionData(options);
|
||||
const { prefix, value, suffix } = await this.getDescriptionData();
|
||||
const fullDescription = [prefix, value, suffix].filter(p => !!p).join('\n<hr>\n');
|
||||
|
||||
return await foundry.applications.ux.TextEditor.implementation.enrichHTML(fullDescription, {
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ export default class DHWeapon extends AttachableItem {
|
|||
}
|
||||
|
||||
/**@inheritdoc */
|
||||
async getDescriptionData({ inCompendium }) {
|
||||
async getDescriptionData() {
|
||||
const baseDescription = this.description;
|
||||
|
||||
const allFeatures = CONFIG.DH.ITEM.allWeaponFeatures();
|
||||
|
|
@ -119,7 +119,6 @@ export default class DHWeapon extends AttachableItem {
|
|||
'systems/daggerheart/templates/sheets/items/weapon/description.hbs',
|
||||
{
|
||||
item: this,
|
||||
inCompendium,
|
||||
features
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue