mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
removed getImageKey(cp)
This commit is contained in:
@@ -88,7 +88,7 @@ public class ImageCache {
|
|||||||
* and cannot be loaded from disk. pass -1 for width and/or height to avoid resizing in that dimension.
|
* and cannot be loaded from disk. pass -1 for width and/or height to avoid resizing in that dimension.
|
||||||
*/
|
*/
|
||||||
public static BufferedImage getImage(InventoryItem ii, int width, int height) {
|
public static BufferedImage getImage(InventoryItem ii, int width, int height) {
|
||||||
return scaleImage(getImageKey(ii), width, height);
|
return scaleImage(getImageKey(ii, false), width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -164,14 +164,11 @@ public class ImageCache {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getImageKey(InventoryItem ii) {
|
|
||||||
return getImageKey(ii, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Inventory items don't have to know how a certain client should draw them.
|
// Inventory items don't have to know how a certain client should draw them.
|
||||||
// That's why this method is not encapsulated and overloaded in the InventoryItem descendants
|
// That's why this method is not encapsulated and overloaded in the InventoryItem descendants
|
||||||
public static String getImageKey(InventoryItem ii, boolean altState) {
|
public static String getImageKey(InventoryItem ii, boolean altState) {
|
||||||
if ( ii instanceof CardPrinted ) {
|
if ( ii instanceof CardPrinted ) {
|
||||||
|
// have to determine which pictures are present in our filesystem and use either set-pictures or non-set ones.
|
||||||
return getImageKey((CardPrinted)ii, altState, true);
|
return getImageKey((CardPrinted)ii, altState, true);
|
||||||
}
|
}
|
||||||
if ( ii instanceof TournamentPack )
|
if ( ii instanceof TournamentPack )
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ public class CardFactory {
|
|||||||
c.setRarity(cp.getRarity());
|
c.setRarity(cp.getRarity());
|
||||||
|
|
||||||
// Would like to move this away from in-game entities
|
// Would like to move this away from in-game entities
|
||||||
String originalPicture = ImageCache.getImageKey(cp);
|
String originalPicture = ImageCache.getImageKey(cp, false);
|
||||||
//System.out.println(c.getName() + " -> " + originalPicture);
|
//System.out.println(c.getName() + " -> " + originalPicture);
|
||||||
c.setImageKey(originalPicture);
|
c.setImageKey(originalPicture);
|
||||||
c.setToken(cp.isToken());
|
c.setToken(cp.isToken());
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ public class GuiDownloadSetPicturesLQ extends GuiDownloader {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String url = ImageCache.getDownloadUrl(c, false, true);
|
String url = ImageCache.getDownloadUrl(c, false, true);
|
||||||
addDLObject(url, ImageCache.getImageKey(c), downloads);
|
addDLObject(url, ImageCache.getImageKey(c, false, true), downloads);
|
||||||
|
|
||||||
if ( c.getRules().getSplitType() == CardSplitType.Transform ) {
|
if ( c.getRules().getSplitType() == CardSplitType.Transform ) {
|
||||||
String url2 = ImageCache.getDownloadUrl(c, true, true);
|
String url2 = ImageCache.getDownloadUrl(c, true, true);
|
||||||
addDLObject(url2, ImageCache.getImageKey(c, true), downloads);
|
addDLObject(url2, ImageCache.getImageKey(c, true, true), downloads);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user