Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Personality Loading #5703

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Conversation

IllianiCBT
Copy link
Collaborator

  • Replaced deprecated parseFromString methods across enums with valueOf to improve readability and maintainability.
  • Fixed the loading of personality traits. These were incorrectly being caught by the <50.01 compatibility handler. As the trait ordinal and the integer used by the compatibility handler were not 1:1 this caused character's personality to 'wander' upon load.
  • Removed deprecated parse from String methods.

Fix #5628

Replaced deprecated `parseFromString` methods across enums with `valueOf` to improve readability and maintainability. Standardized input formatting by converting to uppercase and replacing invalid characters. Updated error handling for invalid enum values for better code robustness.
@IllianiCBT IllianiCBT added Bug Personnel Personnel-related Issues labels Jan 8, 2025
@IllianiCBT IllianiCBT self-assigned this Jan 8, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.05%. Comparing base (4cf3be1) to head (117e9ce).
Report is 83 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5703      +/-   ##
============================================
+ Coverage     10.02%   10.05%   +0.02%     
- Complexity     6068     6076       +8     
============================================
  Files          1074     1074              
  Lines        141641   141389     -252     
  Branches      20645    20639       -6     
============================================
+ Hits          14206    14221      +15     
+ Misses       126063   125796     -267     
  Partials       1372     1372              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

LGTM

@Sleet01 Sleet01 merged commit 440b9d2 into MegaMek:master Jan 9, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Personnel Personnel-related Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reputation report commander tracking
3 participants