mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-07 21:34:16 +02:00
[Fix] Preload ancestry and community features in description (#1967)
* Preload ancestry and community features in description * Corrected comments --------- Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
parent
5ac4fc3b9c
commit
c0c9095847
4 changed files with 13 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import BaseDataItem from './base.mjs';
|
||||
import ItemLinkFields from '../../data/fields/itemLinkFields.mjs';
|
||||
import { getFeaturesHTMLData } from '../../helpers/utils.mjs';
|
||||
import { fromUuids, getFeaturesHTMLData } from '../../helpers/utils.mjs';
|
||||
|
||||
export default class DHAncestry extends BaseDataItem {
|
||||
/** @inheritDoc */
|
||||
|
|
@ -45,6 +45,10 @@ export default class DHAncestry extends BaseDataItem {
|
|||
|
||||
/**@inheritdoc */
|
||||
async getDescriptionData() {
|
||||
// Preload all ancestry features for acquisition from the cache
|
||||
// todo: make feature acquisition async and replace feature helpers for methods
|
||||
await fromUuids(this._source.features.map(f => f.item));
|
||||
|
||||
const baseDescription = this.description;
|
||||
const features = await getFeaturesHTMLData(this.features);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue