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 4728: Safety getBay, add unit test, turn down logging in one location #4731

Conversation

Sleet01
Copy link
Collaborator

@Sleet01 Sleet01 commented Aug 28, 2024

Adds an additional anti-null check when getting the Bay name for a Part for a Unit that may not have its Entity set yet.
This info should be corrected later in the campaign loading process anyhow.

NOTE: the save file in #4728 did display missing/destroyed DS bay doors and cubicles on my system following this fix, but I was not able to repro that with a brand new save replicating the TOE layout. This save may be useful for replicating this bug in the future.

Testing:

  • Loaded OP's campaign save
  • Added a unit test for the specific failure
  • Ran all 3 projects' unit tests.

Close #4728

@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.81%. Comparing base (ce35073) to head (2b09f20).
Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #4731   +/-   ##
=========================================
  Coverage     10.80%   10.81%           
- Complexity     5712     5715    +3     
=========================================
  Files           950      950           
  Lines        131289   131302   +13     
  Branches      19136    19141    +5     
=========================================
+ Hits          14186    14194    +8     
- Misses       115879   115881    +2     
- Partials       1224     1227    +3     

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

@IllianiCBT IllianiCBT merged commit e1aaf22 into MegaMek:master Aug 28, 2024
3 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.50.0] Save files not loading on fresh campaign
4 participants