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 6127: softlock during invalid Pointblank Shot #6496

Merged

Conversation

Sleet01
Copy link
Collaborator

@Sleet01 Sleet01 commented Feb 5, 2025

There were actually two issues in 6127:

  1. Invalid units allowed to make Pointblank Shots against Aerospace units;
  2. Skip Attack button had no event handler, did nothing whatsover in the PBS display.

This patch fixes both issues, so that only units that can make PBS attacks get the prompt, and the user can use the Skip Attacks button if they change their mind (or if an invalid unit somehow slips through and gets a PBS prompt).
Also fixes #6128, hidden units remaining hidden if they choose not to use PBS but would have been revealed, and implements fly-over side scanning for ASFs with Active Probes.

Testing:

  • Manually tested PBS display and handling with A) illegal units, B) user choosing not to fire.
  • Added unit tests for new Compute function
  • Ran all 3 projects' unit tests

Close #6127
Close #6128
Implements ASF errata here: https://bg.battletech.com/forums/index.php?topic=84054.0

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.56%. Comparing base (9bf6d6e) to head (d42a4fb).
Report is 15 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6496      +/-   ##
============================================
+ Coverage     28.55%   28.56%   +0.01%     
- Complexity    14465    14494      +29     
============================================
  Files          2815     2815              
  Lines        277309   277355      +46     
  Branches      48973    48987      +14     
============================================
+ Hits          79175    79221      +46     
+ Misses       193434   193420      -14     
- Partials       4700     4714      +14     

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

@Sleet01 Sleet01 requested a review from SJuliez February 5, 2025 01:25
@Sleet01 Sleet01 marked this pull request as draft February 5, 2025 04:16
@Sleet01
Copy link
Collaborator Author

Sleet01 commented Feb 5, 2025

Converting to draft to pull in the fix for #6128 and update Aerospace spotting to match the errata.

@Sleet01 Sleet01 force-pushed the Fix_6127_softlock_during_invalid_PBS branch from 10a9344 to d42a4fb Compare February 6, 2025 21:11
@Sleet01 Sleet01 marked this pull request as ready for review February 6, 2025 21:11
@Sleet01 Sleet01 merged commit 27f04b2 into MegaMek:master Feb 7, 2025
6 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
2 participants