Show marker portraits without requiring player notes#5978
Open
kwvanderlinde wants to merge 2 commits into
Open
Show marker portraits without requiring player notes#5978kwvanderlinde wants to merge 2 commits into
kwvanderlinde wants to merge 2 commits into
Conversation
At runtime, markers are now represented by the `Marker` record. `ZoneViewModel` builds a list of these markers, incorporating the logic that used to be spread across `Token`, `PointerTool` and `ZoneViewModel`, e.g., visibility checks, notes availability, etc. In addition, the marker display now respects the current player view, only showing GM markers and GM notes if "Show As Player" is not enabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Resolves #3758
Description of the Change
Updates the check for whether to treat stamps as markers so that a portrait is enough - player notes are not required to show a portrait to players.
I also did some refactoring to consolidate all the marker-identifying logic into
ZoneViewModel#updateMarkerList():Token#isMarker())PointerTool#mouseMoved())PointerTool#createHoverNotes())ZoneRenderer#getMarkerAt())ZoneViewModel)As a result, markers now respect the "Show As Player" setting, e.g., GM names won't be shown when the setting is enabled. It also means there can be no inconsistency in whether a token counts as a marker to show to the current player.
A new
Markertype has been introduced to minimially represent the marker data. This decouples marker notes rendering from tokens, most of which is not needed in the context of markers. In the future, maybe this will open the door to some non-token representations for markers. Since this type is not persisted, so it is free to change over time.Possible Drawbacks
Can't rely on portraits being hidden from players based on the presence of notes.
Documentation Notes
Stamps with a portrait and no notes can be seen as markers by players.
Before (required some player notes):

After:

Release Notes
This change is