Commit 8312171
Subsystem 2b-ii: per-server map layer toggles + monuments/vendor/players/rig-styling layers (icon render) (#16)
* feat(map): ServerMapSettings entity + EF config + MapSettings migration
* feat(map): IMapSettingsStore + EF-backed store with all-on defaults
* feat(map): vendor icon assets + MapIcons registry + MonumentIconMap
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(map): add MapIcons.Rig + test (review)
Implements the missing MapIcons.Rig(RigKind, bool active) API-contract method
(Task 3 "Produces" list); adds Rig_resolves_for_known_kinds Theory test covering
both RigKind.Small and RigKind.Large. Suppresses RCS1163 on the reserved `active`
parameter with a narrow pragma + explaining remarks.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(connections): add TravellingVendor marker kind + surface vendor bucket
- Added MarkerKind.TravellingVendor = 5 to the enum (with XML doc)
- Wired data.TravellingVendorMarkers into GetMapMarkersAsync via AddMarkers
- Activated the deferred MapIcons.Marker TravellingVendor arm (Load("vendor"))
that was stubbed out pending the enum member; vendor.png already embedded
* feat(connections): expose GetMonumentsAsync on IRustServerQuery
Adds GetMonumentsAsync(ulong guildId, Guid serverId, CancellationToken)
to IRustServerQuery; ConnectionSupervisor implements it by delegating to
the live socket's internal GetMonumentsAsync or returning [] when no
socket is registered. Includes supervisor test asserting empty result
when no live socket exists.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(map): icon-based renderer with monument/player/rig/vendor layers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(map): composer reads per-server settings and gathers all layers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(map): repaint #map immediately on MapSettingsChangedEvent
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(map): poster deletes only prior image posts, sparing the control message
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(workspace): #map control message with ManageGuild layer toggles
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test(map): restore grid-renders-with-no-markers guard
Re-adds the Renders_the_grid_even_with_no_markers test dropped during
Task 7's MapComposer rewrite. Uses two MapComposer instances (grid-on
vs grid-off, zero markers) and asserts their output PNGs differ,
proving the grid still renders on low-activity / just-connected servers.
Also fixes player label: alive+offline now shows (offline) instead of
(dead); only dead players show (dead).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style(map): apply jb ReformatAndReorder
Cosmetic line-wrapping applied by JetBrains CleanupCode 2026.1.2 with
the ReformatAndReorder profile. All 5 touched files are 2b-ii branch
files; no pre-existing drift in unrelated files.
Files reformatted:
- src/RustPlusBot.Features.Map/Composing/MapComposer.cs
- src/RustPlusBot.Persistence/Map/MapSettingsStore.cs
- tests/RustPlusBot.Features.Map.Tests/MapRendererTests.cs
- tests/RustPlusBot.Persistence.Tests/Map/MapSettingsStoreTests.cs
- tests/RustPlusBot.Persistence.Tests/Map/ServerMapSettingsSchemaTests.cs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(workspace): harden #map toggle against a forged non-existent server id
Validate the parsed serverId exists in this guild before any persistence.
Resolves the FK-violation/hung-ack edge case noted in the final review.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* perf(map): batch each render layer into a single image.Mutate
Copilot review (PR #16): DrawMonuments (and the sibling marker/rig/player
loops) called image.Mutate once per item, building and executing a fresh
ImageSharp processing pipeline each time. Refactor all four layers to draw
every item inside ONE Mutate per layer, so a server with many monuments pays
for one pipeline instead of N. Behaviour-preserving: same icons composited at
the same coordinates in the same order; the cached MapIcons sources are still
only read (drawn onto the target ctx), never mutated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent b6bf89c commit 8312171
83 files changed
Lines changed: 1881 additions & 127 deletions
File tree
- src
- RustPlusBot.Abstractions
- Connections
- Events
- RustPlusBot.Domain/Map
- RustPlusBot.Features.Connections
- Listening
- Supervisor
- RustPlusBot.Features.Map
- Assets
- icons
- Composing
- Hosting
- Posting
- Rendering
- RustPlusBot.Features.Workspace
- Localization
- Messages
- Modules
- Specs
- RustPlusBot.Persistence
- Configurations
- Map
- Migrations
- tests
- RustPlusBot.Features.Connections.Tests
- RustPlusBot.Features.Map.Tests
- RustPlusBot.Features.Workspace.Tests/Messages
- RustPlusBot.Persistence.Tests/Map
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
48 | 58 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 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 | + | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
| 330 | + | |
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
| |||
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
| 343 | + | |
342 | 344 | | |
343 | 345 | | |
344 | 346 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
214 | 229 | | |
215 | 230 | | |
216 | 231 | | |
| |||
| 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 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
This file was deleted.
| 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 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments