Skip to content

Fix the crosshair name on the Setups page - #173

Merged
rndaom merged 1 commit into
mainfrom
rndaom/setups-crosshair-shape
Oct 11, 2026
Merged

rndaom merged 1 commit into
mainfrom
rndaom/setups-crosshair-shape

Conversation

@rndaom

@rndaom rndaom commented Oct 11, 2026

Copy link
Copy Markdown
Owner

The Setups page read "Execs crosshairs" as the crosshair for every setup with the crosshair pack on. The overview filled crosshair from CrosshairRecord.id, which is the pack id (execs-crosshairs), not the crosshair.

Changes

  • setup_overview.rs: crosshair is now the record's shape, which is the crosshair every weapon gets. Per-weapon assignments aren't listed. It is still None when the pack is off, and also when an old record has no shape.
  • New crosshairDesign field: the saved designer parameters for that shape when it is one of the player's designs. It handles both stored forms of design: a single design for designed, or a map of library name to design. factValue passes it to crosshairLabel, so a design shows under its saved name rather than a name rebuilt from its slug or "My crosshair".
  • sameFact also compares the design, so two setups using designed with different designs count as different.
  • The bridge.ts doc comment now describes the shape. Fixtures are updated.
  • Test: crosshair_hud_sounds_and_mods_come_from_the_manifest used to build a record with "id": "dot", which hid this bug. It now uses a realistic record (id: "execs-crosshairs", a shape, a per-weapon assignment) and covers both design forms and the inactive pack.

Checks

  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace --locked
  • pnpm check, pnpm test

The overview reported the crosshair record's id, which is the pack id
(execs-crosshairs), so every setup with the pack on read "Execs
crosshairs". Report the shape every weapon gets instead, plus the saved
design for it when it is one of the player's designs, so the page shows
the design's saved name and tells two different designs apart.
@rndaom
rndaom merged commit c4f4147 into main Oct 11, 2026
11 checks passed
@rndaom
rndaom deleted the rndaom/setups-crosshair-shape branch October 11, 2026 22:22
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.

1 participant