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

Quirks misc code changes #4944

Merged
merged 3 commits into from
Dec 13, 2023
Merged

Quirks misc code changes #4944

merged 3 commits into from
Dec 13, 2023

Conversation

SJuliez
Copy link
Member

@SJuliez SJuliez commented Dec 8, 2023

Looking at allowing Quirk editing in MML, so I really needed some API improvements for Quirks and WeaponQuirks. Also updates and condenses the Quirks validity checks.

In the MechSummary, the weapon quirks list now shows the weapon location. In the weapon list, weapons with quirks get a (Q) marker.

image


/**
* Sets the value
*
* @param value value to set
*/
public abstract void setValue(Object value);
void setValue(Object value);

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method IOption.setValue(..) could be confused with overloaded method
setValue
, since dispatch depends on static types.
Copy link
Member Author

Choose a reason for hiding this comment

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

legacy issue. Seems no problem at this moment. I tried, can't just remove it.

@SJuliez SJuliez changed the title Quirks updates Quirks misc code changes Dec 11, 2023
@HammerGS
Copy link
Member

I've been testing the Quirks branch's and everything seems to work. But I haven't tested a unit with every quirk.

Copy link
Member

@NickAragua NickAragua left a comment

Choose a reason for hiding this comment

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

One or two loose questions/thoughts.

megamek/src/megamek/common/options/Quirks.java Outdated Show resolved Hide resolved
@SJuliez
Copy link
Member Author

SJuliez commented Dec 12, 2023

Hehe I gave myself some conflicts :)

# Conflicts:
#	megamek/src/megamek/common/options/Quirks.java
@SJuliez SJuliez merged commit f031b10 into MegaMek:master Dec 13, 2023
4 checks passed
@SJuliez SJuliez deleted the Quirks_Updates branch February 4, 2024 22:00
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.

3 participants