Finish the initial requirements for the header partial

This commit is contained in:
Eldritch-Oliver 2025-10-15 22:34:46 -06:00
parent d70c5113b1
commit 8ed6f49c8d
3 changed files with 32 additions and 9 deletions

View file

@ -6,7 +6,7 @@ import { editItemFromElement, deleteItemFromElement } from "../utils.mjs";
const { HandlebarsApplicationMixin } = foundry.applications.api;
const { ActorSheetV2 } = foundry.applications.sheets;
const { ContextMenu } = foundry.applications.ux;
const { ContextMenu, TextEditor } = foundry.applications.ux;
export class BookGeistSheet extends
LaidOutAppMixin(
@ -99,7 +99,13 @@ export class BookGeistSheet extends
async _prepareHeaderContext(ctx) {
ctx.name = this.actor.name;
ctx.description = null; // this.actor.system.description;
ctx.rank = this.actor.system.level.rank;
ctx.ranks = Object.values(gameTerms.Rank)
.map((value, index) => ({
value,
label: index
}));
ctx.description = await TextEditor.implementation.enrichHTML(this.actor.system.description);
};
async _prepareStatsContext(ctx) {