Skip to content

Commit

Permalink
Adding missing basicSight patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Eligarf committed Apr 4, 2024
1 parent a0baf7f commit fed0cbd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v3.14.3
* Dnd5e: Forgot to add checks to `basicSight` in vision-5e

# v3.14.2
* Dnd5e: If vision-5e is enabled, add perception vs stealth checks to the following detection modes: `devilsSight`, `etherealSight`, `hearing`, `lightPerception`, `seeAll`, `seeInvisibility`, and `witchSight`
* Dnd5e: Updated pt-BR translations (thanks Kharmans)
Expand Down
1 change: 1 addition & 0 deletions scripts/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default class Engine {

patchFoundry() {
// Generic Detection mode patching
Stealthy.log(`patching DetectionMode.prototype._canDetect`);
libWrapper.register(
Stealthy.MODULE_ID,
'DetectionMode.prototype._canDetect',
Expand Down
3 changes: 3 additions & 0 deletions scripts/systems/dnd5e.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class Engine5e extends Engine {

// Pick the sight modes in vision-5e that we want Stealthy to affect
let sightModes = [
'CONFIG.Canvas.detectionModes.basicSight._canDetect',
'CONFIG.Canvas.detectionModes.devilsSight._canDetect',
'CONFIG.Canvas.detectionModes.etherealSight._canDetect',
'CONFIG.Canvas.detectionModes.lightPerception._canDetect',
Expand All @@ -117,6 +118,7 @@ class Engine5e extends Engine {
'CONFIG.Canvas.detectionModes.witchSight._canDetect',
];
for (const mode of sightModes) {
Stealthy.log(`patching ${mode}`);
libWrapper.register(
Stealthy.MODULE_ID,
mode,
Expand All @@ -138,6 +140,7 @@ class Engine5e extends Engine {
}

// Lastly, give Stealthy access to the hearing checks
Stealthy.log(`patching CONFIG.Canvas.detectionModes.hearing._canDetect`);
libWrapper.register(
Stealthy.MODULE_ID,
'CONFIG.Canvas.detectionModes.hearing._canDetect',
Expand Down

0 comments on commit fed0cbd

Please sign in to comment.