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

Added Fallback for AtB Bonus Unit Creation. #5911

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

IllianiCBT
Copy link
Collaborator

  • Enhanced AtBContract bonus unit generation with a fallback mechanism to retry creation if the initial attempt fails.
  • Improved error handling in getTankEntity by checking for null roles and logging more informative messages.

Fix #5910

Improved error handling in `getTankEntity` by checking for null roles and logging more informative messages. Enhanced `AtBContract` unit generation with a fallback mechanism to retry creation if the initial attempt fails.
@IllianiCBT IllianiCBT added the Bug label Jan 28, 2025
@IllianiCBT IllianiCBT self-assigned this Jan 28, 2025
Refactored the bonus unit generation process to streamline faction and quality determination. Implemented a fallback mechanism with the campaign's faction if the initial generation fails. Improved readability and reduced redundant code for better maintainability.
@codecov-commenter
Copy link

codecov-commenter commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.29%. Comparing base (5589696) to head (21cc2a1).
Report is 44 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5911      +/-   ##
============================================
- Coverage     10.29%   10.29%   -0.01%     
+ Complexity     6128     6125       -3     
============================================
  Files          1038     1038              
  Lines        139161   139210      +49     
  Branches      20612    20622      +10     
============================================
+ Hits          14329    14334       +5     
- Misses       123424   123468      +44     
  Partials       1408     1408              

☔ 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 c7ccb25 into MegaMek:master Jan 28, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to save my game
3 participants