diff --git a/.gitattributes b/.gitattributes index ea4804fab97..c32f33b13eb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/res/main.properties b/res/main.properties index 13a4345ae7a..d5a7079f1fc 100644 --- a/res/main.properties +++ b/res/main.properties @@ -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 diff --git a/res/quest/quest-pet-shop-icons.txt b/res/quest/quest-pet-shop-icons.txt new file mode 100644 index 00000000000..c45d26d05e1 --- /dev/null +++ b/res/quest/quest-pet-shop-icons.txt @@ -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 \ No newline at end of file diff --git a/src/main/java/forge/GuiDownloadQuestImages.java b/src/main/java/forge/GuiDownloadQuestImages.java index f06cfb86ddd..eb6c599ef4a 100644 --- a/src/main/java/forge/GuiDownloadQuestImages.java +++ b/src/main/java/forge/GuiDownloadQuestImages.java @@ -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 urls = new ArrayList(); 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()]; diff --git a/src/main/java/forge/properties/NewConstants.java b/src/main/java/forge/properties/NewConstants.java index 65c5f294649..0d164ab02c9 100644 --- a/src/main/java/forge/properties/NewConstants.java +++ b/src/main/java/forge/properties/NewConstants.java @@ -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"; } /**