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 100+ New Quirks, Refactored Personality Traits & Quirk Classes #5088

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

IllianiCBT
Copy link
Collaborator

This PR adds around 100 new personality quirks, more than doubling the pool. It also adjusts saving and loading of traits to use ordinal values rather than hardcoded. This will make adding new quirks much easier and is just cleaner code. I also removed a bunch of unused boolean comparators.

Replaced `toString()` with `ordinal()` for enum serialization in `Person.java`. Updated deserialization to handle both ordinal and string formats for backward compatibility. Ensured correct parsing and logging in related classes.
Removed multiple redundant boolean comparison methods from Aggression, Ambition, and Greed enums. The simplification reduces code bloat and enhances maintainability by avoiding unnecessary duplication.
Improved readability by adding line continuation characters in long description strings of personality traits in Personalities.properties. This change helps maintain clarity and manage lines within the 80-character limit.
@IllianiCBT IllianiCBT added Personnel Personnel-related Issues Refactoring labels Oct 20, 2024
@IllianiCBT IllianiCBT self-assigned this Oct 20, 2024
MekHQ/src/mekhq/campaign/personnel/Person.java Dismissed Show dismissed Hide dismissed
MekHQ/src/mekhq/campaign/personnel/Person.java Dismissed Show dismissed Hide dismissed
MekHQ/src/mekhq/campaign/personnel/Person.java Dismissed Show dismissed Hide dismissed
MekHQ/src/mekhq/campaign/personnel/Person.java Dismissed Show dismissed Hide dismissed
MekHQ/src/mekhq/campaign/personnel/Person.java Dismissed Show dismissed Hide dismissed
MekHQ/src/mekhq/campaign/personnel/Person.java Dismissed Show dismissed Hide dismissed
@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.52%. Comparing base (a339462) to head (0f8cd21).
Report is 141 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5088      +/-   ##
============================================
+ Coverage     10.42%   10.52%   +0.10%     
- Complexity     6028     6032       +4     
============================================
  Files           953      953              
  Lines        134113   133886     -227     
  Branches      19435    19443       +8     
============================================
+ Hits          13979    14090     +111     
+ Misses       118785   118449     -336     
+ Partials       1349     1347       -2     

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

@IllianiCBT
Copy link
Collaborator Author

The deprecated warnings can be ignored: I was the one who deprecated those methods.

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 .

@HammerGS HammerGS merged commit 86eda2f into MegaMek:master Oct 21, 2024
4 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 Refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants