bb7f4c42ad
Pour bénéficier de certains comportements (description...)
48 lines
1.2 KiB
JavaScript
48 lines
1.2 KiB
JavaScript
import { SYSTEM_RDD } from "./constants.js";
|
|
import { EnvironmentSheetHelper } from "./environnement.js";
|
|
import { RdDItemSheet } from "./item-sheet.js";
|
|
import { Misc } from "./misc.js";
|
|
|
|
const ITEM_TYPE = 'herbe';
|
|
|
|
export class RdDHerbeItemSheet extends RdDItemSheet {
|
|
|
|
static register() {
|
|
Items.registerSheet(SYSTEM_RDD, RdDHerbeItemSheet, {
|
|
label: Misc.typeName('Item', ITEM_TYPE),
|
|
types: [ITEM_TYPE],
|
|
makeDefault: true
|
|
});
|
|
}
|
|
|
|
static get defaultOptions() {
|
|
return EnvironmentSheetHelper.defaultOptions(super.defaultOptions, ITEM_TYPE);
|
|
}
|
|
|
|
_getHeaderButtons() {
|
|
return EnvironmentSheetHelper.getHeaderButtons(this, super._getHeaderButtons());
|
|
}
|
|
|
|
setPosition(options = {}) {
|
|
return EnvironmentSheetHelper.setPosition(this, super.setPosition(options));
|
|
}
|
|
|
|
async getData() {
|
|
const formData = await super.getData();
|
|
return await EnvironmentSheetHelper.getData(this, formData);
|
|
}
|
|
|
|
activateListeners(html) {
|
|
super.activateListeners(html);
|
|
EnvironmentSheetHelper.activateListeners(this, html);
|
|
}
|
|
|
|
get template() {
|
|
return EnvironmentSheetHelper.template(this.item.type);
|
|
}
|
|
|
|
get title() {
|
|
return EnvironmentSheetHelper.title(this.item);
|
|
}
|
|
}
|