mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Added new ScryfallCode to CardEdition (used by ImageFetcher)
This commit is contained in:
@@ -70,7 +70,8 @@ import forge.util.storage.StorageReaderFolder;
|
|||||||
* @author Forge
|
* @author Forge
|
||||||
* @version $Id: CardSet.java 9708 2011-08-09 19:34:12Z jendave $
|
* @version $Id: CardSet.java 9708 2011-08-09 19:34:12Z jendave $
|
||||||
*/
|
*/
|
||||||
public final class CardEdition implements Comparable<CardEdition> { // immutable
|
public final class CardEdition implements Comparable<CardEdition> {
|
||||||
|
// immutable
|
||||||
public enum Type {
|
public enum Type {
|
||||||
UNKNOWN,
|
UNKNOWN,
|
||||||
|
|
||||||
@@ -231,6 +232,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
|
|||||||
private String code;
|
private String code;
|
||||||
private String code2;
|
private String code2;
|
||||||
private String mciCode;
|
private String mciCode;
|
||||||
|
private String scryfallCode;
|
||||||
private Type type;
|
private Type type;
|
||||||
private String name;
|
private String name;
|
||||||
private String alias = null;
|
private String alias = null;
|
||||||
@@ -320,6 +322,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
|
|||||||
public String getCode() { return code; }
|
public String getCode() { return code; }
|
||||||
public String getCode2() { return code2; }
|
public String getCode2() { return code2; }
|
||||||
public String getMciCode() { return mciCode; }
|
public String getMciCode() { return mciCode; }
|
||||||
|
public String getScryfallCode() { return scryfallCode.toLowerCase(); }
|
||||||
public Type getType() { return type; }
|
public Type getType() { return type; }
|
||||||
public String getName() { return name; }
|
public String getName() { return name; }
|
||||||
public String getAlias() { return alias; }
|
public String getAlias() { return alias; }
|
||||||
@@ -538,6 +541,10 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
|
|||||||
if (res.mciCode == null) {
|
if (res.mciCode == null) {
|
||||||
res.mciCode = res.code2.toLowerCase();
|
res.mciCode = res.code2.toLowerCase();
|
||||||
}
|
}
|
||||||
|
res.scryfallCode = section.get("ScryfallCode");
|
||||||
|
if (res.scryfallCode == null){
|
||||||
|
res.scryfallCode = res.code;
|
||||||
|
}
|
||||||
|
|
||||||
res.boosterArts = section.getInt("BoosterCovers", 1);
|
res.boosterArts = section.getInt("BoosterCovers", 1);
|
||||||
String boosterDesc = section.get("Booster");
|
String boosterDesc = section.get("Booster");
|
||||||
|
|||||||
Reference in New Issue
Block a user