mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Commander Precons added to decktype with all pre C18 commander precons included
This commit is contained in:
@@ -400,6 +400,15 @@ public class DeckProxy implements InventoryItem {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Iterable<DeckProxy> getAllCommanderPreconDecks() {
|
||||
return getAllCommanderPreconDecks(null);
|
||||
}
|
||||
public static Iterable<DeckProxy> getAllCommanderPreconDecks(final Predicate<Deck> filter) {
|
||||
final List<DeckProxy> result = new ArrayList<DeckProxy>();
|
||||
addDecksRecursivelly("Commander Precon", GameType.Commander, result, "", FModel.getDecks().getCommanderPrecons(), filter);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Iterable<DeckProxy> getAllTinyLeadersDecks() {
|
||||
return getAllTinyLeadersDecks(null);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ public enum DeckType {
|
||||
DRAFT_DECK("lblDraftDecks"),
|
||||
SEALED_DECK("lblSealedDecks"),
|
||||
PRECONSTRUCTED_DECK("lblPreconstructedDecks"),
|
||||
PRECON_COMMANDER_DECK("lblPreconCommanderDecks"),
|
||||
QUEST_OPPONENT_DECK("lblQuestOpponentDecks"),
|
||||
COLOR_DECK("lblRandomColorDecks"),
|
||||
STANDARD_CARDGEN_DECK("lblRandomStandardArchetypeDecks"),
|
||||
@@ -70,6 +71,7 @@ public enum DeckType {
|
||||
if (FModel.isdeckGenMatrixLoaded()) {
|
||||
CommanderOptions = new DeckType[]{
|
||||
DeckType.COMMANDER_DECK,
|
||||
DeckType.PRECON_COMMANDER_DECK,
|
||||
DeckType.RANDOM_COMMANDER_DECK,
|
||||
DeckType.RANDOM_CARDGEN_COMMANDER_DECK,
|
||||
DeckType.RANDOM_DECK,
|
||||
@@ -78,6 +80,7 @@ public enum DeckType {
|
||||
}else{
|
||||
CommanderOptions = new DeckType[]{
|
||||
DeckType.COMMANDER_DECK,
|
||||
DeckType.PRECON_COMMANDER_DECK,
|
||||
DeckType.RANDOM_COMMANDER_DECK,
|
||||
DeckType.RANDOM_DECK,
|
||||
DeckType.NET_COMMANDER_DECK
|
||||
|
||||
@@ -41,6 +41,7 @@ public class CardCollections {
|
||||
private IStorage<Deck> scheme;
|
||||
private IStorage<Deck> plane;
|
||||
private IStorage<Deck> commander;
|
||||
private IStorage<Deck> commanderPrecons;
|
||||
private IStorage<Deck> oathbreaker;
|
||||
private IStorage<Deck> tinyLeaders;
|
||||
private IStorage<Deck> brawl;
|
||||
@@ -121,6 +122,14 @@ public class CardCollections {
|
||||
return oathbreaker;
|
||||
}
|
||||
|
||||
public IStorage<Deck> getCommanderPrecons() {
|
||||
if (commanderPrecons == null) {
|
||||
commanderPrecons = new StorageImmediatelySerialized<Deck>("Commander Precon decks",
|
||||
new DeckStorage(new File(ForgeConstants.COMMANDER_PRECON_DIR), ForgeConstants.QUEST_PRECON_DIR));
|
||||
}
|
||||
return commanderPrecons;
|
||||
}
|
||||
|
||||
public IStorage<Deck> getTinyLeaders() {
|
||||
if (tinyLeaders == null) {
|
||||
tinyLeaders = new StorageImmediatelySerialized<>("Tiny Leaders decks",
|
||||
|
||||
@@ -231,6 +231,7 @@ public final class ForgeConstants {
|
||||
public static final String DECK_SCHEME_DIR = DECK_BASE_DIR + "scheme" + PATH_SEPARATOR;
|
||||
public static final String DECK_PLANE_DIR = DECK_BASE_DIR + "planar" + PATH_SEPARATOR;
|
||||
public static final String DECK_COMMANDER_DIR = DECK_BASE_DIR + "commander" + PATH_SEPARATOR;
|
||||
public static final String COMMANDER_PRECON_DIR = QUEST_DIR + "commanderprecons" + PATH_SEPARATOR;
|
||||
public static final String DECK_OATHBREAKER_DIR = DECK_BASE_DIR + "oathbreaker" + PATH_SEPARATOR;
|
||||
public static final String DECK_NET_DIR = DECK_BASE_DIR + "net" + PATH_SEPARATOR;
|
||||
public static final String QUEST_SAVE_DIR = USER_QUEST_DIR + "saves" + PATH_SEPARATOR;
|
||||
|
||||
Reference in New Issue
Block a user