mirror of
https://github.com/correl/mage.git
synced 2025-04-01 09:05:59 -09:00
Refactor images path code
This commit is contained in:
parent
e767c79429
commit
4d31294ee9
1 changed files with 4 additions and 13 deletions
|
@ -212,20 +212,11 @@ public final class CardImageUtils {
|
|||
|
||||
String finalFileName = "";
|
||||
if (card.getUsesVariousArt()) {
|
||||
finalFileName = cardName + '.' + card.getCollectorId() + ".full.jpg";
|
||||
// different arts uses name + collector id
|
||||
finalFileName = cardName + prefixType + '.' + card.getCollectorId() + ".full.jpg";
|
||||
} else {
|
||||
if (card.getUsesVariousArt()) {
|
||||
// only various arts can be same name, but different postfixes (a,b,c,d,e)
|
||||
int len = card.getCollectorId().length();
|
||||
if (Character.isLetter(card.getCollectorId().charAt(len - 1))) {
|
||||
finalFileName = cardName + card.getCollectorId().charAt(len - 1) + ".full.jpg";
|
||||
} else {
|
||||
finalFileName = cardName + prefixType + ".full.jpg";
|
||||
}
|
||||
} else {
|
||||
// normal cards with same names;
|
||||
finalFileName = cardName + prefixType + ".full.jpg";
|
||||
}
|
||||
// basic arts uses name
|
||||
finalFileName = cardName + prefixType + ".full.jpg";
|
||||
}
|
||||
|
||||
// if image file exists, correct name (for case sensitive systems)
|
||||
|
|
Loading…
Add table
Reference in a new issue