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

Add mutation info to XML export/import. #2561

Merged
merged 4 commits into from
Feb 20, 2024
Merged

Conversation

m-sasha
Copy link
Contributor

@m-sasha m-sasha commented Dec 20, 2023

Currently, when exporting in XML format, the mutation information is lost, and when reimporting the file, Pyfa will simply ignore the mutated item, leaving an empty slot.

This PR implements writing/using mutation info when exporting/importing in XML format.

For mutated items (modules and drones), write and read these hardware tag attributes:

  • base_type, specifying the name of the base type.
  • mutaplasmid, specifying the name of the mutaplasmid.
  • mutated_attrs, specifying the mutated attributes and their values, in the format of EFT export, e.g. capacitorNeed 108.0, cpu 34.4.

@DarkFenX
Copy link
Member

Does EVE use XML for anything fit-related?

Primary reason I didn't add it to XML right away was that EVE was using XML for import/export, and I didn't want to break it (or implement, then test, then fix or find workarounds for stuff which was broken).

@DarkFenX
Copy link
Member

DarkFenX commented Dec 25, 2023

Ok, seems like it still uses XML for batch export/import. Can you test how mutated modules and drones are interpreted by EVE for import? Pretty sure it should ignore extended attributes, but idk how it will react to mutated item itself.

@m-sasha
Copy link
Contributor Author

m-sasha commented Dec 25, 2023

It ignores the extra attributes, and reacts to the mutated item as before:

image

@m-sasha
Copy link
Contributor Author

m-sasha commented Dec 27, 2023

Just to clarify - as EVE ignores the extended attributes, this PR changes nothing as far as it's concerned.

A fit with mutated modules exported from EVE and then imported back into EVE will have the same effect as the same fit exported from Pyfa (which is exactly how it behaved before).

@DarkFenX DarkFenX merged commit e2dbfb5 into pyfa-org:master Feb 20, 2024
1 check 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