[Desktop] Update card audit

- only display the missing cards and not implemented cards.
This commit is contained in:
Anthony Calosa
2021-10-23 13:36:00 +08:00
parent abdfe58bb2
commit 0d194ba645

View File

@@ -262,8 +262,9 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
for (CardEdition e : editions) { for (CardEdition e : editions) {
if (CardEdition.Type.FUNNY.equals(e.getType())) if (CardEdition.Type.FUNNY.equals(e.getType()))
continue; continue;
nifSB.append("Edition: ").append(e.getName()).append(" ").append("(").append(e.getCode()).append("/").append(e.getCode2()).append(")\n"); boolean nifHeader = false;
cniSB.append("Edition: ").append(e.getName()).append(" ").append("(").append(e.getCode()).append("/").append(e.getCode2()).append(")\n"); boolean cniHeader = false;
boolean tokenHeader = false;
String imagePath; String imagePath;
int artIndex = 1; int artIndex = 1;
@@ -289,6 +290,10 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
} }
if (cp == null) { if (cp == null) {
if (!cniHeader) {
cniSB.append("Edition: ").append(e.getName()).append(" ").append("(").append(e.getCode()).append("/").append(e.getCode2()).append(")\n");
cniHeader = true;
}
cniSB.append(" ").append(c).append("\n"); cniSB.append(" ").append(c).append("\n");
notImplementedCount++; notImplementedCount++;
continue; continue;
@@ -302,6 +307,10 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
if (imagePath != null) { if (imagePath != null) {
File file = ImageKeys.getImageFile(imagePath); File file = ImageKeys.getImageFile(imagePath);
if (file == null) { if (file == null) {
if (!nifHeader) {
nifSB.append("Edition: ").append(e.getName()).append(" ").append("(").append(e.getCode()).append("/").append(e.getCode2()).append(")\n");
nifHeader = true;
}
nifSB.append(" ").append(imagePath).append("\n"); nifSB.append(" ").append(imagePath).append("\n");
missingCount++; missingCount++;
} }
@@ -315,6 +324,10 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
if (imagePath != null) { if (imagePath != null) {
File file = ImageKeys.getImageFile(imagePath); File file = ImageKeys.getImageFile(imagePath);
if (file == null) { if (file == null) {
if (!nifHeader) {
nifSB.append("Edition: ").append(e.getName()).append(" ").append("(").append(e.getCode()).append("/").append(e.getCode2()).append(")\n");
nifHeader = true;
}
nifSB.append(" ").append(imagePath).append("\n"); nifSB.append(" ").append(imagePath).append("\n");
missingCount++; missingCount++;
} }
@@ -322,8 +335,6 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
} }
} }
nifSB.append("\nTOKENS\n");
// TODO: Audit token images here... // TODO: Audit token images here...
for(Entry<String, Integer> tokenEntry : e.getTokens().entrySet()) { for(Entry<String, Integer> tokenEntry : e.getTokens().entrySet()) {
String name = tokenEntry.getKey(); String name = tokenEntry.getKey();
@@ -338,6 +349,14 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
String imgKey = token.getImageKey(i); String imgKey = token.getImageKey(i);
File file = ImageKeys.getImageFile(imgKey); File file = ImageKeys.getImageFile(imgKey);
if (file == null) { if (file == null) {
if (!nifHeader) {
nifSB.append("Edition: ").append(e.getName()).append(" ").append("(").append(e.getCode()).append("/").append(e.getCode2()).append(")\n");
nifHeader = true;
}
if (!tokenHeader) {
nifSB.append("\nTOKENS\n");
tokenHeader = true;
}
nifSB.append(" ").append(token.getImageFilename(i + 1)).append("\n"); nifSB.append(" ").append(token.getImageFilename(i + 1)).append("\n");
missingCount++; missingCount++;
} }
@@ -346,7 +365,8 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
System.out.println("No Token found: " + name + " in " + e.getName()); System.out.println("No Token found: " + name + " in " + e.getName());
} }
} }
nifSB.append("\n"); if (nifHeader)
nifSB.append("\n");
} }