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 5193: Weapon Bays only work at Short Range #5195

Merged

Conversation

Sleet01
Copy link
Collaborator

@Sleet01 Sleet01 commented Feb 23, 2024

This was more fallout from changing the getMaxRange() function signature: BayWeapon and InfantryWeapon both were overriding the single-argument version, so switching to the two-argument version caused the base WeaponType function to be called instead.

Testing:

  • Added a new unit test to confirm override is working correctly.
  • Re-ran all unit tests (some MekHQ tests still failing, unrelated).
  • Tested using @pheonixstorm 's save and confirmed correct ranges on various weapon bays.

Close #5193

Copy link
Member

@SJuliez SJuliez left a comment

Choose a reason for hiding this comment

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

Request to not use "this." unless necessary

@Sleet01
Copy link
Collaborator Author

Sleet01 commented Feb 23, 2024

Request to not use "this." unless necessary

Sure, but what's the rationale? I don't see it in the style guide...

@SJuliez
Copy link
Member

SJuliez commented Feb 23, 2024

Thanks. I'll put it in the style guide.

@SJuliez SJuliez merged commit 727e62b into MegaMek:master Feb 26, 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.

[0.49.19] Dropship weapon bays showing out of range even when in range
2 participants