Repository navigation
feat(creek): highlight hunted survivors in the tab list - #310
Merged
Merged
Conversation
Contributor
Test results 582 files 582 suites 3m 37s ⏱️ Results for commit 5dd9159. ♻️ This comment has been updated with latest results. |
5 of 8 tasks
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.
Proposed changes
Survivors a creek is currently hunting are highlighted in the tab list, so the other players can see who is being chased.
Change.
CreekWitnessgets two default methods,hunted(UUID)andhuntEnded(UUID).Creekreports them from the one place that knows the state: after every step it compares theHuntStatetarget with the one it reported last, so a hunt start, any end (catch, timeout, survivor gone, ignored by the patrol, vanish for good) andremove()at round end each produce exactly one pair of calls, with no extra per-tick work.TracingCreekWitnessforwards both. A new decoratorHuntedTabWitness(packagecreek.tab, wired around the tracing witness inCygnus) reacts to them.Definition of hunted. The target of a
HuntState- the chase that ends in a catch.StalkStateonly shadows the survivor from a distance and can end without any consequence, so it does not count.Tab format. The current display name is composed, not replaced: a dark red
◆marker goes behind the name, after a space ([role icon] Name ◆), and every colored text turns red. Icon-font glyphs keep their own color, and decorations such as a spectator's strike-through are kept. The previous display name is stored and restored exactly (including "none") when the last hunt on the survivor ends, but only if the player still shows the marked name; a newer name (spectator, rank tag) is never overwritten. Two creeks on one survivor are counted.Knock-on effects.
ConcurrentHashMapanyway.Types of changes
Checklist
Further comments
Test plan.
HuntedTabWitnessTest: marker and red name on a hunt, exact restore, no display name stays none, a newer spectator name is not overwritten, two creeks on one survivor, two targets independently, a gone survivor, delegation.CreekIntegrationTest: a hunt is reported once, a stalk is not a hunt, and the end is reported for catch, timeout, survivor gone,remove()andvanishForGood; one test drives the tab name through a realCreek../gradlew :game:test :common:testis green.