Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@petrvecera
Copy link
Member

@petrvecera petrvecera commented Nov 30, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Fixed accuracy of weapon aim time statistics.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 30, 2025

Walkthrough

Updated fire aim time data mapping in weapon stats module. The fire_aim_time_min and fire_aim_time_max values now source from the nested weapon_bag.aim?.fire_aim_time property instead of directly from weapon_bag.fire_aim_time. All other mapping logic remains unchanged.

Changes

Cohort / File(s) Change Summary
Fire aim time data mapping
src/unitStats/mappingWeapon.ts
Updated fire_aim_time_min and fire_aim_time_max to source from weapon_bag.aim?.fire_aim_time instead of weapon_bag.fire_aim_time

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that the nested property path (weapon_bag.aim?.fire_aim_time) exists in the weapon data structure and contains the expected values
  • Confirm backward compatibility and that no other code paths depend on the previous property location

Poem

A rabbit hops through aim\_time trees,
Where nested properties dance with ease,
From shallow depths to branches deep,
The mapping now takes proper leap,
With optional chaining, safe and sure,
Our weapons' stats are now more pure! 🐰

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix aim time in weapons' clearly and directly describes the main change: correcting the data mapping for fire_aim_time values in weapon statistics.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-aim-time

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/unitStats/mappingWeapon.ts (1)

250-251: Aim time now sourced from weapon_bag.aim – consider adding a backward‑compat fallback

Switching fire_aim_time_min/max to weapon_bag.aim?.fire_aim_time?.min/max looks correct and matches how other aim‑related fields are read from weapon_bag.aim. If you still support older JSON where fire_aim_time might live at the top level, you may want a fallback to keep old patches/mod data working, e.g.:

fire_aim_time_min:
  weapon_bag.aim?.fire_aim_time?.min ??
  weapon_bag.fire_aim_time?.min ??
  0,
fire_aim_time_max:
  weapon_bag.aim?.fire_aim_time?.max ??
  weapon_bag.fire_aim_time?.max ??
  0,
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 569b2bf and 6aaf7b6.

📒 Files selected for processing (1)
  • src/unitStats/mappingWeapon.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build and run prettier
  • GitHub Check: Deploy Web Preview

@github-actions
Copy link
Contributor

🌐 Branch deployed as preview to:
https://coh3-stats-af7ja4ko1-cohstats.vercel.app

@petrvecera petrvecera merged commit 4b18c49 into master Nov 30, 2025
6 checks passed
@petrvecera petrvecera deleted the fix-aim-time branch November 30, 2025 15:07
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