Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(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:data/images/portraits
, relative to the story arc top-level directory).data/images/camo
, relative to the story arc top-level directory). An additional complexity here is that the images must actually be in subfolders ofdata/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 maindata/images/camo
and not in a subdirectory they will not work either. Might be a bug?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.