Skip to content

Show the right gun for every weapon in replays - #308

Merged
SunkenInTime merged 1 commit into
mainfrom
t3/replay-weapon-folders
Oct 15, 2026
Merged

SunkenInTime merged 1 commit into
mainfrom
t3/replay-weapon-folders

Conversation

@SunkenInTime

@SunkenInTime SunkenInTime commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

In the replay viewer, six guns showed no weapon at all (Judge, Guardian, Marshal, Outlaw, Operator, Frenzy), the Shorty showed as the Bandit, and the Bandit showed nothing. The table that turns a replay's equippable path into an Icarus weapon guessed eight folder names wrong. This fixes the roster's weapon column and the weapon on each agent's badge. Captured pages carry the same weapons.

What changed

  • The folders now come from valorant-api.com's asset paths: Sidearms/Slim is the Shorty, Sidearms/Compact the Bandit, Sidearms/AutoPistol the Frenzy, Shotguns/AutoShotgun the Judge, and SniperRifles/DMR, LeverSniper, DoubleSniper and BoltSniper the Guardian, Marshal, Outlaw and Operator.
  • Matching ignores case, because replays write the Guardian's folder both as DMR and as Dmr.

How it was checked

  • I decoded three cached replays (Lotus 13.00, Abyss and Corrode 13.08). Every gun in their 478 kill sources and every round's buy now maps. The only kills left without a weapon are the ones the replay records with no source.
  • test/replay_weapons_test.dart pins each folder, including both spellings of the Guardian's.
  • In a release build, players who bought these guns now show a silhouette in the roster where they used to show nothing. Seen on Corrode round 3, where Chamber has a sniper. The other features in this batch were tested in the same build.

ci: analyze test

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Replay weapon detection now handles paths regardless of letter casing.
    • Updated weapon path matching so Shorty, Bandit, Guardian, sniper weapons, and other weapons are recognized using the revised asset-folder conventions.
    • Unrecognized paths and missing paths continue to be treated as no weapon.

The weapon table guessed eight folders wrong, so the Judge, Guardian,
Marshal, Outlaw, Operator and Frenzy showed no weapon, the Shorty showed
as the Bandit and the Bandit as nothing. Its folders now come from
valorant-api.com's asset paths, checked against the economy weapons and
kill sources of three 13.0x replays (every gun in their 478 kills now
maps), and match ignoring case since replays carry both DMR and Dmr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c9a91e7-4960-4d7a-a12f-34f1942120df
📥 Commits

Reviewing files that changed from the base of the PR and between 5905ab1 and d88d614.

📒 Files selected for processing: 2
  • lib/replay/replay_weapons.dart
  • test/replay_weapons_test.dart

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The replay weapon lookup now uses revised asset-folder paths and matches paths without regard to capitalization. Tests cover weapon paths, a capitalization variant, an ability path, and null.

Changes: Replay weapon path matching

Layer / File(s) Summary
Update weapon path lookup
lib/replay/replay_weapons.dart, test/replay_weapons_test.dart
The path table uses revised asset-folder paths, and replayWeaponType lowercases non-null paths before matching. Tests cover weapon mappings, capitalization, an unmatched ability path, and null.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to d88d6

No identified issue blocks merging after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: correcting replay weapon mappings so the correct gun appears for each weapon.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SunkenInTime
SunkenInTime merged commit 78828a9 into main Oct 15, 2026
14 checks passed
@SunkenInTime
SunkenInTime deleted the t3/replay-weapon-folders branch October 15, 2026 23: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.

1 participant