diff --git a/.gitattributes b/.gitattributes index c32f33b13eb..8ab3ba53ef8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10028,6 +10028,7 @@ 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-pet-token-images.txt -text res/quest/quest.preferences -text res/quest/quest.properties svneol=native#text/plain res/quest/themes/-1[!!-~]-1[!!-~]Counters[!!-~]BG.thm -text diff --git a/res/main.properties b/res/main.properties index d5a7079f1fc..5174772278b 100644 --- a/res/main.properties +++ b/res/main.properties @@ -68,3 +68,4 @@ sound/base--file=sound quest/opponent/icons--file=quest/quest-opponent-icons.txt quest/pet/icons--file=quest/quest-pet-shop-icons.txt +quest/pet/tokens--file=quest/quest-pet-token-images.txt diff --git a/res/quest/quest-pet-token-images.txt b/res/quest/quest-pet-token-images.txt new file mode 100644 index 00000000000..a1390bf811e --- /dev/null +++ b/res/quest/quest-pet-token-images.txt @@ -0,0 +1,23 @@ +#Pet Links +b_1_1_crocodile_pet.jpg http://www.cardforge.org/fpics/pets/tokens/b_1_1_crocodile_pet.jpg +b_2_1_crocodile_pet.jpg http://www.cardforge.org/fpics/pets/tokens/b_2_1_crocodile_pet.jpg +b_2_1_crocodile_pet.jpg http://www.cardforge.org/fpics/pets/tokens/b_3_1_crocodile_pet.jpg +b_3_1_crocodile_pet_swampwalk.jpg http://www.cardforge.org/fpics/pets/tokens/b_3_1_crocodile_pet_swampwalk.jpg +g_0_1_plant_wall.jpg http://www.cardforge.org/fpics/pets/tokens/g_0_1_plant_wall.jpg +g_0_2_plant_wall.jpg http://www.cardforge.org/fpics/pets/tokens/g_0_2_plant_wall.jpg +g_0_3_plant_wall.jpg http://www.cardforge.org/fpics/pets/tokens/g_0_3_plant_wall.jpg +g_1_1_wolf_pet.jpg http://www.cardforge.org/fpics/pets/tokens/g_1_1_wolf_pet.jpg +g_1_2_wolf_pet.jpg http://www.cardforge.org/fpics/pets/tokens/g_1_2_wolf_pet.jpg +g_1_3_plant_wall.jpg http://www.cardforge.org/fpics/pets/tokens/g_1_3_plant_wall.jpg +g_1_3_plant_wall_deathtouch.jpg http://www.cardforge.org/fpics/pets/tokens/g_1_3_plant_wall_deathtouch.jpg +g_1_4_plant_wall.jpg http://www.cardforge.org/fpics/pets/tokens/g_1_4_plant_wall.jpg +g_2_2_wolf_pet.jpg http://www.cardforge.org/fpics/pets/tokens/g_2_2_wolf_pet.jpg +g_2_2_wolf_pet_flanking.jpg http://www.cardforge.org/fpics/pets/tokens/g_2_2_wolf_pet_flanking.jpg +r_1_1_hound_pet.jpg http://www.cardforge.org/fpics/pets/tokens/r_1_1_hound_pet.jpg +r_1_1_hound_pet_haste.jpg http://www.cardforge.org/fpics/pets/tokens/r_1_1_hound_pet_haste.jpg +r_2_1_hound_pet.jpg http://www.cardforge.org/fpics/pets/tokens/r_2_1_hound_pet.jpg +r_2_1_hound_pet_alone.jpg http://www.cardforge.org/fpics/pets/tokens/r_2_1_hound_pet_alone.jpg +w_0_1_bird_pet.jpg http://www.cardforge.org/fpics/pets/tokens/w_0_1_bird_pet.jpg +w_1_1_bird_pet.jpg http://www.cardforge.org/fpics/pets/tokens/w_1_1_bird_pet.jpg +w_2_1_bird_pet.jpg http://www.cardforge.org/fpics/pets/tokens/w_2_1_bird_pet.jpg +w_2_1_bird_pet_first_strike.jpg http://www.cardforge.org/fpics/pets/tokens/w_2_1_bird_pet_first_strike.jpg \ No newline at end of file diff --git a/src/main/java/forge/GuiDownloadQuestImages.java b/src/main/java/forge/GuiDownloadQuestImages.java index eb6c599ef4a..a6579890fdf 100644 --- a/src/main/java/forge/GuiDownloadQuestImages.java +++ b/src/main/java/forge/GuiDownloadQuestImages.java @@ -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 urls = new ArrayList(); 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()]; diff --git a/src/main/java/forge/properties/NewConstants.java b/src/main/java/forge/properties/NewConstants.java index 0d164ab02c9..ffb7c16198f 100644 --- a/src/main/java/forge/properties/NewConstants.java +++ b/src/main/java/forge/properties/NewConstants.java @@ -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"; } /**