Skip to content

feat(creek): highlight hunted survivors in the tab list - #310

Merged
Joltras merged 2 commits into
mainfrom
feat/creek-hunted-tab
Oct 4, 2026
Merged

Joltras merged 2 commits into
mainfrom
feat/creek-hunted-tab

Conversation

@TheMeinerLP

@TheMeinerLP TheMeinerLP commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

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. CreekWitness gets two default methods, hunted(UUID) and huntEnded(UUID). Creek reports them from the one place that knows the state: after every step it compares the HuntState target with the one it reported last, so a hunt start, any end (catch, timeout, survivor gone, ignored by the patrol, vanish for good) and remove() at round end each produce exactly one pair of calls, with no extra per-tick work. TracingCreekWitness forwards both. A new decorator HuntedTabWitness (package creek.tab, wired around the tracing witness in Cygnus) reacts to them.

Definition of hunted. The target of a HuntState - the chase that ends in a catch. StalkState only 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.

  • The display name is global in Minestom, so every player sees the mark in the tab list, not only the hunted one.
  • The creek steps run on the scheduler task of the creek service, and the state is kept in a ConcurrentHashMap anyway.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING.md
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

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() and vanishForGood; one test drives the tab name through a real Creek.
  • ./gradlew :game:test :common:test is green.

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Test results

  582 files    582 suites   3m 37s ⏱️
1 279 tests 1 271 ✅  8 💤 0 ❌
3 840 runs  3 816 ✅ 24 💤 0 ❌

Results for commit 5dd9159.

♻️ This comment has been updated with latest results.

@Joltras
Joltras merged commit 1bcef51 into main Oct 4, 2026
7 checks passed
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