mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
a right overload of message is wrapped into a wait-till-edt-executes loop
carddb will include MMA in stats if the latter are collected
This commit is contained in:
@@ -71,7 +71,7 @@ public final class CardDb implements ICardDatabase {
|
|||||||
synchronized (CardDb.class) {
|
synchronized (CardDb.class) {
|
||||||
if (CardDb.commonCards == null) { // It's broken under 1.4 and below, on 1.5+ works again!
|
if (CardDb.commonCards == null) { // It's broken under 1.4 and below, on 1.5+ works again!
|
||||||
CardSorter cs = new CardSorter(rules);
|
CardSorter cs = new CardSorter(rules);
|
||||||
commonCards = new CardDb(cs.regularCards, editions, false /*true*/);
|
commonCards = new CardDb(cs.regularCards, editions, false);
|
||||||
variantCards = new CardDb(cs.variantsCards, editions, false);
|
variantCards = new CardDb(cs.variantsCards, editions, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,7 @@ public final class CardDb implements ICardDatabase {
|
|||||||
this.rulesByName = rules;
|
this.rulesByName = rules;
|
||||||
List<String> missingCards = new ArrayList<String>();
|
List<String> missingCards = new ArrayList<String>();
|
||||||
for(CardEdition e : editions) {
|
for(CardEdition e : editions) {
|
||||||
boolean worthLogging = logMissingCards && ( e.getType() == Type.CORE || e.getType() == Type.EXPANSION );
|
boolean worthLogging = logMissingCards && ( e.getType() == Type.CORE || e.getType() == Type.EXPANSION || e.getType() == Type.REPRINT );
|
||||||
if(worthLogging)
|
if(worthLogging)
|
||||||
System.out.print(e.getName() + " (" + e.getCards().length + " cards)");
|
System.out.print(e.getName() + " (" + e.getCards().length + " cards)");
|
||||||
String lastCardName = null;
|
String lastCardName = null;
|
||||||
|
|||||||
@@ -67,17 +67,17 @@ public class GuiDialog {
|
|||||||
* a {@link java.lang.String} object.
|
* a {@link java.lang.String} object.
|
||||||
*/
|
*/
|
||||||
public static void message(final String message) {
|
public static void message(final String message) {
|
||||||
FThreads.invokeInEdtAndWait( new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
message(message, UIManager.getString("OptionPane.messageDialogTitle"));
|
message(message, UIManager.getString("OptionPane.messageDialogTitle"));
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void message(final String message, String title) {
|
public static void message(final String message, final String title) {
|
||||||
|
FThreads.invokeInEdtAndWait(new Runnable() {
|
||||||
JOptionPane.showMessageDialog(null, message, title, JOptionPane.PLAIN_MESSAGE);
|
@Override
|
||||||
|
public void run() {
|
||||||
|
JOptionPane.showMessageDialog(null, message, title, JOptionPane.PLAIN_MESSAGE);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user