RC-71 | Glory | Display & Input

This commit is contained in:
Oliver-Akins 2024-12-30 22:13:44 -07:00
parent 05f111682e
commit 31a47a99dd
5 changed files with 67 additions and 13 deletions

View file

@ -52,6 +52,7 @@ export class HeroSummaryCardV1 extends GenericSheetMixin(HandlebarsApplicationMi
ctx = await HeroSummaryCardV1.prepareFatePath(ctx);
ctx = await HeroSummaryCardV1.prepareAbilityRow(ctx);
ctx = await HeroSummaryCardV1.prepareSpeed(ctx);
ctx = await HeroSummaryCardV1.prepareLevelData(ctx);
partId = partId.slice(0,1).toUpperCase() + partId.slice(1);
if (this[`_prepare${partId}Context`] != null) {
@ -62,6 +63,16 @@ export class HeroSummaryCardV1 extends GenericSheetMixin(HandlebarsApplicationMi
return ctx;
};
static async prepareLevelData(ctx) {
ctx.level = {
glory: ctx.actor.system.level.glory,
};
if (ctx.meta.limited) {
ctx.level.glory = `?`;
};
return ctx;
};
static async prepareFatePath(ctx) {
ctx.fate = {};
ctx.fate.selected = ctx.actor.system.fate;