Skip to content

Commit

Permalink
Remove dim-to-bright boost from Darkvision
Browse files Browse the repository at this point in the history
  • Loading branch information
dev7355608 committed Aug 6, 2023
1 parent 6aa0741 commit b461b7f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
6 changes: 3 additions & 3 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"email": "[email protected]"
}
],
"version": "1.8.1",
"version": "1.9.0",
"compatibility": {
"minimum": "11.299",
"verified": "11.307"
Expand Down Expand Up @@ -47,8 +47,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/v1.8.1/module.zip",
"changelog": "https://github.com/dev7355608/vision-5e/releases/tag/v1.8.1",
"download": "https://github.com/dev7355608/vision-5e/releases/download/v1.9.0/module.zip",
"changelog": "https://github.com/dev7355608/vision-5e/releases/tag/v1.9.0",
"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
4 changes: 2 additions & 2 deletions scripts/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { DetectionModeTremorsense } from "./detection-modes/tremorsense.mjs";
import { DetectionModeTruesight } from "./detection-modes/truesight.mjs";
import { DetectionModeDetectWitchSight as DetectionModeWitchSight } from "./detection-modes/witch-sight.mjs";
import { VisionModeBlindsight } from "./vision-modes/blindsight.mjs";
import { VisionModeDarkvision } from "./vision-modes/darkvision.mjs";
import { VisionModeDetectEvilAndGood } from "./vision-modes/detect-evil-and-good.mjs";
import { VisionModeDetectMagic } from "./vision-modes/detect-magic.mjs";
import { VisionModeDetectPoisonAndDisease } from "./vision-modes/detect-poison-and-disease.mjs";
Expand Down Expand Up @@ -100,9 +101,8 @@ Hooks.once("init", () => {
registerDetectionMode(new DetectionModeTruesight());
registerDetectionMode(new DetectionModeWitchSight());

renameVisionMode("darkvision", "DND5E.SenseDarkvision");

registerVisionMode(new VisionModeBlindsight());
registerVisionMode(new VisionModeDarkvision());
registerVisionMode(new VisionModeDetectEvilAndGood());
registerVisionMode(new VisionModeDetectMagic());
registerVisionMode(new VisionModeDetectPoisonAndDisease());
Expand Down
22 changes: 22 additions & 0 deletions scripts/vision-modes/darkvision.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* The vision mode for Darkvision.
*/
export class VisionModeDarkvision extends VisionMode {
constructor() {
super({
id: "darkvision",
label: "DND5E.SenseDarkvision",
canvas: {
shader: ColorAdjustmentsSamplerShader,
uniforms: { contrast: 0, saturation: -1, exposure: 0 }
},
lighting: {
background: { visibility: VisionMode.LIGHTING_VISIBILITY.REQUIRED }
},
vision: {
darkness: { adaptive: false },
defaults: { attenuation: 0, contrast: 0, saturation: -1, brightness: 0.1 }
}
});
}
}
7 changes: 2 additions & 5 deletions scripts/vision-modes/ghostly-gaze.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ export class VisionModeGhostlyGaze extends VisionMode {
label: "VISION5E.GhostlyGaze",
canvas: {
shader: ColorAdjustmentsSamplerShader,
uniforms: { contrast: 0, saturation: -1.0, brightness: 0 }
uniforms: { contrast: 0, saturation: -1, exposure: 0 }
},
lighting: {
levels: {
[VisionMode.LIGHTING_LEVELS.DIM]: VisionMode.LIGHTING_LEVELS.BRIGHT
},
background: { visibility: VisionMode.LIGHTING_VISIBILITY.REQUIRED }
},
vision: {
darkness: { adaptive: false },
defaults: { attenuation: 0, contrast: 0, saturation: -1.0, brightness: 0 }
defaults: { attenuation: 0, contrast: 0, saturation: -1, brightness: 0.1 }
}
});
}
Expand Down

0 comments on commit b461b7f

Please sign in to comment.