-
Notifications
You must be signed in to change notification settings - Fork 178
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
Fixed Maternity Leave... yet again #5725
Conversation
Moved maternity leave status changes from Campaign to AbstractProcreation for better encapsulation and logic centralization. Ensured proper status updates when pregnancies end and added safeguards for returning personnel to active duty.
The code no longer redundantly resets maternity leave status for non-pregnant characters, as this logic was already handled elsewhere. Added unit tests to ensure correct behavior for various scenarios, such as different genders and pregnancy states. This cleanup improves clarity and prevents unnecessary status updates.
I think the tag should be "personal", because it is starting to get personal |
This is my own personnel hell, if you will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only downside I see is that if you could disable procreation in the middle of someone being on maternity leave, they probably would never return.
If you disable procreation people will stop becoming pregnant, I don't believe it removes active pregnancies. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5725 +/- ##
============================================
- Coverage 10.21% 10.19% -0.02%
+ Complexity 6070 6067 -3
============================================
Files 1009 1010 +1
Lines 139242 139352 +110
Branches 20437 20447 +10
============================================
- Hits 14221 14212 -9
- Misses 123651 123765 +114
- Partials 1370 1375 +5 ☔ View full report in Codecov by Sentry. |
Fix #5714 (tentative)