mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
Merge branch 'netdeckarchivemodern' into 'master'
New Net Deck Category: Deck Modern Archive See merge request core-developers/forge!3972
This commit is contained in:
@@ -44,6 +44,8 @@ public class FDeckChooser extends JPanel implements IDecksComboBoxListener {
|
|||||||
private ItemManagerContainer lstDecksContainer;
|
private ItemManagerContainer lstDecksContainer;
|
||||||
private NetDeckCategory netDeckCategory;
|
private NetDeckCategory netDeckCategory;
|
||||||
private NetDeckArchiveStandard NetDeckArchiveStandard;
|
private NetDeckArchiveStandard NetDeckArchiveStandard;
|
||||||
|
private NetDeckArchiveModern NetDeckArchiveModern;
|
||||||
|
|
||||||
private boolean refreshingDeckType;
|
private boolean refreshingDeckType;
|
||||||
private boolean isForCommander;
|
private boolean isForCommander;
|
||||||
|
|
||||||
@@ -263,11 +265,18 @@ public class FDeckChooser extends JPanel implements IDecksComboBoxListener {
|
|||||||
updateDecks(DeckProxy.getNetDecks(netDeckCategory), ItemManagerConfig.NET_DECKS);
|
updateDecks(DeckProxy.getNetDecks(netDeckCategory), ItemManagerConfig.NET_DECKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateNetArchiveDecks() {
|
private void updateNetArchiveStandardDecks() {
|
||||||
if (NetDeckArchiveStandard != null) {
|
if (NetDeckArchiveStandard != null) {
|
||||||
decksComboBox.setText(NetDeckArchiveStandard.getDeckType());
|
decksComboBox.setText(NetDeckArchiveStandard.getDeckType());
|
||||||
}
|
}
|
||||||
updateDecks(DeckProxy.getNetArchiveDecks(NetDeckArchiveStandard), ItemManagerConfig.NET_DECKS);
|
updateDecks(DeckProxy.getNetArchiveStandardDecks(NetDeckArchiveStandard), ItemManagerConfig.NET_DECKS);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateNetArchiveModernDecks() {
|
||||||
|
if (NetDeckArchiveModern != null) {
|
||||||
|
decksComboBox.setText(NetDeckArchiveModern.getDeckType());
|
||||||
|
}
|
||||||
|
updateDecks(DeckProxy.getNetArchiveModernDecks(NetDeckArchiveModern), ItemManagerConfig.NET_DECKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Deck getDeck() {
|
public Deck getDeck() {
|
||||||
@@ -333,7 +342,6 @@ public class FDeckChooser extends JPanel implements IDecksComboBoxListener {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final NetDeckArchiveStandard category = NetDeckArchiveStandard.selectAndLoad(lstDecks.getGameType());
|
final NetDeckArchiveStandard category = NetDeckArchiveStandard.selectAndLoad(lstDecks.getGameType());
|
||||||
|
|
||||||
FThreads.invokeInEdtLater(new Runnable() {
|
FThreads.invokeInEdtLater(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -349,9 +357,37 @@ public class FDeckChooser extends JPanel implements IDecksComboBoxListener {
|
|||||||
refreshDecksList(ev.getDeckType(), true, ev);
|
refreshDecksList(ev.getDeckType(), true, ev);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
} else if (ev.getDeckType() == DeckType.NET_ARCHIVE_MODERN_DECK&& !refreshingDeckType) {
|
||||||
|
|
||||||
|
if(lstDecks.getGameType() != GameType.Constructed)
|
||||||
|
return;
|
||||||
|
FThreads.invokeInBackgroundThread(new Runnable() { //needed for loading net decks
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
final NetDeckArchiveModern category = NetDeckArchiveModern.selectAndLoad(lstDecks.getGameType());
|
||||||
|
FThreads.invokeInEdtLater(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (category == null) {
|
||||||
|
decksComboBox.setDeckType(selectedDeckType); //restore old selection if user cancels
|
||||||
|
if (selectedDeckType == DeckType.NET_ARCHIVE_MODERN_DECK && NetDeckArchiveModern != null) {
|
||||||
|
decksComboBox.setText(NetDeckArchiveModern.getDeckType());
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
NetDeckArchiveModern = category;
|
||||||
|
refreshDecksList(ev.getDeckType(), true, ev);
|
||||||
|
}
|
||||||
|
}); }
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
|
||||||
} else if ((ev.getDeckType() == DeckType.NET_DECK || ev.getDeckType() == DeckType.NET_COMMANDER_DECK) && !refreshingDeckType) {
|
} else if ((ev.getDeckType() == DeckType.NET_DECK || ev.getDeckType() == DeckType.NET_COMMANDER_DECK) && !refreshingDeckType) {
|
||||||
FThreads.invokeInBackgroundThread(new Runnable() { //needed for loading net decks
|
FThreads.invokeInBackgroundThread(new Runnable() { //needed for loading net decks
|
||||||
@Override
|
@Override
|
||||||
@@ -471,7 +507,10 @@ public class FDeckChooser extends JPanel implements IDecksComboBoxListener {
|
|||||||
updateNetDecks();
|
updateNetDecks();
|
||||||
break;
|
break;
|
||||||
case NET_ARCHIVE_STANDARD_DECK:
|
case NET_ARCHIVE_STANDARD_DECK:
|
||||||
updateNetArchiveDecks();
|
updateNetArchiveStandardDecks();
|
||||||
|
break;
|
||||||
|
case NET_ARCHIVE_MODERN_DECK:
|
||||||
|
updateNetArchiveModernDecks();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break; //other deck types not currently supported here
|
break; //other deck types not currently supported here
|
||||||
@@ -493,6 +532,14 @@ public class FDeckChooser extends JPanel implements IDecksComboBoxListener {
|
|||||||
if (decksComboBox.getDeckType() == DeckType.NET_ARCHIVE_STANDARD_DECK) {
|
if (decksComboBox.getDeckType() == DeckType.NET_ARCHIVE_STANDARD_DECK) {
|
||||||
if (NetDeckArchiveStandard == null) { return ""; }
|
if (NetDeckArchiveStandard == null) { return ""; }
|
||||||
state.append(NetDeckArchiveStandard.PREFIX).append(NetDeckArchiveStandard.getName());
|
state.append(NetDeckArchiveStandard.PREFIX).append(NetDeckArchiveStandard.getName());
|
||||||
|
|
||||||
|
///
|
||||||
|
} else if (decksComboBox.getDeckType() == DeckType.NET_ARCHIVE_MODERN_DECK) {
|
||||||
|
//handle special case of net decks
|
||||||
|
if (netDeckCategory == null) { return ""; }
|
||||||
|
state.append(NetDeckCategory.PREFIX).append(netDeckCategory.getName());
|
||||||
|
///
|
||||||
|
|
||||||
} else if (decksComboBox.getDeckType() == null || decksComboBox.getDeckType() == DeckType.NET_DECK) {
|
} else if (decksComboBox.getDeckType() == null || decksComboBox.getDeckType() == DeckType.NET_DECK) {
|
||||||
//handle special case of net decks
|
//handle special case of net decks
|
||||||
if (netDeckCategory == null) { return ""; }
|
if (netDeckCategory == null) { return ""; }
|
||||||
@@ -506,6 +553,7 @@ public class FDeckChooser extends JPanel implements IDecksComboBoxListener {
|
|||||||
return state.toString();
|
return state.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void joinSelectedDecks(final StringBuilder state, final String delimiter) {
|
private void joinSelectedDecks(final StringBuilder state, final String delimiter) {
|
||||||
final Iterable<DeckProxy> selectedDecks = lstDecks.getSelectedItems();
|
final Iterable<DeckProxy> selectedDecks = lstDecks.getSelectedItems();
|
||||||
boolean isFirst = true;
|
boolean isFirst = true;
|
||||||
@@ -549,7 +597,11 @@ public class FDeckChooser extends JPanel implements IDecksComboBoxListener {
|
|||||||
} else if (deckType.startsWith(NetDeckArchiveStandard.PREFIX)) {
|
} else if (deckType.startsWith(NetDeckArchiveStandard.PREFIX)) {
|
||||||
NetDeckArchiveStandard = NetDeckArchiveStandard.selectAndLoad(lstDecks.getGameType(), deckType.substring(NetDeckArchiveStandard.PREFIX.length()));
|
NetDeckArchiveStandard = NetDeckArchiveStandard.selectAndLoad(lstDecks.getGameType(), deckType.substring(NetDeckArchiveStandard.PREFIX.length()));
|
||||||
return DeckType.NET_ARCHIVE_STANDARD_DECK;
|
return DeckType.NET_ARCHIVE_STANDARD_DECK;
|
||||||
}
|
} else if (deckType.startsWith(NetDeckArchiveModern.PREFIX)) {
|
||||||
|
NetDeckArchiveModern = NetDeckArchiveModern.selectAndLoad(lstDecks.getGameType(), deckType.substring(NetDeckArchiveModern.PREFIX.length()));
|
||||||
|
return DeckType.NET_ARCHIVE_MODERN_DECK;
|
||||||
|
}
|
||||||
|
|
||||||
return DeckType.valueOf(deckType);
|
return DeckType.valueOf(deckType);
|
||||||
}
|
}
|
||||||
} catch (final IllegalArgumentException ex) {
|
} catch (final IllegalArgumentException ex) {
|
||||||
|
|||||||
@@ -585,6 +585,7 @@ lblRandomDecks=zufälliges Deck
|
|||||||
lblNetDecks=Decks aus dem Netz
|
lblNetDecks=Decks aus dem Netz
|
||||||
lblNetCommanderDecks=Commanderdecks aus dem Netz
|
lblNetCommanderDecks=Commanderdecks aus dem Netz
|
||||||
lblNetArchiveStandardDecks=Netz-Archiv-Standarddecks
|
lblNetArchiveStandardDecks=Netz-Archiv-Standarddecks
|
||||||
|
lblNetArchiveModernDecks=Netz-Archiv-Moderndecks
|
||||||
#VSubmenuTutorial
|
#VSubmenuTutorial
|
||||||
lblTutorial=Tutorial
|
lblTutorial=Tutorial
|
||||||
lblTutorialMode=Tutorial Mode
|
lblTutorialMode=Tutorial Mode
|
||||||
|
|||||||
@@ -585,6 +585,7 @@ lblRandomDecks=Random Decks
|
|||||||
lblNetDecks=Net Decks
|
lblNetDecks=Net Decks
|
||||||
lblNetCommanderDecks=Net Commander Decks
|
lblNetCommanderDecks=Net Commander Decks
|
||||||
lblNetArchiveStandardDecks=Net Archive Standard Decks
|
lblNetArchiveStandardDecks=Net Archive Standard Decks
|
||||||
|
lblNetArchiveModernDecks=Net Archive Modern Decks
|
||||||
#VSubmenuTutorial
|
#VSubmenuTutorial
|
||||||
lblTutorial=Tutorial
|
lblTutorial=Tutorial
|
||||||
lblTutorialMode=Tutorial Mode
|
lblTutorialMode=Tutorial Mode
|
||||||
|
|||||||
@@ -585,6 +585,7 @@ lblRandomDecks=Mazos aleatorios
|
|||||||
lblNetDecks=Mazos online
|
lblNetDecks=Mazos online
|
||||||
lblNetCommanderDecks=Mazos Commander online
|
lblNetCommanderDecks=Mazos Commander online
|
||||||
lblNetArchiveStandardDecks=Archivo online de mazos Standard
|
lblNetArchiveStandardDecks=Archivo online de mazos Standard
|
||||||
|
lblNetArchiveModernDecks=Archivo online de mazos Modern
|
||||||
#VSubmenuTutorial
|
#VSubmenuTutorial
|
||||||
lblTutorial=Tutorial
|
lblTutorial=Tutorial
|
||||||
lblTutorialMode=Modo Tutorial
|
lblTutorialMode=Modo Tutorial
|
||||||
|
|||||||
@@ -584,7 +584,8 @@ lblRandomThemeDecks=Mazzi tematici casuali
|
|||||||
lblRandomDecks=Mazzi casuali
|
lblRandomDecks=Mazzi casuali
|
||||||
lblNetDecks=Net Decks
|
lblNetDecks=Net Decks
|
||||||
lblNetCommanderDecks=Mazzi Net Commander
|
lblNetCommanderDecks=Mazzi Net Commander
|
||||||
lblNetArchiveDecks=Net Archive Standard Decks
|
lblNetArchiveStandardDecks=Net Archive Standard Decks
|
||||||
|
lblNetArchiveModernDecks=Net Archive Modern Decks
|
||||||
#VSubmenuTutorial
|
#VSubmenuTutorial
|
||||||
lblTutorial=Tutorial
|
lblTutorial=Tutorial
|
||||||
lblTutorialMode=Tutorial Mode
|
lblTutorialMode=Tutorial Mode
|
||||||
|
|||||||
@@ -584,7 +584,8 @@ lblRandomThemeDecks=ランダムテーマデッキ
|
|||||||
lblRandomDecks=ランダムデッキ
|
lblRandomDecks=ランダムデッキ
|
||||||
lblNetDecks=ネットデッキ
|
lblNetDecks=ネットデッキ
|
||||||
lblNetCommanderDecks=ネット統率者デッキ
|
lblNetCommanderDecks=ネット統率者デッキ
|
||||||
lblNetArchiveStandardDecks=Net Archive Decks
|
lblNetArchiveStandardDecks=Net Standard Archive Decks
|
||||||
|
lblNetArchiveModernDecks=Net Modern Archive Decks
|
||||||
#VSubmenuTutorial
|
#VSubmenuTutorial
|
||||||
lblTutorial=チュートリアル
|
lblTutorial=チュートリアル
|
||||||
lblTutorialMode=チュートリアルモード
|
lblTutorialMode=チュートリアルモード
|
||||||
|
|||||||
@@ -583,7 +583,8 @@ lblRandomThemeDecks=随机主题套牌
|
|||||||
lblRandomDecks=随机套牌
|
lblRandomDecks=随机套牌
|
||||||
lblNetDecks=网络套牌
|
lblNetDecks=网络套牌
|
||||||
lblNetCommanderDecks=网络指挥官套牌
|
lblNetCommanderDecks=网络指挥官套牌
|
||||||
lblNetArchiveStandardDecks=Net Archive Standard Decks
|
lblNetArchiveStandardDecks=Net Standard Archive Decks
|
||||||
|
lblNetArchiveModernDecks=Net Modern Archive Decks
|
||||||
#VSubmenuTutorial
|
#VSubmenuTutorial
|
||||||
lblTutorial=教程
|
lblTutorial=教程
|
||||||
lblTutorialMode=教程模式
|
lblTutorialMode=教程模式
|
||||||
|
|||||||
2495
forge-gui/res/lists/net-decks-archive-modern.txt
Normal file
2495
forge-gui/res/lists/net-decks-archive-modern.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -624,7 +624,15 @@ public class DeckProxy implements InventoryItem {
|
|||||||
return decks;
|
return decks;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<DeckProxy> getNetArchiveDecks(final NetDeckArchiveStandard category) {
|
public static List<DeckProxy> getNetArchiveStandardDecks(final NetDeckArchiveStandard category) {
|
||||||
|
final List<DeckProxy> decks = new ArrayList<>();
|
||||||
|
if (category != null) {
|
||||||
|
addDecksRecursivelly("Constructed", GameType.Constructed, decks, "", category, null);
|
||||||
|
}
|
||||||
|
return decks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<DeckProxy> getNetArchiveModernDecks(final NetDeckArchiveModern category) {
|
||||||
final List<DeckProxy> decks = new ArrayList<>();
|
final List<DeckProxy> decks = new ArrayList<>();
|
||||||
if (category != null) {
|
if (category != null) {
|
||||||
addDecksRecursivelly("Constructed", GameType.Constructed, decks, "", category, null);
|
addDecksRecursivelly("Constructed", GameType.Constructed, decks, "", category, null);
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ public enum DeckType {
|
|||||||
RANDOM_DECK("lblRandomDecks"),
|
RANDOM_DECK("lblRandomDecks"),
|
||||||
NET_DECK("lblNetDecks"),
|
NET_DECK("lblNetDecks"),
|
||||||
NET_COMMANDER_DECK("lblNetCommanderDecks"),
|
NET_COMMANDER_DECK("lblNetCommanderDecks"),
|
||||||
NET_ARCHIVE_STANDARD_DECK("lblNetArchiveStandardDecks");
|
NET_ARCHIVE_STANDARD_DECK("lblNetArchiveStandardDecks"),
|
||||||
|
NET_ARCHIVE_MODERN_DECK("lblNetArchiveModernDecks");
|
||||||
|
|
||||||
public static DeckType[] ConstructedOptions;
|
public static DeckType[] ConstructedOptions;
|
||||||
public static DeckType[] CommanderOptions;
|
public static DeckType[] CommanderOptions;
|
||||||
@@ -53,7 +54,8 @@ public enum DeckType {
|
|||||||
DeckType.THEME_DECK,
|
DeckType.THEME_DECK,
|
||||||
DeckType.RANDOM_DECK,
|
DeckType.RANDOM_DECK,
|
||||||
DeckType.NET_DECK,
|
DeckType.NET_DECK,
|
||||||
DeckType.NET_ARCHIVE_STANDARD_DECK
|
DeckType.NET_ARCHIVE_STANDARD_DECK,
|
||||||
|
DeckType.NET_ARCHIVE_MODERN_DECK
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
ConstructedOptions = new DeckType[]{
|
ConstructedOptions = new DeckType[]{
|
||||||
@@ -66,7 +68,9 @@ public enum DeckType {
|
|||||||
DeckType.THEME_DECK,
|
DeckType.THEME_DECK,
|
||||||
DeckType.RANDOM_DECK,
|
DeckType.RANDOM_DECK,
|
||||||
DeckType.NET_DECK,
|
DeckType.NET_DECK,
|
||||||
DeckType.NET_ARCHIVE_STANDARD_DECK
|
DeckType.NET_ARCHIVE_STANDARD_DECK,
|
||||||
|
DeckType.NET_ARCHIVE_MODERN_DECK
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
121
forge-gui/src/main/java/forge/deck/NetDeckArchiveModern.java
Normal file
121
forge-gui/src/main/java/forge/deck/NetDeckArchiveModern.java
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
package forge.deck;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
|
||||||
|
import forge.GuiBase;
|
||||||
|
import forge.deck.io.DeckSerializer;
|
||||||
|
import forge.deck.io.DeckStorage;
|
||||||
|
import forge.download.GuiDownloadZipService;
|
||||||
|
import forge.game.GameType;
|
||||||
|
import forge.properties.ForgeConstants;
|
||||||
|
import forge.util.FileUtil;
|
||||||
|
import forge.util.WaitCallback;
|
||||||
|
import forge.util.gui.SGuiChoose;
|
||||||
|
import forge.util.storage.StorageBase;
|
||||||
|
|
||||||
|
public class NetDeckArchiveModern extends StorageBase<Deck> {
|
||||||
|
public static final String PREFIX = "NET_ARCHIVE_MODERN_DECK";
|
||||||
|
private static Map<String, NetDeckArchiveModern> constructed, commander, brawl;
|
||||||
|
|
||||||
|
private static Map<String, NetDeckArchiveModern> loadCategories(String filename) {
|
||||||
|
Map<String, NetDeckArchiveModern> categories = new TreeMap<>();
|
||||||
|
if (FileUtil.doesFileExist(filename)) {
|
||||||
|
List<String> lines = FileUtil.readFile(filename);
|
||||||
|
for (String line : lines) {
|
||||||
|
int idx = line.indexOf('|');
|
||||||
|
if (idx != -1) {
|
||||||
|
String name = line.substring(0, idx).trim();
|
||||||
|
String url = line.substring(idx + 1).trim();
|
||||||
|
categories.put(name, new NetDeckArchiveModern(name, url));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return categories;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static NetDeckArchiveModern selectAndLoad(GameType gameType) {
|
||||||
|
return selectAndLoad(gameType, null);
|
||||||
|
}
|
||||||
|
public static NetDeckArchiveModern selectAndLoad(GameType gameType, String name) {
|
||||||
|
Map<String, NetDeckArchiveModern> categories;
|
||||||
|
switch (gameType) {
|
||||||
|
case Constructed:
|
||||||
|
case Gauntlet:
|
||||||
|
if (constructed == null) {
|
||||||
|
constructed = loadCategories(ForgeConstants.NET_ARCHIVE_MODERN_DECKS_LIST_FILE);
|
||||||
|
}
|
||||||
|
categories = constructed;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (name != null) {
|
||||||
|
NetDeckArchiveModern category = categories.get(name);
|
||||||
|
if (category != null && category.map.isEmpty()) {
|
||||||
|
//if name passed in, try to load decks from current cached files
|
||||||
|
File downloadDir = new File(category.getFullPath());
|
||||||
|
if (downloadDir.exists()) {
|
||||||
|
for (File file : downloadDir.listFiles(DeckStorage.DCK_FILE_FILTER)) {
|
||||||
|
Deck deck = DeckSerializer.fromFile(file);
|
||||||
|
if (deck != null) {
|
||||||
|
category.map.put(deck.getName(), deck);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
final NetDeckArchiveModern c = SGuiChoose.oneOrNone("Select a Net Deck Archive Modern category", categories.values());
|
||||||
|
if (c == null) { return null; }
|
||||||
|
|
||||||
|
if (c.map.isEmpty()) { //only download decks once per session
|
||||||
|
WaitCallback<Boolean> callback = new WaitCallback<Boolean>() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
String downloadLoc = c.getFullPath();
|
||||||
|
GuiBase.getInterface().download(new GuiDownloadZipService(c.getName(), "decks", c.getUrl(), downloadLoc, downloadLoc, null) {
|
||||||
|
@Override
|
||||||
|
protected void copyInputStream(InputStream in, String outPath) throws IOException {
|
||||||
|
super.copyInputStream(in, outPath);
|
||||||
|
|
||||||
|
Deck deck = DeckSerializer.fromFile(new File(outPath));
|
||||||
|
if (deck != null) {
|
||||||
|
c.map.put(deck.getName(), deck);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (!callback.invokeAndWait()) { return null; } //wait for download to finish
|
||||||
|
}
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String url;
|
||||||
|
|
||||||
|
private NetDeckArchiveModern(String name0, String url0) {
|
||||||
|
super(name0, ForgeConstants.DECK_NET_ARCHIVE_DIR + name0, new HashMap<>());
|
||||||
|
url = url0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeckType() {
|
||||||
|
return "Net Archive Modern Decks - " + name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -106,6 +106,7 @@ public class NetDeckArchiveStandard extends StorageBase<Deck> {
|
|||||||
url = url0;
|
url = url0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getUrl() {
|
public String getUrl() {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ public final class ForgeConstants {
|
|||||||
public static final String BORDERLESS_CARD_LIST_FILE = LISTS_DIR + "borderlessCardList.txt";
|
public static final String BORDERLESS_CARD_LIST_FILE = LISTS_DIR + "borderlessCardList.txt";
|
||||||
public static final String SKINS_LIST_FILE = LISTS_DIR + "skinsList.txt";
|
public static final String SKINS_LIST_FILE = LISTS_DIR + "skinsList.txt";
|
||||||
public static final String NET_ARCHIVE_STANDARD_DECKS_LIST_FILE = LISTS_DIR + "net-decks-archive-standard.txt";
|
public static final String NET_ARCHIVE_STANDARD_DECKS_LIST_FILE = LISTS_DIR + "net-decks-archive-standard.txt";
|
||||||
|
public static final String NET_ARCHIVE_MODERN_DECKS_LIST_FILE = LISTS_DIR + "net-decks-archive-modern.txt";
|
||||||
|
|
||||||
|
|
||||||
public static final String CHANGES_FILE = ASSETS_DIR + "README.txt";
|
public static final String CHANGES_FILE = ASSETS_DIR + "README.txt";
|
||||||
|
|||||||
Reference in New Issue
Block a user