- Re-enabled the option "Remove Artifacts" from generate decks.

- Little cleanups.
This commit is contained in:
Sloth
2011-11-14 16:34:53 +00:00
parent b7d3c075a0
commit 17b6947748
2 changed files with 6 additions and 10 deletions

View File

@@ -128,7 +128,9 @@ public class Generate2ColorDeck {
// reduce to cards that match the colors // reduce to cards that match the colors
CardList cl1 = allCards.getColor(this.color1); CardList cl1 = allCards.getColor(this.color1);
if(!Singletons.getModel().getPreferences().isDeckGenRmvArtifacts()) {
cl1.addAll(allCards.getColor(Constant.Color.COLORLESS)); cl1.addAll(allCards.getColor(Constant.Color.COLORLESS));
}
CardList cl2 = allCards.getColor(this.color2); CardList cl2 = allCards.getColor(this.color2);
// remove multicolor cards that don't match the colors // remove multicolor cards that don't match the colors

View File

@@ -262,6 +262,7 @@ public class OldGuiNewGame extends JFrame {
final JMenu generatedDeck = new JMenu(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Options.Generate.TITLE)); final JMenu generatedDeck = new JMenu(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Options.Generate.TITLE));
generatedDeck.add(OldGuiNewGame.singletons); generatedDeck.add(OldGuiNewGame.singletons);
OldGuiNewGame.singletons.setSelected(Singletons.getModel().getPreferences().isDeckGenSingletons());
OldGuiNewGame.singletons.addActionListener(new ActionListener() { OldGuiNewGame.singletons.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(final ActionEvent arg0) { public void actionPerformed(final ActionEvent arg0) {
@@ -271,15 +272,7 @@ public class OldGuiNewGame extends JFrame {
}); });
generatedDeck.add(OldGuiNewGame.removeSmallCreatures); generatedDeck.add(OldGuiNewGame.removeSmallCreatures);
OldGuiNewGame.removeSmallCreatures.addActionListener(new ActionListener() { OldGuiNewGame.removeSmallCreatures.setSelected(Singletons.getModel().getPreferences().isDeckGenRmvSmall());
@Override
public void actionPerformed(final ActionEvent arg0) {
Singletons.getModel().getPreferences()
.setDeckGenRmvSmall(OldGuiNewGame.removeSmallCreatures.isSelected());
}
});
generatedDeck.add(OldGuiNewGame.removeSmallCreatures);
OldGuiNewGame.removeSmallCreatures.addActionListener(new ActionListener() { OldGuiNewGame.removeSmallCreatures.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(final ActionEvent arg0) { public void actionPerformed(final ActionEvent arg0) {
@@ -289,6 +282,7 @@ public class OldGuiNewGame extends JFrame {
}); });
generatedDeck.add(OldGuiNewGame.removeArtifacts); generatedDeck.add(OldGuiNewGame.removeArtifacts);
OldGuiNewGame.removeArtifacts.setSelected(Singletons.getModel().getPreferences().isDeckGenRmvArtifacts());
OldGuiNewGame.removeArtifacts.addActionListener(new ActionListener() { OldGuiNewGame.removeArtifacts.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(final ActionEvent arg0) { public void actionPerformed(final ActionEvent arg0) {