mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Added missing images for WPN and Gateway Promos (GRC) set in scryfall source;
This commit is contained in:
parent
ac8540216f
commit
69546c82ce
5 changed files with 190 additions and 102 deletions
|
|
@ -27,7 +27,8 @@ public final class MtgJson {
|
|||
mtgJsonToXMageCodes.put("pPRE", "PTC");
|
||||
mtgJsonToXMageCodes.put("pMPR", "MPRP");
|
||||
mtgJsonToXMageCodes.put("pMEI", "MBP");
|
||||
mtgJsonToXMageCodes.put("pGTW", "GRC"); // pGTW - Gateway = GRC - WPN Gateway ???
|
||||
mtgJsonToXMageCodes.put("pGTW", "GRC"); // pGTW - Gateway = GRC (WPN + Gateway in one inner set)
|
||||
mtgJsonToXMageCodes.put("pWPN", "GRC"); // pWPN - Wizards Play Network = GRC (WPN + Gateway in one inner set)
|
||||
mtgJsonToXMageCodes.put("pGRU", "GUR");
|
||||
mtgJsonToXMageCodes.put("pGPX", "GPX");
|
||||
mtgJsonToXMageCodes.put("pFNM", "FNMP");
|
||||
|
|
@ -41,18 +42,22 @@ public final class MtgJson {
|
|||
mtgJsonToXMageCodes.put("DD3_DVD", "DDC");
|
||||
mtgJsonToXMageCodes.put("NMS", "NEM");
|
||||
mtgJsonToXMageCodes.put("MPS_AKH", "MPS-AKH");
|
||||
mtgJsonToXMageCodes.put("FRF_UGIN", "UGIN");
|
||||
mtgJsonToXMageCodes.put("pCMP", "CP");
|
||||
|
||||
|
||||
// revert search
|
||||
for(Map.Entry<String, String> entry: mtgJsonToXMageCodes.entrySet()){
|
||||
for (Map.Entry<String, String> entry : mtgJsonToXMageCodes.entrySet()) {
|
||||
xMageToMtgJsonCodes.put(entry.getValue(), entry.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
private MtgJson() {}
|
||||
private MtgJson() {
|
||||
}
|
||||
|
||||
private static final class CardHolder {
|
||||
private static final Map<String, JsonCard> cards;
|
||||
|
||||
static {
|
||||
try {
|
||||
cards = loadAllCards();
|
||||
|
|
@ -65,6 +70,7 @@ public final class MtgJson {
|
|||
|
||||
private static final class SetHolder {
|
||||
private static final Map<String, JsonSet> sets;
|
||||
|
||||
static {
|
||||
try {
|
||||
sets = loadAllSets();
|
||||
|
|
@ -75,11 +81,13 @@ public final class MtgJson {
|
|||
}
|
||||
|
||||
private static Map<String, JsonCard> loadAllCards() throws IOException {
|
||||
return readFromZip("AllCards.json.zip", new TypeReference<Map<String, JsonCard>>() {});
|
||||
return readFromZip("AllCards.json.zip", new TypeReference<Map<String, JsonCard>>() {
|
||||
});
|
||||
}
|
||||
|
||||
private static Map<String, JsonSet> loadAllSets() throws IOException {
|
||||
return readFromZip("AllSets.json.zip", new TypeReference<Map<String, JsonSet>>() {});
|
||||
return readFromZip("AllSets.json.zip", new TypeReference<Map<String, JsonSet>>() {
|
||||
});
|
||||
}
|
||||
|
||||
private static <T> T readFromZip(String filename, TypeReference<T> ref) throws IOException {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue