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 4061: Failure to load older Campaign save #4064

Conversation

Sleet01
Copy link
Collaborator

@Sleet01 Sleet01 commented May 8, 2024

Issues for the reported campaign are twofold:

  1. 3 Persons use a systemId that has changed in 0.49.19, causing the planetId lookup to fail.
  2. At least one infantry unit has a quirk or ability that grants it BAP equivalent sensors, but no actual sensors; this causes a new-to-0.49.19 cleanup step to fail on loading the unit(s).

Fix is to add try/catch and better conditionals around the failing code blocks.

Testing:

  • Ran all three projects' unit tests
  • Added unit test for clearGameData() with affected Infantry unit instance.
  • Loaded OP's previously-failing campaign save successfully.

Close #4061

@Sleet01 Sleet01 added the Milestone Backport Candidate This PR is a candidate to be backported to the Milestone branch label May 8, 2024
@Sleet01 Sleet01 requested a review from kuronekochomusuke May 8, 2024 21:13
@Sleet01 Sleet01 merged commit 0a62283 into MegaMek:master May 8, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Milestone Backport Candidate This PR is a candidate to be backported to the Milestone branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attached campaign no longer loads after 49.19
2 participants