This commit is contained in:
WBHarry 2025-07-25 01:45:53 +02:00
parent f0a809266d
commit e8343de4e4
4 changed files with 52 additions and 52 deletions

View file

@ -63,6 +63,26 @@ export default class ClassSheet extends DHBaseItemSheet {
return this.document.system.features.map(x => x.item);
}
/**@inheritdoc */
async _onFirstRender(context, options) {
await super._onFirstRender(context, options);
const paths = [
'subclasses',
'characterGuide.suggestedPrimaryWeapon',
'characterGuide.suggestedSecondaryWeapon',
'characterGuide.suggestedArmor',
'inventory.take',
'inventory.choiceA',
'inventory.choiceB'
];
paths.forEach(path => {
const docs = [].concat(foundry.utils.getProperty(this.document, `system.${path}`) ?? []);
docs.forEach(doc => (doc.apps[this.id] = this));
});
}
/**@inheritdoc */
async _prepareContext(_options) {
const context = await super._prepareContext(_options);