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

Refactored Daily Personnel Processing Logic. #4984

Merged
merged 2 commits into from
Oct 5, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Oct 4, 2024

Consolidated code into private methods for better readability and maintainability. Updated processNewDayPersonnel to handle all personnel, avoiding potential ConcurrentModificationExceptions.

This doesn't just close the below case, but also fixes a number of issues stemming from the fact that we were only checking personnel events for characters with the 'active' personnel status. Characters who have departed the campaign (such as characters who have died, or resigned) are skipped.

Closes #4982

Consolidated repeated code into private methods for better readability and maintainability. Updated `processNewDayPersonnel` to handle all personnel, avoiding potential `ConcurrentModificationExceptions`.
Added a check to return early in the processMonthlyIdleXP function if the person is not active.
@IllianiCBT IllianiCBT added Bug Personnel Personnel-related Issues labels Oct 4, 2024
@IllianiCBT IllianiCBT self-assigned this Oct 4, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.46%. Comparing base (415ecaf) to head (64f8158).
Report is 15 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4984      +/-   ##
============================================
- Coverage     10.47%   10.46%   -0.02%     
- Complexity     6021     6022       +1     
============================================
  Files           951      951              
  Lines        133248   133345      +97     
  Branches      19377    19378       +1     
============================================
- Hits          13961    13955       -6     
- Misses       117940   118041     +101     
- Partials       1347     1349       +2     

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

@HammerGS HammerGS merged commit b67f929 into MegaMek:master Oct 5, 2024
4 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.

Personnel not returning from maternity leave
3 participants