mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 20:51:07 +01:00
Fix submit on close
This commit is contained in:
parent
6223b05eb1
commit
0d60cd90b6
6 changed files with 27 additions and 6 deletions
|
|
@ -13,6 +13,7 @@ export class DHRoll extends Roll {
|
|||
|
||||
static async build(config={}, message={}) {
|
||||
const roll = await this.buildConfigure(config, message);
|
||||
if(!roll) return;
|
||||
await this.buildEvaluate(roll, config, message={});
|
||||
await this.buildPost(roll, config, message={});
|
||||
return roll;
|
||||
|
|
@ -35,14 +36,13 @@ export class DHRoll extends Roll {
|
|||
// Open Roll Dialog
|
||||
const DialogClass = config.dialog?.class ?? this.DefaultDialog;
|
||||
config = await DialogClass.configure(config, message);
|
||||
if(!config) return;
|
||||
}
|
||||
console.log(config)
|
||||
let roll = new this(config.formula, config.actor, config);
|
||||
|
||||
for ( const hook of config.hooks ) {
|
||||
if ( Hooks.call(`${SYSTEM.id}.post${hook.capitalize()}RollConfiguration`, roll, config, message) === false ) return [];
|
||||
}
|
||||
console.log(roll);
|
||||
|
||||
return roll;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue