Update fate path preparation to use localized labels
This commit is contained in:
parent
f237bce4d9
commit
28989c2d35
1 changed files with 16 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue