-
Notifications
You must be signed in to change notification settings - Fork 191
PR: Moved SPA Info in Preparation for Future Changes #6820
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
Conversation
### Dev Notes I'm about to move some logic out of `AbilitiesTab.java` connected to the categorization of SPAs. This will allow that logic to be used anywhere, not just campaign options. However, to do that I needed to move and rename `CampaignOptionsAbilityInfo.java`. I was advised to make a PR that just did the move and renaming, and then to follow up with the logic changes.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6820 +/- ##
============================================
+ Coverage 11.45% 11.46% +0.01%
- Complexity 6499 6502 +3
============================================
Files 1098 1099 +1
Lines 140854 140807 -47
Branches 21841 21829 -12
============================================
+ Hits 16130 16139 +9
+ Misses 123050 123002 -48
+ Partials 1674 1666 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR moves the SPA-related AbilityCategory enum into a new location (mekhq.utilities.spaUtilities.enums) to prepare for future logic changes by separating out the categorization logic from CampaignOptionsAbilityInfo. Key changes include:
- Creating a new AbilityCategory enum in a utilities package.
- Updating AbilitiesTab.java and CampaignOptionsPane.java to import the enum from its new location.
- Removing the nested AbilityCategory enum from CampaignOptionsAbilityInfo.java.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
MekHQ/src/mekhq/utilities/spaUtilities/enums/AbilityCategory.java | New file containing the AbilityCategory enum. |
MekHQ/src/mekhq/gui/campaignOptions/contents/AbilitiesTab.java | Updated imports to reference the new AbilityCategory and removed unused imports. |
MekHQ/src/mekhq/gui/campaignOptions/CampaignOptionsPane.java | Updated static imports to reference the new AbilityCategory enum. |
MekHQ/src/mekhq/gui/campaignOptions/CampaignOptionsAbilityInfo.java | Removed the nested AbilityCategory enum in favor of using the imported enum. |
import mekhq.utilities.spaUtilities.enums.AbilityCategory; | ||
|
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] The non-static import of AbilityCategory may be redundant given that its individual constants are already imported statically. Consider removing it if the raw type reference is not required.
import mekhq.utilities.spaUtilities.enums.AbilityCategory; |
Copilot uses AI. Check for mistakes.
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.
I suggest to avoid doing just the static import of enum values once the class is moved to another places.
Dev Notes
I'm about to move some logic out of
AbilitiesTab.java
connected to the categorization of SPAs. This will allow that logic to be used anywhere, not just campaign options. However, to do that I needed to move the enum values out ofCampaignOptionsAbilityInfo.java
. I was advised to make a PR that just did the move and renaming, and then to follow up with the logic changes.