Update fate path preparation to use localized labels

This commit is contained in:
Eldritch-Oliver 2025-10-12 14:07:39 -06:00
parent f237bce4d9
commit 28989c2d35

View file

@ -1,6 +1,7 @@
import { filePath } from "../../consts.mjs";
import { GenericAppMixin } from "../mixins/GenericApp.mjs";
import { LaidOutAppMixin } from "../mixins/LaidOutAppMixin.mjs";
import { localizer } from "../../utils/Localizer.mjs";
const { HandlebarsApplicationMixin } = foundry.applications.api;
const { ActorSheetV2 } = foundry.applications.sheets;
@ -77,7 +78,21 @@ export class BookGeistSheet extends LaidOutAppMixin(GenericAppMixin(HandlebarsAp
_prepareStatsContext(ctx) {
const system = this.actor.system;
ctx.path = system.fate;
const fate = system.fate;
if (fate) {
ctx.path = {
full: localizer(`RipCrypt.common.ordinals.${fate}.full`),
abbv: localizer(`RipCrypt.common.ordinals.${fate}.abbv`),
};
}
else {
ctx.path = {
full: null,
abbv: localizer(`RipCrypt.common.empty`),
};
};
Object.assign(ctx, system.ability);
ctx.guts = system.guts;
ctx.speed = system.speed;