fix (#355): save physical description

This commit is contained in:
Samuel Lopez
2026-04-15 23:13:37 -04:00
committed by jalensailin
parent a5acd02b8c
commit 3a8d5285cf
4 changed files with 8 additions and 27 deletions
-25
View File
@@ -63,31 +63,6 @@ export default class DGAgentSheet extends DGActorSheet {
/* -------------------------------------------- */
/** @override */
async _prepareContext(options) {
const context = await super._prepareContext(options);
const enrichedDescription =
await foundry.applications.ux.TextEditor.implementation.enrichHTML(
this.actor.system.physicalDescription,
{
rollData: this.document.getRollData(),
relativeTo: this.document,
},
);
const { HTMLProseMirrorElement } = foundry.applications.elements;
context.descriptionField = HTMLProseMirrorElement.create({
name: "system.physicalDescription",
value: this.actor.system.physicalDescription,
enriched: enrichedDescription,
toggled: true,
}).outerHTML;
return context;
}
/* -------------------------------------------- */
/**
* Resets the actor's current breaking point by recalculating it as the difference
* between the actor's sanity value and POW value, ensuring it is non-negative,
+1 -1
View File
@@ -280,7 +280,7 @@ export default class DGActorSheet extends DGSheetMixin(ActorSheetV2) {
switch (this.actor.type) {
case "agent":
descriptionPath = "system.physicalDescription";
descriptionPath = "system.physical.description";
break;
case "npc":
case "unnatural":