-
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
The Great Campaign Option Cull - Relationships #5861
The Great Campaign Option Cull - Relationships #5861
Conversation
Removed redundant manual options for marriage, divorce, and procreation from CampaignOptions and related classes. Adjusted logic to streamline features relying on only random methods while maintaining existing functionality. Cleaned up associated resources and XML serialization/deserialization.
Eliminated obsolete code related to marriage, divorce, and procreation options, such as mutual ancestor checks and specific toggles for random actions. These removals streamline the codebase and reduce maintenance of unused features, enhancing overall clarity and efficiency.
Removed redundant mock setups and unused assertions in several test files for divorce, procreation, and marriage handling. Streamlined `canProcreate` and `canMarry` test methods to clarify failure conditions and ensure concise execution paths.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5861 +/- ##
============================================
- Coverage 10.28% 10.22% -0.06%
+ Complexity 6132 6063 -69
============================================
Files 1039 1039
Lines 139404 138945 -459
Branches 20650 20583 -67
============================================
- Hits 14341 14211 -130
+ Misses 123647 123324 -323
+ Partials 1416 1410 -6 ☔ View full report in Codecov by Sentry. |
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.
Just some nitpicks. Nothing serious.
@@ -342,7 +327,7 @@ void testApplyBothSpaceYours() { | |||
|
|||
@Test | |||
void testApplyHyphenYours() { | |||
when(mockCampaignOptions.isLogMarriageNameChanges()).thenReturn(false); | |||
|
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.
Nit Pick: Don't need the extra white space.
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.
Same throughout the file....
|
||
assertNull(mockProcreation.determineFather(mockCampaign, mother)); | ||
|
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.
Nitpick: Remove the extra blank lines.
# Conflicts: # MekHQ/src/mekhq/campaign/personnel/marriage/AbstractMarriage.java # MekHQ/src/mekhq/campaign/personnel/procreation/AbstractProcreation.java # MekHQ/unittests/mekhq/campaign/personnel/marriage/AbstractMarriageTest.java # MekHQ/unittests/mekhq/campaign/personnel/procreation/AbstractProcreationTest.java
Removed checks and test cases related to clan and prisoner-specific marriage and procreation rules. These changes simplify the handling of marriage and procreation, focusing on random cases and removing unused configuration options.
This is the first phase of an attempt to reduce the sheer volume of campaign options. It is focused on trimming down some of the more niche options that have minimal impact. This is going to be an iterative process over the next few versions.
Removed (Marriage)
Removed (Divorce)
Removed (Procreation)