2022-08-29 12:22:04 +02:00
|
|
|
// Our Item Sheet extends the default
|
|
|
|
export default class RMSSSpellSheet extends ItemSheet {
|
|
|
|
|
|
|
|
// Set the height and width
|
|
|
|
static get defaultOptions() {
|
|
|
|
return mergeObject(super.defaultOptions, {
|
|
|
|
width: 530,
|
|
|
|
height: 440,
|
|
|
|
classes: ["rmss", "sheet", "item"]
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// If our sheet is called here it is.
|
|
|
|
get template() {
|
|
|
|
return `systems/rmss/templates/sheets/spells/rmss-spell-sheet.html`;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Make the data available to the sheet template
|
2022-09-05 02:15:56 +02:00
|
|
|
async getData() {
|
|
|
|
const baseData = await super.getData();
|
|
|
|
|
|
|
|
var enrichedDescription = await TextEditor.enrichHTML(this.item.system.description, {async: true});
|
2022-08-29 12:22:04 +02:00
|
|
|
|
|
|
|
let sheetData = {
|
|
|
|
owner: this.item.isOwner,
|
|
|
|
editable :this.isEditable,
|
|
|
|
item: baseData.item,
|
2022-09-05 02:15:56 +02:00
|
|
|
system: baseData.item.system,
|
|
|
|
config: CONFIG.rmss,
|
|
|
|
enrichedDescription: enrichedDescription
|
2022-08-29 12:22:04 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
return sheetData;
|
|
|
|
}
|
|
|
|
}
|