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

Add Customization Option to Refit Dialog #4992

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

WeaverThree
Copy link
Contributor

Using a refit kit is easier than and has different rules from customizing a mek, and until now the only way to use the customization rules was to use the meklab manually.

This setup allows you to use the customization rules to change mek to a any available variant without using the meklab tab, even when refit-to-canon-units-only is on. This means you can do more without using the meklab tab, and that customizing units in MegaMekLab externally is more viable in more scenarios.

Utilities.getAllVariants was changed but it's a single-client function.

As a bonus, the refit dialog now resizes a little better, with the mek view panels now enlarging with the window size.

This screenshot shows how only customize is available when the refit-to-canon-units-only option is turned on.

2024-10-05_102925

Using a refit kit is easier than and has different rules from customizing
a mek, and until now the only way to use the customization rules was to use
the meklab manually.

This setup also allows you to customize a mek to a non-canon variant but
only refit to a canon variant if canon-refits-only is turned on. This means
that when that option is enabled it is much easier to repeat saved meklab
customizations.

This further means that building mek variants in MegaMekLab and then carrying
out the customization as if you had done it inside MekHQMekLab is possible.

Utilities.getAllVariants was changed but that function only has the code
we're working on here calling it.
@IllianiCBT
Copy link
Collaborator

Thank you for this contribution and welcome to the project!

@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.47%. Comparing base (64f8158) to head (eb78f70).
Report is 16 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4992      +/-   ##
============================================
+ Coverage     10.46%   10.47%   +0.01%     
- Complexity     6022     6029       +7     
============================================
  Files           951      950       -1     
  Lines        133345   133395      +50     
  Branches      19378    19383       +5     
============================================
+ Hits          13955    13974      +19     
- Misses       118041   118077      +36     
+ Partials       1349     1344       -5     

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

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 0a90296 into MegaMek:master Oct 8, 2024
4 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
Development

Successfully merging this pull request may close these issues.

4 participants