-
Notifications
You must be signed in to change notification settings - Fork 188
Fix: #6821 Fixed Drill Instructor Awards Being Issued While Not on a Mission #6827
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
Conversation
### Dev Notes Drill Instructor shouldn't be awarded unless the campaign has an active AtBContract. This is just a simple fix to address that.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6827 +/- ##
============================================
+ Coverage 11.46% 11.51% +0.04%
- Complexity 6508 6563 +55
============================================
Files 1098 1100 +2
Lines 140812 140989 +177
Branches 21831 21848 +17
============================================
+ Hits 16150 16237 +87
- Misses 122995 123056 +61
- Partials 1667 1696 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The copyrights has the placeholders tags for the software name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the issue with Drill Instructor Awards being issued incorrectly when the campaign is off-mission. Key changes include:
- Updating the condition in PrisonerEventManager.java to require an active AtBContract.
- Modifying the drillInstructor method in MiscAwards.java to include a condition based on the active AtBContract status.
- Adding an overloaded method in Campaign.java to support the revised condition.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
MekHQ/src/mekhq/campaign/randomEvents/prisoners/PrisonerEventManager.java | Modified the active contract check to use the overloaded method. |
MekHQ/src/mekhq/campaign/personnel/autoAwards/MiscAwards.java | Updated drillInstructor logic to conditionally award based on the active contract state and refactored header comments. |
MekHQ/src/mekhq/campaign/Campaign.java | Added an overloaded hasActiveAtBContract() method for simplified usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyrights have placeholder on them
@@ -1,14 +1,14 @@ | |||
/* | |||
* Copyright (C) 2024-2025 The MegaMek Team. All Rights Reserved. | |||
* | |||
* This file is part of MekHQ. | |||
* This file is part of <Package Name>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright notice needs updating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Yeah, apparently I just missed this PR when making sure I'd addressed everything. |
Fix #6821
Dev Notes
Drill Instructor shouldn't be awarded unless the campaign has an active AtBContract. This is just a simple fix to address that.