mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
test
This commit is contained in:
parent
450fe60db6
commit
0eb5a7276f
3 changed files with 13 additions and 2 deletions
|
|
@ -264,3 +264,7 @@ Hooks.on('renderJournalDirectory', async (tab, html, _, options) => {
|
|||
};
|
||||
}
|
||||
});
|
||||
|
||||
Hooks.on(`${CONFIG.DH.id}.postRollDuality`, async(roll, config, message) => {
|
||||
console.log(roll, config, message)
|
||||
});
|
||||
|
|
@ -19,7 +19,7 @@ export default class DHRoll extends Roll {
|
|||
}
|
||||
|
||||
static async buildConfigure(config = {}, message = {}) {
|
||||
config.hooks = [...(config.hooks ?? []), ''];
|
||||
config.hooks = [...this.getHooks(), ''];
|
||||
config.dialog ??= {};
|
||||
for (const hook of config.hooks) {
|
||||
if (Hooks.call(`${CONFIG.DH.id}.preRoll${hook.capitalize()}`, config, message) === false) return null;
|
||||
|
|
@ -94,6 +94,10 @@ export default class DHRoll extends Roll {
|
|||
config.dialog.configure ??= !(config.event.shiftKey || config.event.altKey || config.event.ctrlKey);
|
||||
}
|
||||
|
||||
static getHooks(hooks) {
|
||||
return hooks ?? [];
|
||||
}
|
||||
|
||||
formatModifier(modifier) {
|
||||
const numTerm = modifier < 0 ? '-' : '+';
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -79,7 +79,10 @@ export default class DualityRoll extends D20Roll {
|
|||
return game.i18n.localize(label);
|
||||
}
|
||||
|
||||
updateFormula() {}
|
||||
static getHooks(hooks) {
|
||||
|
||||
return [...(hooks ?? []), 'Duality'];
|
||||
}
|
||||
|
||||
createBaseDice() {
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue