Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Terrain Layer Depth property is ignored when PF2e Drag Ruler is Enabled #49

Open
Tridus opened this issue Apr 6, 2023 · 1 comment

Comments

@Tridus
Copy link

Tridus commented Apr 6, 2023

Enhanced Terrain Layer has a Depth property which sets the depth of difficult terrain. For example, the attached image applies difficult terrain from 0' elevation to 60' elevation. I've confirmed that this works in PF2e games with Enhanced Terrain Layer, Drag Ruler, and Terrain Ruler enabled.

This breaks if PF2e Drag Ruler integration is enabled: difficult terrain with these settings will apply only at exactly 0' elevation. The expected behavior is that it should apply anywhere from 0' to 60' elevation (same as with the module disabled).

image

@ironmonk88
Copy link

Line 112 in main.js should read.
if(terrain[ii].object.document.top >= tokenElevation && terrain[ii].object.document.bottom <= tokenElevation && (token?.actor?.alliance ?? "none" !== (terrain[ii].object?.actor?.alliance ?? 0))){

velara added a commit that referenced this issue Jun 12, 2023
Incorporated changes from #49 
Courtesy of Ironmonk.
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

No branches or pull requests

2 participants