mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Move the custom set flag to setType.
This commit is contained in:
parent
d678fc1a59
commit
e5af2b843b
3 changed files with 4 additions and 5 deletions
|
@ -68,8 +68,6 @@ public abstract class ExpansionSet implements Serializable {
|
|||
protected String packageName;
|
||||
protected int maxCardNumberInBooster; // used to ommit cards with collector numbers beyond the regular cards in a set for boosters
|
||||
|
||||
protected boolean isCustomSet = false;
|
||||
|
||||
protected final EnumMap<Rarity, List<CardInfo>> savedCards;
|
||||
|
||||
public ExpansionSet(String name, String code, String packageName, Date releaseDate, SetType setType) {
|
||||
|
@ -376,7 +374,7 @@ public abstract class ExpansionSet implements Serializable {
|
|||
return null;
|
||||
}
|
||||
|
||||
public boolean isCustomSet() { return isCustomSet; }
|
||||
public boolean isCustomSet() { return setType == SetType.CUSTOM_SET; }
|
||||
|
||||
public void removeSavedCards() {
|
||||
savedCards.clear();
|
||||
|
|
|
@ -73,7 +73,7 @@ public class Sets extends HashMap<String, ExpansionSet> {
|
|||
public void addSet(ExpansionSet set) {
|
||||
if(containsKey(set.getCode())) throw new IllegalArgumentException("Set code "+set.getCode()+" already exists.");
|
||||
this.put(set.getCode(), set);
|
||||
if(set.isCustomSet) customSets.add(set.getCode());
|
||||
if(set.isCustomSet()) customSets.add(set.getCode());
|
||||
}
|
||||
|
||||
public static boolean isCustomSet(String setCode) {
|
||||
|
|
|
@ -11,7 +11,8 @@ public enum SetType {
|
|||
SUPPLEMENTAL("Supplemental"),
|
||||
SUPPLEMENTAL_STANDARD_LEGAL("Standard Legal Supplemental"),
|
||||
PROMOTIONAL("Promotional"),
|
||||
JOKESET("Joke Set");
|
||||
JOKESET("Joke Set"),
|
||||
CUSTOM_SET("Unofficial Set");
|
||||
|
||||
private final String text;
|
||||
|
||||
|
|
Loading…
Reference in a new issue