fix (#355): save physical description
This commit is contained in:
committed by
jalensailin
parent
a5acd02b8c
commit
3a8d5285cf
@@ -12,6 +12,12 @@
|
||||
- [#283](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/283) - Added new actor sheet with left hand Sidebar RFC
|
||||
- [#291](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/291) - Moving Luck button from three dots to left hand panel
|
||||
|
||||
## Version 1.6.6 - 2026-02-XX
|
||||
|
||||
### **Bug Fixes:**
|
||||
|
||||
- [#355](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/355) - Save the physical description of an agent.
|
||||
|
||||
## Version 1.6.5 - 2026-02-17
|
||||
|
||||
### **Features:**
|
||||
|
||||
@@ -30,7 +30,7 @@ export default class AgentData extends CharacterData {
|
||||
}),
|
||||
physical: new SchemaField({
|
||||
description: new StringField({
|
||||
initial: "(Physical description of agent)",
|
||||
initial: "",
|
||||
}),
|
||||
wounds: new StringField({ initial: "" }),
|
||||
firstAidAttempted: new BooleanField({ initial: false }),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user