First round of changes

This commit is contained in:
2026-04-23 14:27:33 +02:00
parent f72230dd39
commit abe35cb537
45 changed files with 1860 additions and 56 deletions

View File

@@ -0,0 +1,35 @@
import { BaseItemSheetL5r5e } from "./base-item-sheet.js";
/**
* Sheet for Mystère items (Chiaroscuro).
* @extends {BaseItemSheetL5r5e}
*/
export class MystereSheetL5r5e extends BaseItemSheetL5r5e {
/** @override */
static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "mystere"],
template: CONFIG.l5r5e.paths.templates + "items/mystere/mystere-sheet.html",
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "attributes" }],
});
}
/** @override */
async getData(options = {}) {
const sheetData = await super.getData(options);
sheetData.data.mystereTypes = [
{ id: "mineur", label: game.i18n.localize("chiaroscuro.mystere.mineur") },
{ id: "majeur", label: game.i18n.localize("chiaroscuro.mystere.majeur") },
];
sheetData.data.enrichedHtml = {
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(
sheetData.data.system.description ?? "",
{ async: true }
),
};
return sheetData;
}
}