mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
* Small random fixes * Added use of ItemLinkFields * Multiclass levelup fixes * Fixed our onCreate methods unintentionally being run on all clients * Remade apps handling * Added for all class items and subclass * Restored foreignDocumentUuidField * Improved * PR fxies * Fixed tooltip enrichment * . * Reverted silly change
29 lines
829 B
JavaScript
29 lines
829 B
JavaScript
import BaseDataItem from './base.mjs';
|
|
import ItemLinkFields from '../../data/fields/itemLinkFields.mjs';
|
|
|
|
export default class DHAncestry extends BaseDataItem {
|
|
/** @inheritDoc */
|
|
static get metadata() {
|
|
return foundry.utils.mergeObject(super.metadata, {
|
|
label: 'TYPES.Item.ancestry',
|
|
type: 'ancestry',
|
|
hasDescription: true
|
|
});
|
|
}
|
|
|
|
/** @inheritDoc */
|
|
static defineSchema() {
|
|
return {
|
|
...super.defineSchema(),
|
|
features: new ItemLinkFields()
|
|
};
|
|
}
|
|
|
|
get primaryFeature() {
|
|
return this.features.find(x => x.type === CONFIG.DH.ITEM.featureSubTypes.primary)?.item;
|
|
}
|
|
|
|
get secondaryFeature() {
|
|
return this.features.find(x => x.type === CONFIG.DH.ITEM.featureSubTypes.secondary)?.item;
|
|
}
|
|
}
|