Skip to content

Commit

Permalink
Merge pull request #59 from kaelad02/bugFixes1
Browse files Browse the repository at this point in the history
Fix some post 3.0-compatibility bugs
  • Loading branch information
kaelad02 authored Feb 22, 2024
2 parents 787f1ee + 79791af commit fc712c2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 3.3.1

- bug fix: [#56](https://github.com/kaelad02/adv-reminder/issues/56) Fully support messages on damage rolls other than attacks
- bug fix: [#58](https://github.com/kaelad02/adv-reminder/issues/58) Fixed integration with Ready Set Roll after the 3.0-compatibility release

# 3.3.0

- bug fix: 3.0.0 compatibility for Messages and Souces from effects on items
Expand Down
9 changes: 5 additions & 4 deletions src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ Hooks.once("DAE.setupComplete", () => {

const actionTypes =
game.system.id === "sw5e" ? ["mwak", "rwak", "mpak", "rpak"] : ["mwak", "rwak", "msak", "rsak"];
actionTypes.forEach((actionType) => {
fields.push(`flags.adv-reminder.message.attack.${actionType}`);
fields.push(`flags.adv-reminder.message.damage.${actionType}`);
});
actionTypes.forEach((actionType) => fields.push(`flags.adv-reminder.message.attack.${actionType}`));

Object.keys(CONFIG.DND5E.itemActionTypes).forEach((actionType) =>
fields.push(`flags.adv-reminder.message.damage.${actionType}`)
);

Object.keys(CONFIG.DND5E.abilities).forEach((abilityId) => {
fields.push(`flags.adv-reminder.message.attack.${abilityId}`);
Expand Down
9 changes: 6 additions & 3 deletions src/rollers/rsr.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ import CoreRollerHooks from "./core.js";
*/
export default class ReadySetRollHooks extends CoreRollerHooks {
init() {
super.init();
// delay registering these dnd5e hooks so they run after RSR's hooks
Hooks.once("setup", () => {
super.init();

// register another hook for CriticalReminder
Hooks.on("dnd5e.useItem", this.useItem.bind(this));
// register another hook for CriticalReminder
Hooks.on("dnd5e.useItem", this.useItem.bind(this));
});
}

preRollAttack(item, config) {
Expand Down

0 comments on commit fc712c2

Please sign in to comment.