In-game downloading Part 5:

1) add Pet Shop icons to Quest Images Download
(still work-in-progress)
This commit is contained in:
slapshot5
2011-10-24 04:50:37 +00:00
parent d1ccee92ce
commit e87f7b8ae8
5 changed files with 36 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ public class GuiDownloadQuestImages extends GuiDownloader {
//read all card names and urls
DownloadObject[] questOpponents = readFile(QUEST.OPPONENT_ICONS, ForgeProps.getFile(QUEST.OPPONENT_DIR));
DownloadObject[] boosterImages = readFile(PICS_BOOSTER_IMAGES, ForgeProps.getFile(PICS_BOOSTER));
DownloadObject[] petIcons = readFileWithNames(QUEST.PET_SHOP_ICONS, ForgeProps.getFile(IMAGE_ICON));
ArrayList<DownloadObject> urls = new ArrayList<DownloadObject>();
File file;
@@ -56,6 +57,14 @@ public class GuiDownloadQuestImages extends GuiDownloader {
urls.add(boosterImages[i]);
}
}
dir = ForgeProps.getFile(IMAGE_ICON);
for (int i = 0; i < petIcons.length; i++) {
file = new File(dir, petIcons[i].name.replace("%20", " "));
if (!file.exists()) {
urls.add(petIcons[i]);
}
}
//return all card names and urls that are needed
DownloadObject[] out = new DownloadObject[urls.size()];

View File

@@ -163,6 +163,8 @@ public interface NewConstants {
String OPPONENT_ICONS = "quest/opponent/icons";
String OPPONENT_DIR = "image/icon";
String PET_SHOP_ICONS = "quest/pet/icons";
}
/**