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

Fix MekHQ #3761: update munitions equality tests in mm #4797

Merged

Conversation

Sleet01
Copy link
Collaborator

@Sleet01 Sleet01 commented Sep 19, 2023

I missed a couple of equality checks between munitions; as .getMunitionType() now returns an EnumSet of applicable Munitions from the Munitions Enum (usually M_STANDARD, but occasionally two or more), we need to use X.equals(Y).

If X has all the same flags as Y, this returns true. I'd initially used .containsAll() but this would have introduced subtle errors with some Munitions mixtures.

See also related PRs for MekHQ and MML.

@NickAragua NickAragua merged commit 60603a2 into MegaMek:master Sep 21, 2023
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.

2 participants