FEAT: add eritch to NPC description

FIX: missing htmlFieldss on manfiest
FIX: add misisng localizations
This commit is contained in:
Joaquin Pereyra 2025-07-18 15:26:27 -03:00
parent f56c2482cb
commit ff8c257d2c
8 changed files with 59 additions and 12 deletions

View file

@ -36,6 +36,9 @@ export default class DhpEnvironment extends DHBaseActorSheet {
async _preparePartContext(partId, context, options) {
context = await super._preparePartContext(partId, context, options);
switch (partId) {
case 'header':
await this._prepareHeaderContext(context, options);
break;
case 'notes':
await this._prepareNotesContext(context, options);
break;
@ -71,6 +74,23 @@ export default class DhpEnvironment extends DHBaseActorSheet {
}
}
/**
* Prepare render context for the Header part.
* @param {ApplicationRenderContext} context
* @param {ApplicationRenderOptions} options
* @returns {Promise<void>}
* @protected
*/
async _prepareHeaderContext(context, _options) {
const { system } = this.document;
const { TextEditor } = foundry.applications.ux;
context.description = await TextEditor.implementation.enrichHTML(system.description, {
secrets: this.document.isOwner,
relativeTo: this.document
});
}
/* -------------------------------------------- */
async _onDragStart(event) {