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

@ -56,6 +56,10 @@ export default class DHClass extends BaseDataItem {
return this.hopeFeatures.length > 0 ? this.hopeFeatures[0] : null;
}
get features() {
return [...this.hopeFeatures.filter(x => x), ...this.classFeatures.filter(x => x)];
}
async _preCreate(data, options, user) {
const allowed = await super._preCreate(data, options, user);
if (allowed === false) return;