mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Merge 148aca7235 into 0b343c9f52
This commit is contained in:
commit
4c1dbee374
13 changed files with 269 additions and 40 deletions
|
|
@ -197,6 +197,8 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
let config = this.prepareConfig(event);
|
||||
if (!config) return;
|
||||
|
||||
await this.addEffects(config);
|
||||
|
||||
if (Hooks.call(`${CONFIG.DH.id}.preUseAction`, this, config) === false) return;
|
||||
|
||||
// Display configuration window if necessary
|
||||
|
|
@ -263,6 +265,16 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
return config;
|
||||
}
|
||||
|
||||
/** */
|
||||
async addEffects(config) {
|
||||
let effects = [];
|
||||
if (this.actor) {
|
||||
effects = Array.from(await this.actor.allApplicableEffects());
|
||||
}
|
||||
|
||||
config.effects = effects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used to know if a configuration dialog must be shown or not when there is no roll.
|
||||
* @param {*} config Object that contains workflow datas. Usually made from Action Fields prepareConfig methods.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue