mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-19 00:19:03 +01:00
Added LinkedItems for class. Added autoremoval of features and linkeditems when the related item is removed.
This commit is contained in:
parent
6336f2a60f
commit
df8b96e9bc
16 changed files with 202 additions and 118 deletions
|
|
@ -7,7 +7,8 @@ export default class DHSubclass extends BaseDataItem {
|
|||
return foundry.utils.mergeObject(super.metadata, {
|
||||
label: 'TYPES.Item.subclass',
|
||||
type: 'subclass',
|
||||
hasDescription: true
|
||||
hasDescription: true,
|
||||
isItemLinkable: true
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -30,19 +31,19 @@ export default class DHSubclass extends BaseDataItem {
|
|||
|
||||
get foundationFeatures() {
|
||||
return this.features.filter(
|
||||
x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.featureSubTypes.foundation
|
||||
x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.itemLinkFeatureTypes.foundation
|
||||
);
|
||||
}
|
||||
|
||||
get specializationFeatures() {
|
||||
return this.features.filter(
|
||||
x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.featureSubTypes.specialization
|
||||
x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.itemLinkFeatureTypes.specialization
|
||||
);
|
||||
}
|
||||
|
||||
get masteryFeatures() {
|
||||
return this.features.filter(
|
||||
x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.featureSubTypes.mastery
|
||||
x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.itemLinkFeatureTypes.mastery
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue