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

Load data from story arcs #5266

Merged
merged 1 commit into from
Mar 20, 2024
Merged

Conversation

AaronGullickson
Copy link
Member

(Note: this is a revision of PR #5265 on a clean fork without junk commits)

This PR is related to MegaMek/mekhq#2997, but needs to be handled separately because it involves megamek rather than mekhq code. Creators will in many cases want to load custom data such as portraits, camos, force logos, and customized mechs to be used in the story arc, but these will need to be loaded by megamek to be accessible. That is the purpose of this PR. It adds code to loop through subdirectories in the data/storyarcs directory to look for the following things and loads them:

  • portraits (must be in subdirectory data/images/portraits, relative to the story arc top-level directory).
  • camo (must be in subdirectory data/images/camo, relative to the story arc top-level directory). An additional complexity here is that the images must actually be in subfolders of data/images/camo for this to work. This seems to be a general limitation of camo images. If you try to put images directly in the main data/images/camo and not in a subdirectory they will not work either. Might be a bug?
  • custom units (must be in subdirectory data/mechfiles relative to the story arc top-level directory).

I was also thinking about doing boards, but these appear to be much more complicated, so I am gong to hold off on that for the moment.

I also want to allow for custom force logos, but that is a mekhq issue so it will be handled from there.

@SJuliez SJuliez merged commit c559618 into MegaMek:master Mar 20, 2024
4 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