mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
spjspj - Add in last ditch token attempt (for momir vig mainly)
This commit is contained in:
parent
793fc13226
commit
3bbf5d1d56
1 changed files with 15 additions and 1 deletions
|
@ -43,6 +43,10 @@ public class CardDownloadData {
|
||||||
this.secondSide = secondSide;
|
this.secondSide = secondSide;
|
||||||
this.tokenSetCode = tokenSetCode;
|
this.tokenSetCode = tokenSetCode;
|
||||||
this.tokenDescriptor = tokenDescriptor;
|
this.tokenDescriptor = tokenDescriptor;
|
||||||
|
|
||||||
|
if (this.tokenDescriptor == null || this.tokenDescriptor.equalsIgnoreCase("") == 0) {
|
||||||
|
this.tokenDescriptor = lastDitchTokenDescriptor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardDownloadData(final CardDownloadData card) {
|
public CardDownloadData(final CardDownloadData card) {
|
||||||
|
@ -55,6 +59,8 @@ public class CardDownloadData {
|
||||||
this.type = card.type;
|
this.type = card.type;
|
||||||
this.usesVariousArt = card.usesVariousArt;
|
this.usesVariousArt = card.usesVariousArt;
|
||||||
this.tokenSetCode = card.tokenSetCode;
|
this.tokenSetCode = card.tokenSetCode;
|
||||||
|
this.tokenDescriptor = card.tokenDescriptor;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -139,6 +145,14 @@ public class CardDownloadData {
|
||||||
public void setTokenDescriptor(String tokenDescriptor) {
|
public void setTokenDescriptor(String tokenDescriptor) {
|
||||||
this.tokenDescriptor = tokenDescriptor;
|
this.tokenDescriptor = tokenDescriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String lastDitchTokenDescriptor() {
|
||||||
|
String name = this.name.replaceAll("[^a-zA-Z0-9]", "");
|
||||||
|
String descriptor = name + "....";
|
||||||
|
descriptor = descriptor.toUpperCase();
|
||||||
|
return descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isToken() {
|
public boolean isToken() {
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue