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

Issue 4259: Fixing Dropship Heat-by-Arc for Players and Princess #6276

Merged

Conversation

psikomonkie
Copy link
Collaborator

@psikomonkie psikomonkie commented Dec 15, 2024

Fixes #4259

It works, Princess now fires as many weapons as she can when using the default Dropship heat rules, without going over the heat limit of dropships.

The original bug wasn't present (only using Aft weapons & the NPE), but Princess & grounded dropships were still doing funny stuff.

Bugs resolved:

  • Princess was improperly calculating the optimal firing plan when using the default rules for dropship heat.
  • Grounded dropships for the player were improperly calculating heat
  • Artillery fired by grounded dropships was not accounted for in Princess's firing plan, letting her go over her heat limit
  • UI bug related to showing arc heat

…grounded dropships to use individual weapons with heat-by-arc
Copy link

codecov bot commented Dec 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.95%. Comparing base (6fd4d32) to head (e568d81).
Report is 87 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6276      +/-   ##
============================================
- Coverage     28.99%   28.95%   -0.05%     
- Complexity    13983    14016      +33     
============================================
  Files          2652     2672      +20     
  Lines        268306   269228     +922     
  Branches      47768    47910     +142     
============================================
+ Hits          77803    77949     +146     
- Misses       186620   187379     +759     
- Partials       3883     3900      +17     

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

@psikomonkie psikomonkie changed the title ROUGH DRAFT: Issue 4259: Fixing Dropship Heat-by-Arc for Players and Princess Issue 4259: Fixing Dropship Heat-by-Arc for Players and Princess Dec 16, 2024
@psikomonkie psikomonkie marked this pull request as ready for review December 16, 2024 18:57
@psikomonkie
Copy link
Collaborator Author

This is ready for review. I would appreciate a code review for this as it's more than just a trivial change.

Thanks!

@Sleet01 Sleet01 self-requested a review December 16, 2024 20:27
Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

A couple of questions but overall looks good. I appreciate the code clean-up and safety checks you've added as well.

@psikomonkie
Copy link
Collaborator Author

Thank you @Sleet01! I made some changes at your suggestion.

Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Sleet01 Sleet01 merged commit 0f3db43 into MegaMek:master Dec 18, 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.12] Grounded Spheroid Dropships - Princess Does Not Fire Weapons Mounted In Front Left/Right Bays
3 participants