Amelioration fiche items

This commit is contained in:
2024-02-29 22:35:12 +01:00
parent 3b98a18ee0
commit 6b1ecb6353
30 changed files with 389 additions and 455 deletions

View File

@ -9,7 +9,7 @@ export class TeDeumItemSheet extends ItemSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["fvtt-tedeum", "sheet", "item"],
classes: ["fvtt-te-deum", "sheet", "item"],
template: "systems/fvtt-te-deum/templates/item-sheet.hbs",
dragDrop: [{ dragSelector: null, dropSelector: null }],
width: 620,
@ -45,6 +45,7 @@ export class TeDeumItemSheet extends ItemSheet {
cssClass: this.isEditable ? "editable" : "locked",
system: duplicate(this.object.system),
config: duplicate(game.system.tedeum.config),
competences: TeDeumUtility.getCompetencesForDropDown(),
limited: this.object.limited,
options: this.options,
owner: this.document.isOwner,
@ -52,6 +53,10 @@ export class TeDeumItemSheet extends ItemSheet {
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }),
isGM: game.user.isGM
}
if (this.object.type == "education") {
TeDeumUtility.prepareEducationContent(formData);
}
this.options.editable = !(this.object.origin == "embeddedItem");
console.log("ITEM DATA", formData, this);