mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Improved
This commit is contained in:
parent
f0a809266d
commit
e8343de4e4
4 changed files with 52 additions and 52 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue