-
Notifications
You must be signed in to change notification settings - Fork 286
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 1182 mixed tech ds do not save ba tech type #4709
Fix 1182 mixed tech ds do not save ba tech type #4709
Conversation
Initial commit to fix MML issue MegaMek#1182. Adds more fields to bay representation in strings and objects; normalizes string representations so all bays use the same fields in the same ways - no more bay #, _or_ infantry type, _or_ facing in one field.
Added a test file for BLKDropshipFile.java that reads a BLK-file string in and confirms new BattleArmor bay behavior.
I ended up not needing Mockito after all.
I'll update the PR to fix the above issues tonight. |
Add some extra exception handling, fix string equality check, make bit-wise operation safer.
It appears that we have been writing empty <transporters> blocks into every vehicle for the past 6 or so years. These blocks should not exist in, e.g., combat vehicles, but apparently went unnoticed due to loose handling of the relevant block when empty. This change adds a new test prior to processing these empty blocks on file load, a function to support this test, and a conditional around writing the <transporters> block to prevent writing empty blocks in every .BLK file.
New function "containsData" encompasses this call already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this do ok loading both "before" and "after" blk files?
Edit: reading the PR notes, apparently mostly yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, but I'll leave this up for a little bit for others to take a look at as it is fairly extensive.
Merging so QA has access to test. |
Fairly extensive overhaul of Transporter bay encoding / decoding to fix MML 1182 so that mixed-tech vehicles with BA transport bays can utilize the correct type and save/load correctly.
Overview:
New bay "numbers" format:
Compatibility: