@vttforge/core / BaseActorSheet
Function: BaseActorSheet()
BaseActorSheet():
SheetBaseCtor
Build the BaseActorSheet for the current Foundry runtime. See module header for the boilerplate this base eliminates.
Returns
Example
ts
class CharacterSheet extends BaseActorSheet() {
static DEFAULT_OPTIONS = foundry.utils.mergeObject(
super.DEFAULT_OPTIONS,
{ classes: ['my-system'], position: { width: 720 } },
);
static PARTS = { ... };
static TABS = {
primary: {
tabs: [
{ id: 'features', group: 'primary', label: 'Features' },
{ id: 'inventory', group: 'primary', label: 'Inventory' },
],
initial: 'features',
},
};
static DRAG_DROP = [{ dragSelector: '.item[draggable=true]', dropSelector: null }];
async onDropItem(item, event) {
if (item.type !== 'weapon') return false;
// …fall through to super by returning undefined.
}
}