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 Automatic Release of the Commander Flag upon Commander Departure or Death, and Loyalty Reset upon Sudden Leadership Change #4393

Merged
merged 4 commits into from
Jul 14, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Jul 13, 2024

In the event of a person's death or departure from the unit, mhq now checks if the individual was the campaign commander. If they were, the commander flag is released, allowing for a potential new assignment.

A lot of the personnel modules utilize the commander flag, and this helps reduce instances where the campaign does not have a valid commander.

Furthermore, a new feature for refreshing loyalty upon major leadership changes has been added. This occurs when a campaign commander dies, deserts, or defects. A campaign option allows this feature to be toggled according to the needs of the campaign.

In the event of a person's death, the program now also checks if the deceased was a commander. If they were, the commander flag is released, allowing for a potential new assignment.
@IllianiCBT IllianiCBT added Personnel Personnel-related Issues UX User experience labels Jul 13, 2024
@IllianiCBT IllianiCBT self-assigned this Jul 13, 2024
@IllianiCBT IllianiCBT changed the title Release Commander Flag When a Person is Deceased Added the Automatic Release of the Commander Flag upon Commander Death Jul 13, 2024
@IllianiCBT IllianiCBT changed the title Added the Automatic Release of the Commander Flag upon Commander Death Added the Automatic Release of the Commander Flag upon Commander Departure or Death Jul 13, 2024
The code for removing the commander flag when a person's status changes has been modified. Previously, the flag was lifted anytime a person's status changed to isDead. Now, it occurs when the status is changed to 'departed unit', which isn't just limited to death.
@IllianiCBT IllianiCBT marked this pull request as draft July 13, 2024 03:21
@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.27%. Comparing base (f7bd31c) to head (2e358c9).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4393      +/-   ##
============================================
- Coverage     10.27%   10.27%   -0.01%     
- Complexity     5811     5812       +1     
============================================
  Files           925      925              
  Lines        126031   126064      +33     
  Branches      18627    18635       +8     
============================================
+ Hits          12945    12948       +3     
- Misses       111811   111841      +30     
  Partials       1275     1275              

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

@IllianiCBT IllianiCBT changed the title Added the Automatic Release of the Commander Flag upon Commander Departure or Death Added the Automatic Release of the Commander Flag upon Commander Departure or Death, and Loyalty Reset upon Sudden Leadership Change Jul 13, 2024
A new feature for refreshing loyalty upon major leadership changes was added. This occurs when a commander dies, deserts, or defects. An associated configuration option allows this feature to be toggled on or off according to the needs of the campaign.
@IllianiCBT IllianiCBT marked this pull request as ready for review July 13, 2024 03:36
@IllianiCBT IllianiCBT merged commit ee97722 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
Personnel Personnel-related Issues UX User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants