[Feature] Armor/Weapon Features In Description (#1521)

* ItemFeatures are now prepended to the description

* .

* Better separation of concerns

* .

* .
This commit is contained in:
WBHarry 2026-01-12 14:16:19 +01:00 committed by GitHub
parent 8de12551ad
commit 883aaeec02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 84 additions and 20 deletions

View file

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