Repository navigation
Fix the crosshair name on the Setups page - #173
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Setups page read "Execs crosshairs" as the crosshair for every setup with the crosshair pack on. The overview filled
crosshairfromCrosshairRecord.id, which is the pack id (execs-crosshairs), not the crosshair.Changes
setup_overview.rs:crosshairis now the record'sshape, which is the crosshair every weapon gets. Per-weapon assignments aren't listed. It is stillNonewhen the pack is off, and also when an old record has no shape.crosshairDesignfield: the saved designer parameters for that shape when it is one of the player's designs. It handles both stored forms ofdesign: a single design fordesigned, or a map of library name to design.factValuepasses it tocrosshairLabel, so a design shows under its saved name rather than a name rebuilt from its slug or "My crosshair".sameFactalso compares the design, so two setups usingdesignedwith different designs count as different.bridge.tsdoc comment now describes the shape. Fixtures are updated.crosshair_hud_sounds_and_mods_come_from_the_manifestused to build a record with"id": "dot", which hid this bug. It now uses a realistic record (id: "execs-crosshairs", ashape, 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 --lockedpnpm check,pnpm test