ENhance and fix

This commit is contained in:
2026-05-10 23:12:21 +02:00
parent e200b5f7b0
commit 7542890232
43 changed files with 638 additions and 390 deletions
+3 -3
View File
@@ -10,8 +10,8 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
static types = [
{ id: "ring", label: "l5r5e.rings.label" },
{ id: "skill", label: "l5r5e.skills.label" },
{ id: "arcane", label: "l5r5e.chiaroscuro.arcane.label" },
{ id: "mot_invocation", label: "l5r5e.chiaroscuro.technique.mot_invocation" },
{ id: "arcane", label: "chiaroscuro.arcane.label" },
{ id: "mot_invocation", label: "chiaroscuro.technique.mot_invocation" },
// others have theirs own xp count
];
@@ -30,7 +30,7 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
sheetData.data.skillsList = game.l5r5e.HelpersL5r5e.getSkillsList(true);
// Invocation sub-types (Général / Neutre / Précis)
const invTypes = game.l5r5e.HelpersL5r5e.getLocalizedRawObject("l5r5e.chiaroscuro.technique.invocation_types") ?? {};
const invTypes = game.l5r5e.HelpersL5r5e.getLocalizedRawObject("chiaroscuro.technique.invocation_types") ?? {};
sheetData.data.invocationTypesList = [{ id: "", label: "—" }].concat(
Object.entries(invTypes).map(([id, label]) => ({ id, label }))
);
-30
View File
@@ -1,30 +0,0 @@
import { BaseItemSheetL5r5e } from "./base-item-sheet.js";
/**
* Sheet for État items (Chiaroscuro).
* @extends {BaseItemSheetL5r5e}
*/
export class EtatSheetL5r5e extends BaseItemSheetL5r5e {
/** @override */
static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "etat"],
template: CONFIG.l5r5e.paths.templates + "items/etat/etat-sheet.html",
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "attributes" }],
});
}
/** @override */
async getData(options = {}) {
const sheetData = await super.getData(options);
sheetData.data.enrichedHtml = {
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(
sheetData.data.system.description ?? "",
{ async: true }
),
};
return sheetData;
}
}
+1 -1
View File
@@ -27,7 +27,7 @@ export class MotInvocationSheetL5r5e extends BaseItemSheetL5r5e {
const sheetData = await super.getData(options);
// Build invocation types list from i18n
const invTypes = game.l5r5e.HelpersL5r5e.getLocalizedRawObject("l5r5e.chiaroscuro.technique.invocation_types") ?? {};
const invTypes = game.l5r5e.HelpersL5r5e.getLocalizedRawObject("chiaroscuro.technique.invocation_types") ?? {};
sheetData.data.invocationTypesList = [{ id: "", label: "—" }].concat(
Object.entries(invTypes).map(([id, label]) => ({ id, label }))
);