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

Fix check to enable/disable Terrain Ruler coloring/distance #322

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

RikerW
Copy link

@RikerW RikerW commented May 11, 2024

Barely worth a PR.

window.terrainRuler is truthy if it exists, but it should check window.terrainRuler.active to make sure we actually want it on anyway. The check to make sure the variable exists in the first place is probably redundant but I'm being paranoid.

This does have the minor effect of a "desync", where the colors/distance traveled are client-side based on whether the client user has terrain ruler enabled, so they might see something different from the dragger, but that's minimal.

`window.terrainRuler` is truthy if it exists, but it should check `window.terrainRuler.active` to make sure we actually want it on anyway.

This does have the minor effect of a "desync", where the colors/distance traveled are client-side based on whether the client user has terrain ruler enabled, so they might see something different from the dragger, but that's minimal.
@manuelVo
Copy link
Owner

Hi there. Thanks for the PR. I don't think drag ruler should respect the terrain ruler toggle. The toggle makes a lot of sense for the regular ruler, as that one might be used to either measure air-line distance (where terrain doesn't apply) or to measure movement (where the terrain does apply). Since Drag Ruler only ever activates when dragging a token, it only measures movement and as such terrain should always be respected. Are there any notable exceptions to this that I'm missing?

@RikerW
Copy link
Author

RikerW commented May 12, 2024

The original reason this came up is for tokens that should ignore difficult terrain for whatever reason - I'm not sure about all systems, but it was brought up for LANCER originally for both flying tokens & tokens that ignore difficult terrain due to a feature they have (player characters with a specific ability or certain npcs). It means that you have to math their movement independently, which is mildly annoying, so I figured this was a minimally intrusive fix (just toggling it on/off before dragging).

(the full context is somebody had asked in the LANCER discord for something like this for use with flying characters so I fiddled around with it for them)

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.

2 participants