mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 12:11:07 +01:00
[Feature] Armor/Weapon Features In Description (#1521)
* ItemFeatures are now prepended to the description * . * Better separation of concerns * . * .
This commit is contained in:
parent
8de12551ad
commit
883aaeec02
10 changed files with 84 additions and 20 deletions
|
|
@ -76,16 +76,10 @@ export default class DHBaseItemSheet extends DHApplicationMixin(ItemSheetV2) {
|
|||
/**@inheritdoc */
|
||||
async _preparePartContext(partId, context, options) {
|
||||
await super._preparePartContext(partId, context, options);
|
||||
const { TextEditor } = foundry.applications.ux;
|
||||
|
||||
switch (partId) {
|
||||
case 'description':
|
||||
const value = foundry.utils.getProperty(this.document, 'system.description') ?? '';
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(value, {
|
||||
relativeTo: this.item,
|
||||
rollData: this.item.getRollData(),
|
||||
secrets: this.item.isOwner
|
||||
});
|
||||
context.enrichedDescription = await this.document.system.getEnrichedDescription();
|
||||
break;
|
||||
case 'effects':
|
||||
await this._prepareEffectsContext(context, options);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue