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 Support for Handling Medical Discharge #4617

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

IllianiCBT
Copy link
Collaborator

Updated Person class to include method for retrieving permanent injuries.

Modified Campaign to retire personnel with permanent injuries instead of sacking them, bypassing contract breaches. Adjusted RetirementDefectionTracker to provide the appropriate payout for medically discharged personnel. Medical Discharge occurs if the character resigns while possessing a permanent injury.

Fixed a bug in the payout logic that would cause personnel to always receive a 0 c-bill payout if they were sacked. Now the payout value correctly factors in whether the character is eligible for retirement or medical discharge.

Closes #4599

Updated `Person` class to include method for retrieving permanent injuries. Modified `Campaign` to retire personnel with permanent injuries instead of sacking them, bypassing contract breaches. Adjusted `RetirementDefectionTracker` to provide the appropriate payout for medically discharged personnel.
@IllianiCBT IllianiCBT added Bug Personnel Personnel-related Issues labels Aug 13, 2024
@IllianiCBT IllianiCBT self-assigned this Aug 13, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.30%. Comparing base (dcbbd73) to head (6637f6f).
Report is 84 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4617      +/-   ##
============================================
- Coverage     10.30%   10.30%   -0.01%     
  Complexity     5822     5822              
============================================
  Files           936      936              
  Lines        129139   129148       +9     
  Branches      19000    19003       +3     
============================================
  Hits          13313    13313              
- Misses       114551   114560       +9     
  Partials       1275     1275              

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

@IllianiCBT IllianiCBT merged commit 78295e3 into MegaMek:master Aug 16, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Personnel Personnel-related Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFE: Medical discharge
3 participants