Skip to content

Commit

Permalink
prevent dependency checks on module unlock
Browse files Browse the repository at this point in the history
  • Loading branch information
esheyw committed Jun 6, 2024
1 parent 04c2541 commit f924b42
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v2.0.3

- Prevent running dependency checks when unlocking a module

## v2.0.2

- Attempt number two at fixing packaging issue
Expand Down
13 changes: 8 additions & 5 deletions scripts/apps/FindTheCulpritApp.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,14 @@ export class FindTheCulpritApp extends FormApplication {
const el = event.currentTarget;
const ignoreCheckboxen = ["lockLibraries", "mute"];
if (ignoreCheckboxen.includes(el.name)) return;
if (el.name.startsWith("locks") && !this.#mute) {
AudioHelper.play({
src: `sounds/doors/industrial/${el.checked ? "lock" : "unlock"}.ogg`,
volume: game.settings.get("core", "globalAmbientVolume"),
});
if (el.name.startsWith("locks")) {
if (!this.#mute) {
AudioHelper.play({
src: `sounds/doors/industrial/${el.checked ? "lock" : "unlock"}.ogg`,
volume: game.settings.get("core", "globalAmbientVolume"),
});
}
if (!el.checked) return; // don't trigger dependency checks for unlocking
}
const modID = el.name.split(".")[1];
const wrongStateDeps = this.#checkDepenencies(modID) ?? [];
Expand Down

0 comments on commit f924b42

Please sign in to comment.