mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
FEAT: create common method for documents sheets FEAT: create BaseActorSheet and implementation
30 lines
No EOL
695 B
JavaScript
30 lines
No EOL
695 B
JavaScript
import DHApplicationMixin from './application-mixin.mjs';
|
|
|
|
const { ActorSheetV2 } = foundry.applications.sheets;
|
|
|
|
/**
|
|
* A base actor sheet extending {@link ActorSheetV2} via {@link DHApplicationMixin}
|
|
* @extends ActorSheetV2
|
|
* @mixes DHSheetV2
|
|
*/
|
|
export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) {
|
|
/** @inheritDoc */
|
|
static DEFAULT_OPTIONS = {
|
|
classes: ['actor'],
|
|
position: {
|
|
width: 480,
|
|
},
|
|
form: {
|
|
submitOnChange: true
|
|
},
|
|
actions: {},
|
|
dragDrop: []
|
|
};
|
|
|
|
async _prepareContext(_options) {
|
|
const context = await super._prepareContext(_options);
|
|
context.isNPC = this.document.isNPC;
|
|
|
|
return context;
|
|
}
|
|
} |