Skip to content

Commit

Permalink
fixes #60 by using the updated hook parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
kaelad02 authored Feb 23, 2024
1 parent fc712c2 commit 3ec5525
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 3.3.2

- bug fix: [#60](https://github.com/kaelad02/adv-reminder/issues/60) Fix tool checks to show advantage and messages again after the check was moved from the item to the actor

# 3.3.1

- bug fix: [#56](https://github.com/kaelad02/adv-reminder/issues/56) Fully support messages on damage rolls other than attacks
Expand Down
9 changes: 5 additions & 4 deletions src/rollers/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,15 @@ export default class CoreRollerHooks {
new SkillReminder(actor, skillId, this.checkArmorStealth).updateOptions(config);
}

preRollToolCheck(item, config) {
preRollToolCheck(actor, config, toolId) {
debug("preRollToolCheck hook called");

if (this.isFastForwarding(config)) return;

new AbilityCheckMessage(item.actor, item.system.ability).addMessage(config);
if (showSources) new AbilityCheckSource(item.actor, item.system.ability).updateOptions(config);
new AbilityCheckReminder(item.actor, item.system.ability).updateOptions(config);
const ability = config.data.defaultAbility;
new AbilityCheckMessage(actor, ability).addMessage(config);
if (showSources) new AbilityCheckSource(actor, ability).updateOptions(config);
new AbilityCheckReminder(actor, ability).updateOptions(config);
}

preRollDeathSave(actor, config) {
Expand Down
7 changes: 4 additions & 3 deletions src/rollers/midi.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ export default class MidiRollerHooks extends CoreRollerHooks {
if (showSources) new SkillSource(actor, skillId, true).updateOptions(config);
}

preRollToolCheck(item, config) {
preRollToolCheck(actor, config, toolId) {
debug("preRollToolCheck hook called");

if (this.isFastForwarding(config)) return;

new AbilityCheckMessage(item.actor, item.system.ability).addMessage(config);
if (showSources) new AbilityCheckSource(item.actor, item.system.ability).updateOptions(config);
const ability = config.data.defaultAbility;
new AbilityCheckMessage(actor, ability).addMessage(config);
if (showSources) new AbilityCheckSource(actor, ability).updateOptions(config);
}

preRollDeathSave(actor, config) {
Expand Down
9 changes: 5 additions & 4 deletions src/rollers/rsr.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,18 @@ export default class ReadySetRollHooks extends CoreRollerHooks {
new SkillReminder(actor, skillId, this.checkArmorStealth).updateOptions(config);
}

preRollToolCheck(item, config) {
preRollToolCheck(actor, config, toolId) {
debug("preRollToolCheck hook called");

const ability = config.data.defaultAbility;
if (this._doMessages(config)) {
new AbilityCheckMessage(item.actor, item.system.ability).addMessage(config);
new AbilityCheckMessage(actor, ability).addMessage(config);
if (showSources)
new AbilityCheckSource(item.actor, item.system.ability).updateOptions(config);
new AbilityCheckSource(actor, ability).updateOptions(config);
}

if (this._doReminder(config))
new AbilityCheckReminder(item.actor, item.system.ability).updateOptions(config);
new AbilityCheckReminder(actor, ability).updateOptions(config);
}

preRollDeathSave(actor, config) {
Expand Down

0 comments on commit 3ec5525

Please sign in to comment.