Added LinkedItems for class. Added autoremoval of features and linkeditems when the related item is removed.

This commit is contained in:
WBHarry 2025-07-22 04:48:21 +02:00
parent 6336f2a60f
commit df8b96e9bc
16 changed files with 202 additions and 118 deletions

View file

@ -20,12 +20,14 @@ export default class DHAncestry extends BaseDataItem {
}
get primaryFeature() {
return this.features.find(x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.featureSubTypes.primary);
return this.features.find(
x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.itemLinkFeatureTypes.primary
);
}
get secondaryFeature() {
return this.features.find(
x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.featureSubTypes.secondary
x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.itemLinkFeatureTypes.secondary
);
}
}