Items now copy over their features to Character

This commit is contained in:
WBHarry 2025-07-05 18:54:57 +02:00
parent 261867a4cc
commit 3d735e6a09
13 changed files with 167 additions and 103 deletions

View file

@ -31,11 +31,11 @@ export default class DHSubclass extends BaseDataItem {
}
get features() {
return {
foundation: this.foundationFeature,
specialization: this.featureState >= 2 ? this.specializationFeature : null,
mastery: this.featureState === 3 ? this.masteryFeature : null
};
return [
{ ...this.foundationFeature.toObject(), identifier: 'foundationFeature' },
{ ...this.specializationFeature.toObject(), identifier: 'specializationFeature' },
{ ...this.masteryFeature.toObject(), identifier: 'masteryFeature' }
];
}
async _preCreate(data, options, user) {