Skip to content

Give POW awards automatically at mission end#8939

Merged
HammerGS merged 2 commits into
MegaMek:mainfrom
AlexOldenburger:feature/givePOWAwardToEligiblePersonnel
May 7, 2026
Merged

Give POW awards automatically at mission end#8939
HammerGS merged 2 commits into
MegaMek:mainfrom
AlexOldenburger:feature/givePOWAwardToEligiblePersonnel

Conversation

@AlexOldenburger

@AlexOldenburger AlexOldenburger commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Currently, POW awards are never given automatically. The reason for this is that this award is based on the POW status of a person, but this status is cleared (just) before the auto awards are processed at mission end.

This PR fixes this issue by building a list of current POWs at mission end, and then using that list to determine which persons should get the award.

Unfortunately, due to the way auto awards are set up, this list needs to be passed on through several methods before it can actually be used to determine if a person should get the award. Overloaded methods help with this but it is still not ideal.

@AlexOldenburger AlexOldenburger requested a review from a team as a code owner May 5, 2026 13:16
@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 13.81%. Comparing base (163368a) to head (fc5f5e5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ign/personnel/autoAwards/AutoAwardsController.java 0.00% 5 Missing ⚠️
...ekhq/campaign/personnel/autoAwards/MiscAwards.java 0.00% 2 Missing ⚠️
MekHQ/src/mekhq/gui/BriefingTab.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8939      +/-   ##
============================================
- Coverage     13.81%   13.81%   -0.01%     
+ Complexity     8187     8186       -1     
============================================
  Files          1284     1284              
  Lines        167636   167640       +4     
  Branches      25323    25323              
============================================
- Hits          23162    23157       -5     
- Misses       142142   142153      +11     
+ Partials       2332     2330       -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@IllianiBird IllianiBird left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

autoAwards was my first major project, that it works at all is a miracle. Thanks for fixing this

@HammerGS HammerGS merged commit aa2f902 into MegaMek:main May 7, 2026
8 checks passed
@AlexOldenburger AlexOldenburger deleted the feature/givePOWAwardToEligiblePersonnel branch May 7, 2026 13:46
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.

3 participants