Added warrior (#570)

This commit is contained in:
WBHarry 2025-08-04 02:04:05 +02:00 committed by GitHub
parent 0947a75c32
commit 2ee56e5876
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 1042 additions and 6 deletions

View file

@ -80,10 +80,17 @@ export default class ClassSheet extends DHBaseItemSheet {
'inventory.choiceB'
];
paths.forEach(path => {
const docs = [].concat(foundry.utils.getProperty(this.document, `system.${path}`) ?? []);
docs.forEach(doc => (doc.apps[this.id] = this));
});
for (let path of paths) {
const docDatas = [].concat(foundry.utils.getProperty(this.document, `system.${path}`) ?? []);
const docs = [];
for (var docData of docDatas) {
const doc = await foundry.utils.fromUuid(docData.uuid);
docs.push(doc);
}
docs.filter(doc => doc).forEach(doc => (doc.apps[this.id] = this));
}
}
/**@inheritdoc */