Merge branch 'patch-5' into 'master'

Update ImageKeys.java to support .full images first art variant renaming optional

See merge request core-developers/forge!2703
This commit is contained in:
austinio7116
2020-04-13 13:55:17 +00:00

View File

@@ -116,9 +116,12 @@ public final class ImageKeys {
String fullborderFile = TextUtil.fastReplace(filename, ".full", ".fullborder");
file = findFile(dir, fullborderFile);
if (file != null) { return file; }
// if there's an art variant try without it
// if there's a 1st art variant try without it for .fullborder images
file = findFile(dir, TextUtil.fastReplace(fullborderFile, "1.fullborder", ".fullborder"));
if (file != null) { return file; }
// if there's a 1st art variant try without it for .full images
file = findFile(dir, TextUtil.fastReplace(filename, "1.full", ".full"));
if (file != null) { return file; }
}
//if an image, like phenomenon or planes is missing .full in their filenames but you have an existing images that have .full/.fullborder
if (!filename.contains(".full")) {