b7a0e5d034
Les herbes et les ingrédients peuvent être cherchées/tirées
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
import { SYSTEM_RDD } from "./constants.js";
|
|
import { EnvironmentSheetHelper } from "./environnement.js";
|
|
import { Misc } from "./misc.js";
|
|
|
|
const ITEM_TYPE = 'ingredient';
|
|
export class RdDIngredientItemSheet extends ItemSheet {
|
|
|
|
static register() {
|
|
Items.registerSheet(SYSTEM_RDD, RdDIngredientItemSheet, {
|
|
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() {
|
|
return await EnvironmentSheetHelper.getData(this);
|
|
}
|
|
|
|
activateListeners(html) {
|
|
super.activateListeners(html);
|
|
EnvironmentSheetHelper.activateListeners(this, html);
|
|
}
|
|
|
|
get template() {
|
|
return EnvironmentSheetHelper.template(this.item.type);
|
|
}
|
|
|
|
get title() {
|
|
return EnvironmentSheetHelper.title(this.item);
|
|
}
|
|
}
|