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