mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Beastform Improvements (#294)
* BeastformEffect is editable. Added SubjectTexture field. * Using handlebars disabled helper
This commit is contained in:
parent
61f04df765
commit
861dfd977d
7 changed files with 81 additions and 32 deletions
|
|
@ -30,8 +30,17 @@ export default class BeastformSheet extends DHBaseItemSheet {
|
|||
};
|
||||
|
||||
/**@inheritdoc */
|
||||
async _preparePartContext(partId, context) {
|
||||
await super._preparePartContext(partId, context);
|
||||
async _prepareContext(_options) {
|
||||
const context = await super._prepareContext(_options);
|
||||
|
||||
context.document = context.document.toObject();
|
||||
context.document.effects = this.document.effects.map(effect => {
|
||||
const data = effect.toObject();
|
||||
data.id = effect.id;
|
||||
if (effect.type === 'beastform') data.mandatory = true;
|
||||
|
||||
return data;
|
||||
});
|
||||
|
||||
return context;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue