Skip to content

Map visual overhaul: event-icon rotors, subtle trails, tunnels layer, player crosses + legend - #47

Merged
HandyS11 merged 9 commits into
developfrom
feat/map-visual-overhaul
Jul 11, 2026
Merged

Map visual overhaul: event-icon rotors, subtle trails, tunnels layer, player crosses + legend#47
HandyS11 merged 9 commits into
developfrom
feat/map-visual-overhaul

Conversation

@HandyS11

Copy link
Copy Markdown
Owner

Map visual overhaul

Improves the #map render across four areas (spec/plan brainstormed and executed task-by-task with per-task + final code review).

1. Event icons — real, correctly-placed rotors

  • Heli and CH47 icons are now composited from a grey body + rotor blade(s) (MarkerIconComposer): the patrol heli gets one rotor on its hub, the CH47 gets two at its tandem front/rear positions. Rotating the whole composite keeps the rotors aligned.
  • Fixed the broken travelling-vendor icon (clean cart); removed the ornate red patrol.png and the old ch47.png.

2. Motion trails — subtle

  • Trails kept but softened to a faint dashed hint (thinner stroke, lower opacity ceiling, PatternPen dash) instead of a solid fading smear.

3. Train tunnels — separate toggleable layer

  • The two train_tunnel_* tokens move out of the Monuments layer into a new persisted, per-server Tunnels layer (icons still the RustMaps SVG art, just gated separately).
  • Adds ServerMapSettings.ShowTunnels (+ EF migration, defaultValue: true so existing servers stay on), MapLayer.Tunnels, a 7th #map control-message toggle button, and EN/FR map.layer.tunnels. Trainyard & Military Tunnels stay ordinary monuments.

4. Players — colored crosses + legend embed

  • Teammate marker is now a stable per-player colored cross (+ alive / x dead, dimmed offline) with a dark contrast halo — no more on-map name labels.
  • Colors come from a fixed 9-entry PlayerPalette (RGB ↔ Discord colored-square emoji), assigned by SteamId sort so a player keeps their color across refreshes.
  • A color → player → status legend is built in the composer from the same assignment (so cross color and legend emoji can't drift) and attached to the map image message as a Discord embed (ComposeAsync now returns MapComposition(Png, Legend?), threaded through the host → poster).

Verification

  • Full suite 947 passed / 1 skipped / 0 failed across 17 assemblies (baseline 936+1skip → +11 net).
  • Build -warnaserror clean; jb cleanupcode zero-diff; no EF model drift.
  • Final whole-branch review (cross-seam): ready to merge — 0 Critical / 0 Important. Verified the MapComposition threading, palette↔legend coupling, poster deleting only its own image posts (control message untouched, embed atomic with the image), tunnel migration backfill + exact exclusion, and composite disposal/no-aliasing.

Pending (user gate)

  • Live #map visual smoke: eyeball the heli/CH47 rotor placement, the vendor icon, and the colored crosses + legend embed on a real tile. Blade offsets/scale and cross sizing are tunable constants (MarkerIconComposer, MapRenderStyle) if adjustment is wanted.

🤖 Generated with Claude Code

HandyS11 and others added 9 commits July 11, 2026 20:57
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ayers)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…labels

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 11, 2026 20:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR overhauls the #map rendering pipeline and UX by improving event marker artwork (heli/CH47), softening motion trails, adding a separate persisted tunnels layer, and replacing player name labels with stable color-coded crosses plus a legend embed.

Changes:

  • Adds a new persisted Tunnels map layer (ShowTunnels) with EF migration, localization, UI toggle, and rendering split from Monuments.
  • Reworks player rendering to colored crosses (alive/dead/online/offline styling) with stable palette assignment and a Discord embed legend (MapComposition).
  • Updates marker icon loading to support composited rotor icons (patrol heli + chinook) and softens trails via dashed, lower-opacity rendering.

Reviewed changes

