diff --git a/module/Apps/ActorSheets/BookGeistSheet.mjs b/module/Apps/ActorSheets/BookGeistSheet.mjs index cafb51d..a1427d1 100644 --- a/module/Apps/ActorSheets/BookGeistSheet.mjs +++ b/module/Apps/ActorSheets/BookGeistSheet.mjs @@ -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) { diff --git a/module/data/Actor/Geist.mjs b/module/data/Actor/Geist.mjs index 440392a..b78572c 100644 --- a/module/data/Actor/Geist.mjs +++ b/module/data/Actor/Geist.mjs @@ -1,3 +1,18 @@ import { EntityData } from "./Entity.mjs"; -export class GeistData extends EntityData {}; +const { fields } = foundry.data; + +export class GeistData extends EntityData { + static defineSchema() { + const schema = super.defineSchema(); + + schema.description = new fields.HTMLField({ + blank: true, + nullable: true, + trim: true, + initial: null, + }); + + return schema; + }; +}; diff --git a/templates/Apps/BookGeistSheet/header.hbs b/templates/Apps/BookGeistSheet/header.hbs index eb830eb..fe198ef 100644 --- a/templates/Apps/BookGeistSheet/header.hbs +++ b/templates/Apps/BookGeistSheet/header.hbs @@ -6,12 +6,14 @@ value="{{name}}" >
- Rank -