mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
In-game downloading Part 6:
1) add Quest pet token image downloading to GuiDownloadQuestImages (still a work in progress)
This commit is contained in:
@@ -39,6 +39,7 @@ public class GuiDownloadQuestImages extends GuiDownloader {
|
||||
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));
|
||||
DownloadObject[] questPets = readFileWithNames(QUEST.PET_TOKEN_IMAGES, ForgeProps.getFile(IMAGE_TOKEN));
|
||||
ArrayList<DownloadObject> urls = new ArrayList<DownloadObject>();
|
||||
|
||||
File file;
|
||||
@@ -65,6 +66,14 @@ public class GuiDownloadQuestImages extends GuiDownloader {
|
||||
urls.add(petIcons[i]);
|
||||
}
|
||||
}
|
||||
|
||||
dir = ForgeProps.getFile(IMAGE_TOKEN);
|
||||
for (int i = 0; i < questPets.length; i++) {
|
||||
file = new File(dir, questPets[i].name.replace("%20", " "));
|
||||
if (!file.exists()) {
|
||||
urls.add(questPets[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//return all card names and urls that are needed
|
||||
DownloadObject[] out = new DownloadObject[urls.size()];
|
||||
|
||||
@@ -165,6 +165,8 @@ public interface NewConstants {
|
||||
String OPPONENT_DIR = "image/icon";
|
||||
|
||||
String PET_SHOP_ICONS = "quest/pet/icons";
|
||||
|
||||
String PET_TOKEN_IMAGES = "quest/pet/tokens";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user