Limit preloading

This commit is contained in:
Anthony Calosa
2021-04-05 11:25:42 +08:00
parent 5752fe698f
commit e3caad856d

View File

@@ -239,11 +239,12 @@ public class ImageCache {
return;
if(deck == null||!Forge.enablePreloadExtendedArt)
return;
for (PaperCard p : deck.getAllCardsInASinglePool().toFlatList()) {
if (getImage(p.getImageKey(false),false) == null)
System.err.println("could not load card image:"+p.toString());
if (deck.getAllCardsInASinglePool().toFlatList().size() <= 100) {
for (PaperCard p : deck.getAllCardsInASinglePool().toFlatList()) {
if (getImage(p.getImageKey(false),false) == null)
System.err.println("could not load card image:"+p.toString());
}
}
}
public static TextureRegion croppedBorderImage(Texture image) {
if (!image.toString().contains(".fullborder."))