8000 Fix: #6821 Fixed Drill Instructor Awards Being Issued While Not on a Mission by IllianiBird · Pull Request #6827 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 5 commits into from
May 2, 2025

Conversation

IllianiBird
Copy link
Collaborator

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.

### Dev Notes
Drill Instructor shouldn't be awarded unless the campaign has an active AtBContract. This is just a simple fix to address that.
@IllianiBird IllianiBird added Bug AtB Awards StratCon Bugs relating strictly to StratCon Severity: Low Issues described as low severity as per the new issue form labels Apr 30, 2025
@IllianiBird IllianiBird self-assigned this Apr 30, 2025
Copy link
codecov bot commented Apr 30, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 11.51%. Comparing base (5edad64) to head (04afa55).
Report is 87 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/campaign/Campaign.java 0.00% 1 Missing ⚠️
...ekhq/campaign/personnel/autoAwards/MiscAwards.java 0.00% 1 Missing ⚠️
...n/randomEvents/prisoners/PrisonerEventManager.java 0.00% 1 Missing ⚠️
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.
📢 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 changed the title Fix #6821: Fixed Drill Instructor Awards Being Issued While Not on a Mission Fix: Fixed Drill Instructor Awards Being Issued While Not on a Mission Apr 30, 2025
Copy link
Collaborator
@Scoppio Scoppio left a 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

@IllianiBird IllianiBird requested a review from Scoppio May 1, 2025 03:49
@IllianiBird IllianiBird changed the title Fix: Fixed Drill Instructor Awards Being Issued While Not on a Mission Fix: #6821 Fixed Drill Instructor Awards Being Issued While Not on a Mission May 1, 2025
@HammerGS HammerGS requested a review from Copilot May 2, 2025 03:29
Copy link
Contributor
@Copilot Copilot AI left a 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.

Copy link
Collaborator
@Scoppio Scoppio left a 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>.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copyright notice needs updating

Copy link
Collaborator Author

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>
@IllianiBird
Copy link
Collaborator Author

Yeah, apparently I just missed this PR when making sure I'd addressed everything.

@Scoppio Scoppio merged commit 8dc16f8 into MegaMek:master May 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AtB Awards Bug Severity: Low Issues described as low severity as per the new issue form StratCon Bugs relating strictly to StratCon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Briefing Room remembers roles.
2 participants
0