Consistently render movement with different fog and vision settings #4558
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Identify the Bug or Feature request
Addresses #4081
Addresses #4544
Description of the Change
For GMs, nothing about movement rendering should have changed, so the path and labels should always be rendered in GM view if available. For players, the new approach boils down to this:
Those cases are not mutually exclusive, and they apply regardless of server settings, i.e., whether Individual FOW is toggled or not.
I've kept the owner logic in place from before. I.e., if the GM is moving your token, you can still see the labels even through hard FOW. I'm not actually sure this is desirable, but it looked like there was effort put into making it work this way in the firs place, so I kept it for now.
A bit of cleanup as well:
shouldShowMovementLabels()
,calculateTraveledDistance()
). This makes the label casework inshowBlockedMoves
a lot easier to see, though the token rendering is still pretty involved.showBlockedMoves
was the only remaining use ofexposedScreenArea
, which it no longer needs. So that field has been removed. The relatedvisibleScreenArea
is also used in token rendering, so that has not been removed.Possible Drawbacks
Should be none.
Documentation Notes
When someone else (e.g., the GM) is dragging a player's token, the player will no longer be able to see the movement details in areas not visible to them. Here is a screenshot of this on a map with vision set to Night:
The current player owns the Hero token in the center, while the GM is dragging one of the Elf tokens behind the wall. Only the path in the visible area is actually visible to the player. And since the token is currently being dragged behind the wall, the player also cannot the movement details.
This is the same situation, but with vision set to Off:
Since the token would be visible to the player behind the wall, the path is also visible along with the movement details.
If fog is enabled for the map, then movement details will never be shown when a token is dragged under hard fog of war.
Release Notes
This change is