forked from External/mage
Refactor Sets.saveDeck into a deck exporter series of classes.
This commit is contained in:
parent
83d8f5a538
commit
0ea73b19df
9 changed files with 310 additions and 80 deletions
|
|
@ -11,7 +11,6 @@ import javax.swing.*;
|
|||
import javax.swing.border.CompoundBorder;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.border.EtchedBorder;
|
||||
import mage.cards.Sets;
|
||||
import mage.cards.decks.Deck;
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
|
|
@ -19,6 +18,8 @@ import mage.client.util.gui.ColorsChooser;
|
|||
import mage.client.util.gui.FastSearchUtil;
|
||||
import mage.client.util.sets.ConstructedFormats;
|
||||
|
||||
import static mage.cards.decks.DeckFormats.DCK;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Simown
|
||||
|
|
@ -328,7 +329,7 @@ public class DeckGeneratorDialog {
|
|||
tmp.getParentFile().mkdirs();
|
||||
tmp.createNewFile();
|
||||
deck.setName(deckName);
|
||||
Sets.saveDeck(tmp.getAbsolutePath(), deck.getDeckCardLists());
|
||||
DCK.getExporter().writeDeck(tmp.getAbsolutePath(), deck.getDeckCardLists());
|
||||
cleanUp();
|
||||
return tmp.getAbsolutePath();
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue