mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-23 19:09:55 +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]);
|
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 = {
|
const typeSettingsMap = {
|
||||||
character: 'extendCharacterDescriptions',
|
character: 'extendCharacterDescriptions',
|
||||||
adversary: 'extendAdversaryDescriptions',
|
adversary: 'extendAdversaryDescriptions',
|
||||||
|
npc: 'extendAdversaryDescriptions',
|
||||||
environment: 'extendEnvironmentDescriptions',
|
environment: 'extendEnvironmentDescriptions',
|
||||||
ancestry: 'extendItemDescriptions',
|
ancestry: 'extendItemDescriptions',
|
||||||
community: 'extendItemDescriptions',
|
community: 'extendItemDescriptions',
|
||||||
|
|
@ -262,7 +263,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
|
|
||||||
if (!!this.options.contextMenus.length) this._createContextMenus();
|
if (!!this.options.contextMenus.length) this._createContextMenus();
|
||||||
|
|
||||||
this.#autoExtendDescriptions(context);
|
this._autoExpandDescriptions(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritDoc */
|
/** @inheritDoc */
|
||||||
|
|
@ -630,8 +631,9 @@ export default function DHApplicationMixin(Base) {
|
||||||
/**
|
/**
|
||||||
* Extend inventory description when enabled in settings.
|
* Extend inventory description when enabled in settings.
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
|
* @protected
|
||||||
*/
|
*/
|
||||||
async #autoExtendDescriptions(context) {
|
async _autoExpandDescriptions(context) {
|
||||||
const inventoryItems = this.element.querySelectorAll('.inventory-item[data-item-uuid]');
|
const inventoryItems = this.element.querySelectorAll('.inventory-item[data-item-uuid]');
|
||||||
for (const el of inventoryItems) {
|
for (const el of inventoryItems) {
|
||||||
// Get the doc uuid from the element
|
// Get the doc uuid from the element
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue