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 the Ability to Ransom Friendly PoWs #4398

Merged
merged 5 commits into from
Jul 14, 2024
Merged

Conversation

IllianiCBT
Copy link
Collaborator

As per title, this PR adds the ability to ransom friendly PoWs. The valuation of PoWs is identical to the valuation of enemy prisoners.

This PR is designed to work alongside #4377 to expand user role-play options.

The prisoner ransom command was corrected in the PersonnelTableMouseAdapter. The command was previously 'CMD_RANSOM', but it has been changed to 'CMD_RANSOM_FRIENDLY'.
@IllianiCBT IllianiCBT added Personnel Personnel-related Issues Finances labels Jul 13, 2024
@IllianiCBT IllianiCBT self-assigned this Jul 13, 2024
@Thom293
Copy link
Contributor

Thom293 commented Jul 13, 2024

Long awaited feature! Nice.

@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.26%. Comparing base (f7bd31c) to head (3b3ae0f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4398      +/-   ##
============================================
- Coverage     10.27%   10.26%   -0.01%     
  Complexity     5811     5811              
============================================
  Files           925      925              
  Lines        126031   126051      +20     
  Branches      18627    18631       +4     
============================================
  Hits          12945    12945              
- Misses       111811   111831      +20     
  Partials       1275     1275              

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

The code now includes a status change for personnel marked as Missing In Action (MIA) to Prisoner of War (POW). This is implemented within a loop that iterates over the personnel, checking for those with an MIA status and changing it to POW, where necessary.
Copy link
Member

@HammerGS HammerGS left a comment

Choose a reason for hiding this comment

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

Tested and seems to work

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

Successfully merging this pull request may close these issues.

4 participants