[Feature] Add Default Icons for Document Subtypes

Fixes #458
This commit is contained in:
Joaquin Pereyra 2025-08-04 22:36:04 -03:00
parent b590ee881a
commit dc5b8fe8e8
34 changed files with 206 additions and 13 deletions

View file

@ -19,10 +19,26 @@ export default class DHAncestry extends BaseDataItem {
};
}
/* -------------------------------------------- */
/**@override */
static DEFAULT_ICON = 'systems/daggerheart/assets/icons/documents/items/family-tree.svg';
/* -------------------------------------------- */
/**
* Gets the primary feature.
* @type {foundry.documents.Item|null} Returns the item of the first feature with type "primary" or null if none is found.
*/
get primaryFeature() {
return this.features.find(x => x.type === CONFIG.DH.ITEM.featureSubTypes.primary)?.item;
}
/**
* Gets the secondary feature.
* @type {foundry.documents.Item|null} Returns the item of the first feature with type "secondary" or null if none is found.
*/
get secondaryFeature() {
return this.features.find(x => x.type === CONFIG.DH.ITEM.featureSubTypes.secondary)?.item;
}