40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
import BoLBaseItemSheet from "./base-item-sheet.mjs"
|
|
|
|
/**
|
|
* Item Sheet for "item" type items (equipment, weapons, etc.)
|
|
* @extends {BoLBaseItemSheet}
|
|
*/
|
|
export default class BoLItemSheet extends BoLBaseItemSheet {
|
|
|
|
/** @override */
|
|
static DEFAULT_OPTIONS = {
|
|
...super.DEFAULT_OPTIONS,
|
|
classes: [...super.DEFAULT_OPTIONS.classes, "item-type-item"],
|
|
}
|
|
|
|
/** @override */
|
|
static PARTS = {
|
|
main: {
|
|
template: "systems/bol/templates/item/item-sheet.hbs",
|
|
},
|
|
}
|
|
|
|
/** @override */
|
|
async _prepareContext() {
|
|
const context = await super._prepareContext()
|
|
|
|
// Add item-specific context
|
|
context.isItem = true
|
|
context.isEquipment = context.category === "equipment"
|
|
context.isWeapon = context.category === "weapon"
|
|
context.isProtection = context.category === "protection"
|
|
context.isSpell = context.category === "spell"
|
|
context.isAlchemy = context.category === "alchemy"
|
|
context.isCapacity = context.category === "capacity"
|
|
context.isMagical = context.category === "magical"
|
|
context.isVehicle = context.category === "vehicle"
|
|
|
|
return context
|
|
}
|
|
}
|