foundryvtt-reve-de-dragon/module/item-herbe-sheet.js

46 lines
1.1 KiB
JavaScript
Raw Normal View History

import { SYSTEM_RDD } from "./constants.js";
import { EnvironmentSheetHelper as EnvironmentItemSheet } from "./environnement.js";
import { Misc } from "./misc.js";
const ITEM_TYPE = 'herbe';
export class RdDHerbeItemSheet extends ItemSheet {
static register() {
Items.registerSheet(SYSTEM_RDD, RdDHerbeItemSheet, {
label: Misc.typeName('Item', ITEM_TYPE),
types: [ITEM_TYPE],
makeDefault: true
});
}
static get defaultOptions() {
return EnvironmentItemSheet.defaultOptions(super.defaultOptions, ITEM_TYPE);
}
_getHeaderButtons() {
return EnvironmentItemSheet.getHeaderButtons(this, super._getHeaderButtons());
}
setPosition(options = {}) {
return EnvironmentItemSheet.setPosition(this, super.setPosition(options));
}
async getData() {
return await EnvironmentItemSheet.getData(this);
}
activateListeners(html) {
super.activateListeners(html);
EnvironmentItemSheet.activateListeners(this, html);
}
get template() {
return EnvironmentItemSheet.template(this.item.type);
}
get title() {
return EnvironmentItemSheet.title(this.item);
}
}