Commit 8d8b656
Subsystem 3d: team presence events (connect/disconnect/death/respawn/AFK) + in-game !afk (#17)
* feat(connections): surface leader DeathNote on TeamInfoSnapshot
* feat(abstractions): add PlayerTransition + PlayerStateChangedEvent
* chore(players): scaffold Features.Players slice + test project
* feat(connections): TeamStateTracker diffs team snapshots into transitions
* feat(players): EN/FR player-event localization catalog
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(players): renderer + relay to #events and in-game chat
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(players): publish + relay PlayerStateChangedEvent from poll loop
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(players): all transition kinds render end-to-end
* feat(connections): AFK hysteresis tracking in TeamStateTracker
* feat(connections): IAfkState read seam over the AFK tracker
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(commands): in-game !afk command over IAfkState
* docs(commands): list !afk in the help catalog
Add afk to CommandHelpCatalog.InGame (CommandGroup.TeamIntel, help.afk),
add help.afk EN/FR descriptions to CommandLocalizationCatalog, and update
CommandHelpCatalogTests.HandlerNames from 12 to 13 entries to keep the
bidirectional drift test green.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(connections): guard TeamStateTracker with a lock for concurrent !afk reads
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(players): address Copilot review + ReSharper format gate
- AFK: clear the latch SILENTLY when a member goes offline, is dead, or
died this poll (detected via LastDeathTimeUtc advancing even on a slow
poll where IsAlive already flipped back), instead of emitting a
contradictory ReturnedFromAfk alongside the disconnect/death line.
- AFK movement: use a squared-distance check so AfkEpsilon is a true
movement radius (per-axis treated diagonal moves as still).
- Prune per-member stillness/AFK state for ids absent from the snapshot
(members who leave the team) so the maps don't grow unbounded.
- Add player.title to the localization-catalog key-coverage test.
- Run jb cleanupcode (ReformatAndReorder) — fixes the Linux CI format gate
that the original push skipped.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent d4e4340 commit 8d8b656
40 files changed
Lines changed: 1416 additions & 9 deletions
File tree
- src
- RustPlusBot.Abstractions
- Connections
- Events
- RustPlusBot.Features.Commands
- Handlers
- Help
- Localization
- RustPlusBot.Features.Connections
- Listening
- Supervisor
- RustPlusBot.Features.Players
- Hosting
- Posting
- Relaying
- Rendering
- RustPlusBot.Host
- tests
- RustPlusBot.Features.Commands.Tests
- Help
- RustPlusBot.Features.Connections.Tests
- RustPlusBot.Features.Players.Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| |||
111 | 115 | | |
112 | 116 | | |
113 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
114 | 121 | | |
115 | 122 | | |
116 | 123 | | |
| |||
158 | 165 | | |
159 | 166 | | |
160 | 167 | | |
| 168 | + | |
161 | 169 | | |
162 | 170 | | |
163 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
0 commit comments