From a9e0d17b2d5b16a9c33447b5f66ac1775212e37c Mon Sep 17 00:00:00 2001 From: Stendarpaval Date: Tue, 28 Dec 2021 13:33:28 +0100 Subject: [PATCH] 0.3.13 - Fixed initiative bugs caused by Mob Attack Tool in V9, as reported in issue #48. - This means that Mob Attack Tool no longer wraps the 'rollInitiative' function, which may interfere with the way Combat Tracker Groups handles initiative. On the other hand, it also makes Mob Attack Tool compatible with the newer versions of the Group Initiative module. - Fixed a bug related to showing Dice So Nice animations for GM attack rolls using Mob Attack Tool by following @veithflo's advice in issue #47. - Bumped compatible core version to V9. --- module.json | 6 +++--- scripts/individualRolls.js | 2 +- scripts/mobAttack.js | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/module.json b/module.json index 4c1f7c0..6f3c481 100644 --- a/module.json +++ b/module.json @@ -16,9 +16,9 @@ } ], "url": "https://github.com/Stendarpaval/mob-attack-tool", - "version": "0.3.12", + "version": "0.3.13", "minimumCoreVersion": "0.8.8", - "compatibleCoreVersion": "0.8.9", + "compatibleCoreVersion": "9", "system": ["dnd5e"], "esmodules": [ "scripts/mobAttack.js" @@ -27,5 +27,5 @@ "styles/mob-attack-tool.css" ], "manifest": "https://raw.githubusercontent.com/Stendarpaval/mob-attack-tool/main/module.json", - "download": "https://github.com/Stendarpaval/mob-attack-tool/releases/download/0.3.12/module.zip" + "download": "https://github.com/Stendarpaval/mob-attack-tool/releases/download/0.3.13/module.zip" } diff --git a/scripts/individualRolls.js b/scripts/individualRolls.js index edba15d..da60533 100644 --- a/scripts/individualRolls.js +++ b/scripts/individualRolls.js @@ -69,7 +69,7 @@ export async function rollMobAttackIndividually(data) { // Check settings for rolling 3d dice from Dice So Nice if (game.user.getFlag(moduleName,"showIndividualAttackRolls") ?? game.settings.get(moduleName,"showIndividualAttackRolls")) { if (game.modules.get("dice-so-nice")?.active && game.settings.get(moduleName, "enableDiceSoNice")) { - if (!game.settings.get(moduleName, "hideDSNAttackRoll") || !game.user.isGM) game.dice3d.showForRoll(attackRoll); + if (!game.settings.get(moduleName, "hideDSNAttackRoll") || !game.user.isGM) game.dice3d.showForRoll(attackRoll, game.user, game.settings.get("core", "rollMode") === 'publicroll'); } } diff --git a/scripts/mobAttack.js b/scripts/mobAttack.js index db47915..7394856 100644 --- a/scripts/mobAttack.js +++ b/scripts/mobAttack.js @@ -13,8 +13,9 @@ Hooks.once("init", () => { initSettings(); initMobAttackTool(); - console.log("Mob Attack Tool | Wrapping rollInitiative..."); - libWrapper.register(moduleName, "Combat.prototype.rollInitiative", matRollInitiative, "OVERRIDE"); + // The lines below are commented out to restore combat tracker functionality in V9 + // console.log("Mob Attack Tool | Wrapping rollInitiative..."); + // libWrapper.register(moduleName, "Combat.prototype.rollInitiative", matRollInitiative, "OVERRIDE"); const dialogs = new Map(); const storedHooks = {};