Copilot reviewed 34 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/RustPlusBot.Persistence.Tests/Map/ServerMapSettingsSchemaTests.cs Verifies ShowTunnels persists and defaults on.
tests/RustPlusBot.Persistence.Tests/Map/MapSettingsStoreTests.cs Adds coverage for toggling only the tunnels layer.
tests/RustPlusBot.Localization.Tests/StringsResourceParityTests.cs Updates expected key count for new localization entry.
tests/RustPlusBot.Features.Workspace.Tests/Messages/MapControlMessageRendererTests.cs Updates expectations for 7 map-layer toggle buttons.
tests/RustPlusBot.Features.Map.Tests/PlayerPaletteTests.cs Adds tests for 9-color palette integrity and wraparound behavior.
tests/RustPlusBot.Features.Map.Tests/MarkerIconComposerTests.cs Validates rotor offsets/count and that compositing changes pixels.
tests/RustPlusBot.Features.Map.Tests/MapRendererTests.cs Updates player placement signature and adds cross-color/dead-vs-alive render tests.
tests/RustPlusBot.Features.Map.Tests/MapLegendEmbedTests.cs Adds tests for embed generation from legend entries.
tests/RustPlusBot.Features.Map.Tests/MapLayerSetTests.cs Verifies AllOn enables the new tunnels layer.
tests/RustPlusBot.Features.Map.Tests/MapIconsTests.cs Adjusts caching tests to reflect marker-icon caching changes.
tests/RustPlusBot.Features.Map.Tests/MapComposerTests.cs Updates composer contract to MapComposition and adds tunnels/legend scenario tests.
src/RustPlusBot.Persistence/Migrations/BotDbContextModelSnapshot.cs Updates EF model snapshot for ShowTunnels.
src/RustPlusBot.Persistence/Migrations/20260711191524_MapTunnelsLayer.Designer.cs Adds migration designer for the new tunnels layer column.
src/RustPlusBot.Persistence/Migrations/20260711191524_MapTunnelsLayer.cs Adds ShowTunnels column with defaultValue: true.
src/RustPlusBot.Persistence/Map/MapSettingsStore.cs Threads ShowTunnels through settings load/save logic.
src/RustPlusBot.Persistence/Map/MapLayer.cs Adds MapLayer.Tunnels and extends MapLayerSettings with Tunnels.
src/RustPlusBot.Localization/Strings.resx Adds map.layer.tunnels English localization.
src/RustPlusBot.Localization/Strings.fr.resx Adds map.layer.tunnels French localization.
src/RustPlusBot.Features.Workspace/Modules/MapComponentModule.cs Enables toggle logic for the tunnels layer.
src/RustPlusBot.Features.Workspace/Messages/MapControlMessageRenderer.cs Renders the new tunnels toggle button (now 7 toggles).
src/RustPlusBot.Features.Map/Rendering/PlayerPlacement.cs Extends placement model with per-player cross color.
src/RustPlusBot.Features.Map/Rendering/PlayerPalette.cs Introduces stable 9-entry palette mapping to Discord square emojis.
src/RustPlusBot.Features.Map/Rendering/MapRenderStyle.cs Adds cross sizing/styling constants and subtle trail dash/opacity tuning.
src/RustPlusBot.Features.Map/Rendering/MapRenderer.cs Implements tunnels layer rendering, dashed subtle trails, and colored player crosses.
src/RustPlusBot.Features.Map/Rendering/MapLayerSet.cs Adds Tunnels flag and updates AllOn.
src/RustPlusBot.Features.Map/Posting/MapLegendEmbed.cs Builds Discord embed description for the player legend.
src/RustPlusBot.Features.Map/Posting/IMapChannelPoster.cs Extends poster interface to include optional legend payload.
src/RustPlusBot.Features.Map/Posting/DiscordMapChannelPoster.cs Posts the map image with an optional legend embed atomically.
src/RustPlusBot.Features.Map/Hosting/MapHostedService.cs Threads MapComposition through refresh and posting.
src/RustPlusBot.Features.Map/Composing/MapLegend.cs Introduces MapLegendEntry, MapLegend, and MapComposition.
src/RustPlusBot.Features.Map/Composing/MapComposer.cs Produces MapComposition, assigns stable palette colors, splits tunnels from monuments.
src/RustPlusBot.Features.Map/Assets/TunnelTokens.cs Defines the Rust+ monument tokens routed to the tunnels layer.
src/RustPlusBot.Features.Map/Assets/MarkerIconComposer.cs Composites heli/CH47 icons from body + rotor blades.
src/RustPlusBot.Features.Map/Assets/MapIcons.cs Routes patrol/ch47 icons through the composer and keeps caching behavior consistent.
src/RustPlusBot.Domain/Map/ServerMapSettings.cs Adds persisted ShowTunnels setting with default true.
Files not reviewed (1)
  • src/RustPlusBot.Persistence/Migrations/20260711191524_MapTunnelsLayer.Designer.cs: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HandyS11
HandyS11 merged commit b7f046b into develop Jul 11, 2026
4 checks passed
@HandyS11
HandyS11 deleted the feat/map-visual-overhaul branch July 11, 2026 20:41
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