Changed split card name using " // " as separator to be more conform with elsewere used name. But image save name uses " - ".

This commit is contained in:
LevelX2 2013-05-09 14:02:15 +02:00
parent d799fa86d9
commit a29dc6cb18
4 changed files with 4 additions and 4 deletions

View file

@ -470,7 +470,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
try {
StringBuilder filePath = new StringBuilder();
filePath.append(Constants.IO.imageBaseDir).append(File.separator);
filePath.append(card.hashCode()).append(".").append(card.getName().replace(":", "")).append(".jpg");
filePath.append(card.hashCode()).append(".").append(card.getName().replace(":", "").replace("//", "-")).append(".jpg");
File temporaryFile = new File(filePath.toString());
String imagePath = CardImageUtils.getImagePath(card, imagesPath);
TFile outputFile = new TFile(imagePath);

View file

@ -134,7 +134,7 @@ public class CardImageUtils {
String imageName;
String type = card.getType() != 0 ? " " + Integer.toString(card.getType()) : "";
String name = card.getName().replace(":", "");
String name = card.getName().replace(":", "").replace("//", "-");
if (card.getUsesVariousArt()) {
imageName = name + "." + card.getCollectorId() + ".full.jpg";

View file

@ -53,7 +53,7 @@ public abstract class SplitCard<T extends SplitCard<T>> extends CardImpl<T> {
private Card rightHalfCard;
public SplitCard(UUID ownerId, int cardNumber, String nameLeft, String nameRight, Rarity rarity, CardType[] cardTypes, String costsLeft, String costsRight, boolean fused) {
super(ownerId, cardNumber, new StringBuilder(nameLeft).append(" - ").append(nameRight).toString(), rarity, cardTypes, costsLeft + costsRight, (fused ?SpellAbilityType.SPLIT_FUSED:SpellAbilityType.SPLIT));
super(ownerId, cardNumber, new StringBuilder(nameLeft).append(" // ").append(nameRight).toString(), rarity, cardTypes, costsLeft + costsRight, (fused ?SpellAbilityType.SPLIT_FUSED:SpellAbilityType.SPLIT));
this.createLeftHalfCard(nameLeft, costsLeft);
this.createRightHalfCard(nameRight, costsRight);
this.splitCard = true;

View file

@ -58,7 +58,7 @@ public class TxtDeckImporter extends DeckImporter {
int delim = line.indexOf(' ');
String lineNum = line.substring(0, delim).trim();
String lineName = line.substring(delim).trim();
String lineName = line.substring(delim).replace("","\'").trim();
try {
int num = Integer.parseInt(lineNum);
List<CardInfo> cards = CardRepository.instance.findCards(lineName);