Skip to content

Commit

Permalink
Don't show Blindsight filter effect if it is the active vision mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dev7355608 committed Dec 6, 2024
1 parent 0478014 commit e2234f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 5 additions & 4 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
"email": "[email protected]"
}
],
"version": "2.5.3",
"version": "2.5.4",
"compatibility": {
"minimum": "12",
"verified": "12"
"verified": "12",
"maximum": "12"
},
"scripts": [
"script.js"
Expand Down Expand Up @@ -60,8 +61,8 @@
},
"url": "https://github.com/dev7355608/vision-5e",
"manifest": "https://github.com/dev7355608/vision-5e/releases/latest/download/module.json",
"download": "https://github.com/dev7355608/vision-5e/releases/download/v2.5.3/module.zip",
"changelog": "https://github.com/dev7355608/vision-5e/releases/tag/v2.5.3",
"download": "https://github.com/dev7355608/vision-5e/releases/download/v2.5.4/module.zip",
"changelog": "https://github.com/dev7355608/vision-5e/releases/tag/v2.5.4",
"bugs": "https://github.com/dev7355608/vision-5e/issues",
"readme": "https://raw.githubusercontent.com/dev7355608/vision-5e/main/README.md",
"license": "https://raw.githubusercontent.com/dev7355608/vision-5e/main/LICENSE"
Expand Down
7 changes: 6 additions & 1 deletion scripts/detection-modes/blindsight.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ export default class DetectionModeBlindsight extends DetectionMode {
}

/** @override */
static getDetectionFilter() {
static getDetectionFilter(visionSource, object) {
if (visionSource?.data.detectionMode === "blindsight"
&& !canvas.effects.testInsideDarkness(object.center, object.document.elevation)) {
return;
}

return this._detectionFilter ??= OutlineOverlayFilter.create({
outlineColor: [1, 1, 1, 1],
thickness: [0, 0],
Expand Down

0 comments on commit e2234f6

Please sign in to comment.