mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 10:29:54 +02:00
Do not auto expand on setting sheets
This commit is contained in:
parent
9d16bc48ae
commit
02918074a8
2 changed files with 7 additions and 2 deletions
|
|
@ -100,4 +100,7 @@ export default class DHBaseActorSettings extends DHApplicationMixin(ActorSheetV2
|
|||
await this.actor.createEmbeddedDocuments('Item', [itemData]);
|
||||
}
|
||||
}
|
||||
|
||||
/** Setting sheets do not auto extend */
|
||||
async _autoExpandDescriptions() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { getDocFromElement, getDocFromElementSync, tagifyElement } from '../../.
|
|||
const typeSettingsMap = {
|
||||
character: 'extendCharacterDescriptions',
|
||||
adversary: 'extendAdversaryDescriptions',
|
||||
npc: 'extendAdversaryDescriptions',
|
||||
environment: 'extendEnvironmentDescriptions',
|
||||
ancestry: 'extendItemDescriptions',
|
||||
community: 'extendItemDescriptions',
|
||||
|
|
@ -262,7 +263,7 @@ export default function DHApplicationMixin(Base) {
|
|||
|
||||
if (!!this.options.contextMenus.length) this._createContextMenus();
|
||||
|
||||
this.#autoExtendDescriptions(context);
|
||||
this._autoExpandDescriptions(context);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
|
|
@ -630,8 +631,9 @@ export default function DHApplicationMixin(Base) {
|
|||
/**
|
||||
* Extend inventory description when enabled in settings.
|
||||
* @returns {Promise<void>}
|
||||
* @protected
|
||||
*/
|
||||
async #autoExtendDescriptions(context) {
|
||||
async _autoExpandDescriptions(context) {
|
||||
const inventoryItems = this.element.querySelectorAll('.inventory-item[data-item-uuid]');
|
||||
for (const el of inventoryItems) {
|
||||
// Get the doc uuid from the element
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue