Add the item list compatibility for the Attribute Only Sheet
This commit is contained in:
parent
40f0e1ea2c
commit
6b03d62234
1 changed files with 12 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import { PlayerSheet } from "./PlayerSheet.mjs";
|
||||
|
||||
const removedParts = new Set([`content`, `tabs`]);
|
||||
|
||||
export class AttributeOnlyPlayerSheet extends PlayerSheet {
|
||||
// #region Options
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -10,6 +12,7 @@ export class AttributeOnlyPlayerSheet extends PlayerSheet {
|
|||
|
||||
static get PARTS() {
|
||||
const parts = super.PARTS;
|
||||
delete parts.tabs;
|
||||
delete parts.content;
|
||||
return parts;
|
||||
};
|
||||
|
|
@ -19,8 +22,15 @@ export class AttributeOnlyPlayerSheet extends PlayerSheet {
|
|||
_configureRenderOptions(options) {
|
||||
super._configureRenderOptions(options);
|
||||
|
||||
// don't attempt to rerender the content
|
||||
options.parts = options.parts?.filter(partID => partID !== `content`);
|
||||
// don't attempt to rerender the parts that get removed
|
||||
options.parts = options.parts?.filter(partID => !removedParts.has(partID));
|
||||
};
|
||||
// #endregion Lifecycle
|
||||
|
||||
// #region Data Prep
|
||||
async _prepareItems(ctx) {
|
||||
await super._prepareItems(ctx);
|
||||
ctx.tabActive = true;
|
||||
};
|
||||
// #endregion Data Prep
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue