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

Refactored DropShip Salvage Handling #4922

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

IllianiCBT
Copy link
Collaborator

Moved DropShip Bonus calculation outside of the conditional block for ejected units. This change ensures that the DropShip bonus is consistently applied. Adjusted the existing logic to avoid redundant checks and improve code readability.

Refactored processGame to remove single or abbreviated variable names.

Closes #4845

Moved DropShip Bonus calculation outside of the conditional block for ejected units. This change ensures that the DropShip bonus is consistently applied. Adjusted the existing logic to avoid redundant checks and improve code readability.

Refactored `processGame` to remove single or abbreviated variable names.
} else if (e.getOwner().isEnemyOf(client.getLocalPlayer())) {
if (e instanceof EjectedCrew) {
enemyEjections.put(UUID.fromString(e.getCrew().getExternalIdAsString()), (EjectedCrew) e);
} else if (wreck.getOwner().isEnemyOf(client.getLocalPlayer())) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Non-refactoring changes start here and end on line 374

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.46%. Comparing base (b8b9400) to head (e1d1251).
Report is 44 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #4922   +/-   ##
=========================================
  Coverage     10.45%   10.46%           
- Complexity     6008     6015    +7     
=========================================
  Files           952      951    -1     
  Lines        132759   132835   +76     
  Branches      19309    19309           
=========================================
+ Hits          13885    13895   +10     
- Misses       117518   117589   +71     
+ Partials       1356     1351    -5     

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

@IllianiCBT IllianiCBT merged commit dc75673 into MegaMek:master Sep 27, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repairable crippled dropship on ground map shows in salvage/sell screen with bounty enabled
3 participants