mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Fix] Subclass Links (#1069)
* Attempt at making subclass aware of its class * Update compendium classes/subclasses * Fixed multiclass * Update compenidum browser subclass class filter * Added migration for subclass.linkedClass * Using foundry's isNewer function rather than custom one * Added migration for existing actor features --------- Co-authored-by: Dapoolp <elcatnet@gmail.com>
This commit is contained in:
parent
0b2694b007
commit
46ea4addd0
41 changed files with 479 additions and 391 deletions
|
|
@ -317,7 +317,7 @@ export default class DhCharacter extends BaseDataActor {
|
|||
}
|
||||
|
||||
get multiclass() {
|
||||
const value = this.parent.items.find(x => x.type === 'Class' && x.system.isMulticlass);
|
||||
const value = this.parent.items.find(x => x.type === 'class' && x.system.isMulticlass);
|
||||
const subclass = this.parent.items.find(x => x.type === 'subclass' && x.system.isMulticlass);
|
||||
|
||||
return {
|
||||
|
|
@ -443,7 +443,9 @@ export default class DhCharacter extends BaseDataActor {
|
|||
classFeatures.push(item);
|
||||
} else if (item.system.originItemType === CONFIG.DH.ITEM.featureTypes.subclass.id) {
|
||||
if (this.class.subclass) {
|
||||
const subclassState = this.class.subclass.system.featureState;
|
||||
const prop = item.system.multiclassOrigin ? 'multiclass' : 'class';
|
||||
const subclassState = this[prop].subclass?.system?.featureState;
|
||||
if (!subclassState) continue;
|
||||
|
||||
if (
|
||||
item.system.identifier === CONFIG.DH.ITEM.featureSubTypes.foundation ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue