From 54c66d170d4f0aad873e93b8daa81a6b0bb4dbed Mon Sep 17 00:00:00 2001 From: Mallory Allen Date: Sun, 19 Mar 2023 16:39:51 -0400 Subject: [PATCH] :bug: fix audio playing n times where n is the number of players --- scripts/main.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/main.mjs b/scripts/main.mjs index 5154268..2e95465 100644 --- a/scripts/main.mjs +++ b/scripts/main.mjs @@ -17,6 +17,10 @@ Hooks.on("updateCombat", (combat, changed) => { return; } + if (game.user.isGM == false) { + return; + } + if (changed.round) { // This code will run at the start of each round console.log(`Starting round ${combat.round}`); @@ -47,6 +51,10 @@ Hooks.on("updateCombat", (combat, changed) => { }); Hooks.on("deleteCombat", () => { + if (game.user.isGM == false) { + return; + } + if (settings.currentTheme == "none") { return; }