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

#3763 reversing quality names in unit set quality GM menu #3824

Merged
merged 4 commits into from
Feb 4, 2024

Conversation

jackreichelt
Copy link
Contributor

This fixes #3763. When setting the quality of a unit in the Hangar the quality names are properly reversed.

Code duplicated from PartsTableMouseAdapter#actionPerformed

@jackreichelt
Copy link
Contributor Author

jackreichelt commented Jan 31, 2024

Just found that the quality names also need to reverse in the Campaign Options > Finances > Price Multipliers > Used Parts Value Multipliers.
image

I'll look into this in a day or two.

@jackreichelt
Copy link
Contributor Author

Just found that the quality names also need to reverse in the Campaign Options > Finances > Price Multipliers > Used Parts Value Multipliers. image

I'll look into this in a day or two.

All done now.

Comment on lines 182 to 185
Object[] possibilities = { Part.getQualityName(Part.QUALITY_A, reverse),
Part.getQualityName(Part.QUALITY_B, reverse), Part.getQualityName(Part.QUALITY_C, reverse),
Part.getQualityName(Part.QUALITY_D, reverse), Part.getQualityName(Part.QUALITY_E, reverse),
Part.getQualityName(Part.QUALITY_F, reverse) };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the review guide as this is a little hard to read. Might need to put each quality on its own line to make reading it easier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved each to its own line. Also did this in PartsTableMouseAdapter where I copied this chunk from.

Copy link

codecov bot commented Feb 3, 2024

Codecov Report

Attention: 99 lines in your changes are missing coverage. Please review.

Comparison is base (3fc49e6) 10.63% compared to head (e0277ed) 10.62%.
Report is 17 commits behind head on master.

Files Patch % Lines
MekHQ/src/mekhq/utilities/MHQXMLUtility.java 8.82% 62 Missing ⚠️
...Q/src/mekhq/gui/adapter/UnitTableMouseAdapter.java 0.00% 17 Missing ⚠️
MekHQ/src/mekhq/gui/panes/CampaignOptionsPane.java 0.00% 13 Missing ⚠️
.../src/mekhq/gui/adapter/PartsTableMouseAdapter.java 0.00% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3824      +/-   ##
============================================
- Coverage     10.63%   10.62%   -0.01%     
+ Complexity     5474     5472       -2     
============================================
  Files           834      834              
  Lines        113836   113841       +5     
  Branches      17198    17198              
============================================
- Hits          12106    12101       -5     
- Misses       100524   100533       +9     
- Partials       1206     1207       +1     

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

Copy link
Collaborator

@rjhancock rjhancock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the one comment, just adding a flag for reversing of Quality names.

Copy link
Collaborator

@rjhancock rjhancock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks much better and easier to read.

@HammerGS HammerGS merged commit 3afc62f into MegaMek:master Feb 4, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants