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

1
.gitattributes vendored
View File

@@ -10027,6 +10027,7 @@ res/quest/decks/quest8.dck -text
res/quest/decks/quest9.dck -text
res/quest/price.txt svneol=native#text/plain
res/quest/quest-opponent-icons.txt -text
res/quest/quest-pet-shop-icons.txt -text
res/quest/quest.preferences -text
res/quest/quest.properties svneol=native#text/plain
res/quest/themes/-1[!!-~]-1[!!-~]Counters[!!-~]BG.thm -text

View File

@@ -67,3 +67,4 @@ symbols/small--file=images/symbols-13
sound/base--file=sound
quest/opponent/icons--file=quest/quest-opponent-icons.txt
quest/pet/icons--file=quest/quest-pet-shop-icons.txt

View File

@@ -0,0 +1,23 @@
#Pet Shop Icon Links
b_1_1_crocodile_pet_small.jpg http://www.cardforge.org/fpics/pets/icons/b_1_1_crocodile_pet_small.jpg
b_2_1_crocodile_pet_small.jpg http://www.cardforge.org/fpics/pets/icons/b_2_1_crocodile_pet_small.jpg
b_2_1_crocodile_pet_small.jpg http://www.cardforge.org/fpics/pets/icons/b_3_1_crocodile_pet_small.jpg
b_3_1_crocodile_pet_swampwalk_small.jpg http://www.cardforge.org/fpics/pets/icons/b_3_1_crocodile_pet_swampwalk_small.jpg
g_0_1_plant_wall_small.jpg http://www.cardforge.org/fpics/pets/icons/g_0_1_plant_wall_small.jpg
g_0_2_plant_wall_small.jpg http://www.cardforge.org/fpics/pets/icons/g_0_2_plant_wall_small.jpg
g_0_3_plant_wall_small.jpg http://www.cardforge.org/fpics/pets/icons/g_0_3_plant_wall_small.jpg
g_1_1_wolf_pet_small.jpg http://www.cardforge.org/fpics/pets/icons/g_1_1_wolf_pet_small.jpg
g_1_2_wolf_pet_small.jpg http://www.cardforge.org/fpics/pets/icons/g_1_2_wolf_pet_small.jpg
g_1_3_plant_wall_deathtouch_small.jpg http://www.cardforge.org/fpics/pets/icons/g_1_3_plant_wall_deathtouch_small.jpg
g_1_3_plant_wall_small.jpg http://www.cardforge.org/fpics/pets/icons/g_1_3_plant_wall_small.jpg
g_1_4_plant_wall_small.jpg http://www.cardforge.org/fpics/pets/icons/g_1_4_plant_wall_small.jpg
g_2_2_wolf_pet_small.jpg http://www.cardforge.org/fpics/pets/icons/g_2_2_wolf_pet_flanking_small.jpg
g_2_2_wolf_pet_flanking_small.jpg http://www.cardforge.org/fpics/pets/icons/g_2_2_wolf_pet_small.jpg
r_1_1_hound_pet_small.jpg http://www.cardforge.org/fpics/pets/icons/r_1_1_hound_pet_haste_small.jpg
r_1_1_hound_pet_haste_small.jpg http://www.cardforge.org/fpics/pets/icons/r_1_1_hound_pet_small.jpg
r_2_1_hound_pet_small.jpg http://www.cardforge.org/fpics/pets/icons/r_2_1_hound_pet_alone_small.jpg
r_2_1_hound_pet_alone_small.jpg http://www.cardforge.org/fpics/pets/icons/r_2_1_hound_pet_small.jpg
w_0_1_bird_pet._smalljpg http://www.cardforge.org/fpics/pets/icons/w_0_1_bird_pet_small.jpg
w_1_1_bird_pet._smalljpg http://www.cardforge.org/fpics/pets/icons/w_1_1_bird_pet_small.jpg
w_2_1_bird_pet._smalljpg http://www.cardforge.org/fpics/pets/icons/w_2_1_bird_pet_first_strike_small.jpg
w_2_1_bird_pet_first_strike_small.jpg http://www.cardforge.org/fpics/pets/icons/w_2_1_bird_pet_small.jpg

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;
@@ -57,6 +58,14 @@ public class GuiDownloadQuestImages extends GuiDownloader {
}
}
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()];
urls.toArray(out);

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";
}
/**