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

Read/Write AS/SBF units #5249

Merged
merged 18 commits into from
Mar 20, 2024
Merged

Read/Write AS/SBF units #5249

merged 18 commits into from
Mar 20, 2024

Conversation

SJuliez
Copy link
Member

@SJuliez SJuliez commented Mar 14, 2024

This PR adds the ability write and read AS elements and SBF formations and units to/from YAML-formatted files (that are similar to MTF but not a custom format and nice to read and edit). I called them MMU files to separate them from the unfortunate naming coincidence of "MUL". Current gameplay is not affected. The intended veeery long-term use is to be able to read in such units for use e.g. in scenarios. Scenarios allow bypassing the lobby and thus may make it slightly easier to add SBF game support (again, very long-term or maybe never, who knows).

It uses Jackson (a dependency we already have) with an added library for YAML. The main part of the changes are the custom serializers/deserializers which required a few small changes in the unit classes, MMUWriter and MMUReader, a few parsing additions in AS-related classes as well as some formatting examples.

@SJuliez SJuliez merged commit 151c55c into MegaMek:master Mar 20, 2024
4 checks passed
@SJuliez SJuliez deleted the yaml-as-sbf-rw branch April 2, 2024 15:48
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.

1 participant