mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +02:00
Use prepare tabs override instead
This commit is contained in:
parent
c6443d7dc5
commit
26fdd20b0d
1 changed files with 8 additions and 11 deletions
|
|
@ -46,19 +46,16 @@ export default class NPCSheet extends DHBaseActorSheet {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
prepareTabs(context) {
|
/** @inheritdoc */
|
||||||
context.tabs.features.empty = this.document.system.features.length === 0;
|
_prepareTabs(group) {
|
||||||
|
const result = super._prepareTabs(group);
|
||||||
|
if (group === 'primary') {
|
||||||
|
result.features.empty = this.document.system.features.length === 0;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**@inheritdoc */
|
/** @inheritdoc */
|
||||||
async _prepareContext(options) {
|
|
||||||
const context = await super._prepareContext(options);
|
|
||||||
this.prepareTabs(context);
|
|
||||||
|
|
||||||
return context;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**@inheritdoc */
|
|
||||||
async _preparePartContext(partId, context, options) {
|
async _preparePartContext(partId, context, options) {
|
||||||
context = await super._preparePartContext(partId, context, options);
|
context = await super._preparePartContext(partId, context, options);
|
||||||
switch (partId) {
|
switch (partId) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue