This commit is contained in:
Vlyan
2020-12-08 18:48:02 +01:00
40 changed files with 615 additions and 229 deletions

View File

@@ -1,21 +1,20 @@
import { L5RItemSheet } from "./item-sheet.js";
import { ItemSheetL5r5e } from "./item-sheet.js";
/**
* @extends {ItemSheet}
*/
export class L5RFeatSheet extends L5RItemSheet {
* @extends {ItemSheet}
*/
export class FeatSheetL5r5e extends ItemSheetL5r5e {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r", "sheet", "feat"],
template: "systems/l5r/templates/item/feat-sheet.html",
template: "systems/l5r5e/templates/item/feat-sheet.html",
width: 520,
height: 480,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
});
}
/** @override */
getData() {
const sheetData = super.getData();
@@ -33,19 +32,18 @@ export class L5RFeatSheet extends L5RItemSheet {
*/
activateListeners(html) {
super.activateListeners(html);
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
}
/**
* Update feat with the data from the sheet.
* @param event
* @param formData
* @param event
* @param formData
*/
_updateObject(event, formData) {
// Update the Item
return this.object.update(formData);
}
}
}