Skip to content

checkLightLevel 0.6.0: Jumpgate (pathv2) wall support, dmOnly setting - #2386

Open
ooshhub wants to merge 1 commit into
Roll20:masterfrom
ooshhub:checkLightLevel-0.6.0-jumpgate-pathv2
Open

ooshhub wants to merge 1 commit into
Roll20:masterfrom
ooshhub:checkLightLevel-0.6.0-jumpgate-pathv2

Conversation

@ooshhub

@ooshhub ooshhub commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Update to an existing script.

Why

On Jumpgate, dynamic lighting walls are pathv2 objects. The script only looked for classic path objects, so it found no walls and reported tokens as lit through them.

Changes

  • Jumpgate walls: reads both path and pathv2 walls on the dynamic lighting layer, and uses PathMath.toSegments() for the geometry.
  • Dependency: still Path Math, now 1.7 or later (the first release that reads pathv2). The script reports a clear error on older versions.
  • One-way walls no longer block light from both sides for some drawing directions.
  • Crash fix: !checklight with a wall or other non-token selected threw a TypeError.
  • New --dmOnly setting: GM only by default, as before. !checklight --dmOnly lets a GM allow players to check their own tokens.
  • isLitBy() returns its error message in err.

Files

  • checkLightLevel/0.6.0/checkLightLevel.js (new version)
  • checkLightLevel/checkLightLevel.js (root copy, identical)
  • checkLightLevel/script.json: version 0.6.0, previousversions ["0.5.0"], description updated
  • checkLightLevel/readme.md: commands, report output, limitations, changelog

Testing

  • Tested by the author in a live Jumpgate game: pathv2 walls block light, and the selection crash is fixed.
  • One-way walls on Jumpgate and a classic-tabletop regression pass are still to be confirmed, which is why this is a draft.

🤖 Generated by Claudia

- Read both path and pathv2 walls so light is blocked on Jumpgate, using
  PathMath.toSegments() for the geometry. Requires Path Math 1.7 or later.
- Fix one-way walls blocking light from both sides for some drawing
  directions.
- Fix a crash when a wall or other non-token was selected.
- Add a persisted dmOnly setting (default on); `!checklight --dmOnly`
  lets a GM toggle whether players may use the command.
- isLitBy() returns its error message in `err`.

Co-Authored-By: Claudia <noreply@anthropic.com>
@ooshhub
ooshhub force-pushed the checkLightLevel-0.6.0-jumpgate-pathv2 branch from bcf5e0b to da2b825 Compare December 1, 2026 23:24
@ooshhub
ooshhub marked this pull request as ready for review December 1, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant