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

Correct writing to XML of EMI and Blowing Sand conditions #3903

Merged

Conversation

AaronGullickson
Copy link
Member

This is for a bug that was introduced by PR #3834. The XML has stored EMI and blowing sand as boolean conditions. Backwards compatability is respected in the Scenario.generateInstancefromXML method. However in the writeToXML functions, these conditions are being written as an ordinal numeric value rather than a boolean. The result is that once a campaign is saved again, the EMI and blowingSand conditions, if true, will be lost. This is currently affecting Story Arcs. See AaronGullickson#25 for further discussion.

The fix is easy. Just write the results back out as a boolean. I have tested the code and it works correctly.

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 10.60%. Comparing base (71a87ab) to head (dcdcd3b).
Report is 2 commits behind head on master.

Files Patch % Lines
MekHQ/src/mekhq/campaign/mission/Scenario.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3903   +/-   ##
=========================================
  Coverage     10.60%   10.60%           
  Complexity     5487     5487           
=========================================
  Files           836      836           
  Lines        114267   114267           
  Branches      17184    17184           
=========================================
  Hits          12121    12121           
  Misses       100936   100936           
  Partials       1210     1210           

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

@AaronGullickson AaronGullickson merged commit c1e157d into MegaMek:master Mar 25, 2024
5 of 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
Development

Successfully merging this pull request may close these issues.

2 participants