mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
In-game downloading Part 5:
1) add Pet Shop icons to Quest Images Download (still work-in-progress)
This commit is contained in:
@@ -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()];
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user