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

0.49.3 - Dropship Mechbay Door (x 1) on one dropship always shows as destroyed when save file is loaded #2878

Closed
UlyssesSockdrawer opened this issue Sep 16, 2021 · 3 comments · Fixed by #2879

Comments

@UlyssesSockdrawer
Copy link
Collaborator

Environment

MHQ Version 0.49.3, MHQ combined download
OS: Win10
JR: Open JDK11

Description

Campaign file and customs attached.

Each time the campaign save is loaded, one dropship (Union 2) has a single mechbay door load as destroyed. I have been fixing this by GM'ing in parts and GM completing the repair.

It is always the same dropship and always the same mechbay door.

Nothing is shown in the logs.

Files

Rickie's Roughriders30501219.cpnx.gz
customs.zip

@HoneySkull
Copy link
Collaborator

I was able to reproduce this issue on a blank campaign file with 1 Union class dropship in 0.49.3.

  1. Create a new campaign (in 3050 //not sure if that matters)
  2. GM add a new Union (2708) dropship.
  3. In the Hangar GM Edit damage and click a damage on the bay door.
  4. Go into the repair bay left click on the damaged bay door and scrap the part.
  5. Save the campaign file.

Now when you go back into the campaign file. You can GM add part and repair the part and save the campaign... but when you reload the campaign the drop ship still thinks the bay part is scrapped.

I'm going to take a look at the code as I was in there recently to see if I can find what is going on.

@HoneySkull
Copy link
Collaborator

A work-around for this until it is fixed may be to GM-remove the dropship from your campaign and then GM add a new one back and save. (I would Unassigned the crew first, and then reassign them on the new dropship.)

@HoneySkull
Copy link
Collaborator

It appears that when a bay door on the union is scrapped and then repaired, the repaired door is added to the unit's part list, but the parent child relationship is not maintained. (The Bay only referenced on child bay door, and an orphan bay door is added to the units Part list but has a null/0 parent id which doesn't get stored to save file.

I'm guessing then when the unit is loaded from the file, it appears to be missing the bay door because the child / parent relationship is not restored on the repair.

i.e. Each time you repair and save the file, an additional orphaned bay door is added to the dropship part dope.

Missing Bay Door

missingBayDoor

Orphan Bay Doors

After fixing and saving three times after having a scrapped bay door, three orphan doors appear in the dropship's part list. //Notice: There is no parent tag as the parent ID on that part object was 0 in memory before being saved. The issue isn't with the de-serialization, but with linking parent/child relationship on the repair.

orphanBayDoors

Simple Sample File

File is a sample from 0.49.3 but I was able to reproduce in 0.48.0 as well.

Broken Dropship30500106.cpnx.gz

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 a pull request may close this issue.

2 participants