mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Merge branch 'master' into 'master'
Disable missingcards cache for desktop See merge request core-developers/forge!6030
This commit is contained in:
@@ -31,12 +31,17 @@ public final class ImageKeys {
|
||||
|
||||
private static Map<String, Boolean> editionImageLookup = new HashMap<>();
|
||||
|
||||
private static boolean isLibGDXPort = false;
|
||||
|
||||
/**
|
||||
* Private constructor to prevent instantiation.
|
||||
*/
|
||||
private ImageKeys() {
|
||||
}
|
||||
|
||||
public static void setIsLibGDXPort(boolean value) {
|
||||
isLibGDXPort = value;
|
||||
}
|
||||
public static void initializeDirs(String cards, Map<String, String> cardsSub, String tokens, String icons, String boosters,
|
||||
String fatPacks, String boosterBoxes, String precons, String tournamentPacks) {
|
||||
CACHE_CARD_PICS_DIR = cards;
|
||||
@@ -244,8 +249,9 @@ public final class ImageKeys {
|
||||
}
|
||||
|
||||
// System.out.println("File not found, no image created: " + key);
|
||||
//add missing cards
|
||||
missingCards.add(filename);
|
||||
//add missing cards - disable for desktop version for compatibility reasons with autodownloader
|
||||
if (isLibGDXPort)
|
||||
missingCards.add(filename);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ package forge;
|
||||
|
||||
import forge.control.FControl;
|
||||
import forge.gui.FThreads;
|
||||
import forge.gui.GuiBase;
|
||||
import forge.model.FModel;
|
||||
import forge.view.FView;
|
||||
|
||||
@@ -51,6 +52,7 @@ public final class Singletons {
|
||||
view = FView.SINGLETON_INSTANCE;
|
||||
}
|
||||
|
||||
ImageKeys.setIsLibGDXPort(GuiBase.getInterface().isLibgdxPort());
|
||||
FModel.initialize(view == null ? null : view.getSplash().getProgressBar(), null);
|
||||
|
||||
if (withUi) {
|
||||
|
||||
@@ -185,6 +185,7 @@ public class Forge implements ApplicationListener {
|
||||
AssetsDownloader.checkForUpdates(splashScreen);
|
||||
if (exited) { return; } //don't continue if user chose to exit or couldn't download required assets
|
||||
|
||||
ImageKeys.setIsLibGDXPort(GuiBase.getInterface().isLibgdxPort());
|
||||
FModel.initialize(splashScreen.getProgressBar(), null);
|
||||
|
||||
splashScreen.getProgressBar().setDescription(localizer.getMessage("lblLoadingFonts"));
|
||||
|
||||
Reference in New Issue
Block a user