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 6240: era-illegal asf bombs [Note: breaks MHQ] #6254

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Sleet01
Copy link
Collaborator

@Sleet01 Sleet01 commented Dec 11, 2024

Fixes the long-standing issue where automatically-generated ASF munitions ignore era restrictions, leading to e.g. early CI enemy forces with Thunder bombs.
The implementation re-uses existing era legality checks from the non-ASF munitions generation code.
Auto-generated ASF munitions should now all be restricted to era-appropriate options in both MM and MHQ.

As a sop to Princess, however, this also implements Rocket Launcher (Prototype), or RL-P, bomb pods.
This will allow Clan ASFs to be equipped with RL-P pods through 2823, and IS ASFs from the Early Spaceflight period on.

Testing:

  • Ran all 3 suites' unit tests (This breaks MHQ, requiring a separate patch there)
  • Added unit tests to confirm era-appropriate munition selection for IS and Clan units.

NOTE: MegaMek/mekhq#5337 needs to be pulled in close conjunction with this PR.

Close #6240

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.03%. Comparing base (2e45dc0) to head (5ad56d7).
Report is 9 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6254      +/-   ##
============================================
+ Coverage     28.99%   29.03%   +0.04%     
- Complexity    13982    14008      +26     
============================================
  Files          2652     2653       +1     
  Lines        268296   268377      +81     
  Branches      47764    47770       +6     
============================================
+ Hits          77799    77934     +135     
+ Misses       186615   186543      -72     
- Partials       3882     3900      +18     

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

@Sleet01 Sleet01 requested a review from IllianiCBT December 11, 2024 20:24
Copy link
Collaborator

@IllianiCBT IllianiCBT left a comment

Choose a reason for hiding this comment

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

I am always nervous reviewing MM content, but this looks fine to my eyes. I would prefer a second opinion before it gets merged.

@Sleet01 Sleet01 requested a review from NickAragua December 12, 2024 19:08
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.

47.14 MekHQ/MegaMek Load Aircraft with bombs that don't exist at that time.
2 participants