forked from External/mage
Merge branch 'External-master'
All checks were successful
/ build_release (push) Successful in 25m3s
All checks were successful
/ build_release (push) Successful in 25m3s
This commit is contained in:
commit
2cd85af552
332 changed files with 22134 additions and 16115 deletions
|
|
@ -93,6 +93,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
public static final String KEY_CARD_IMAGES_PREF_LANGUAGE = "cardImagesPreferredImageLaguage";
|
||||
|
||||
public static final String KEY_CARD_RENDERING_IMAGE_MODE = "cardRenderingFallback";
|
||||
public static final String KEY_CARD_RENDERING_ENABLE_RETRO_FRAMES = "cardRenderingRetroFrames";
|
||||
public static final String KEY_CARD_RENDERING_ICONS_FOR_ABILITIES = "cardRenderingIconsForAbilities";
|
||||
public static final String KEY_CARD_RENDERING_ICONS_FOR_PLAYABLE = "cardRenderingIconsForPlayable";
|
||||
public static final String KEY_CARD_RENDERING_REMINDER_TEXT = "cardRenderingReminderText";
|
||||
|
|
@ -966,6 +967,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
labelPreferredImageLanguage = new javax.swing.JLabel();
|
||||
panelCardStyles = new javax.swing.JPanel();
|
||||
cbCardRenderImageFallback = new javax.swing.JCheckBox();
|
||||
cbCardRenderRetroFrames = new javax.swing.JCheckBox();
|
||||
cbCardRenderIconsForAbilities = new javax.swing.JCheckBox();
|
||||
cbCardRenderIconsForPlayable = new javax.swing.JCheckBox();
|
||||
jSeparator1 = new javax.swing.JSeparator();
|
||||
|
|
@ -2335,6 +2337,9 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
cbCardRenderImageFallback.setText("Render mode: MTGO style (off) or IMAGE style (on)");
|
||||
panelCardStyles.add(cbCardRenderImageFallback);
|
||||
|
||||
cbCardRenderRetroFrames.setText("Force retro frames (MTGO render mode will use old border for all cards)");
|
||||
panelCardStyles.add(cbCardRenderRetroFrames);
|
||||
|
||||
cbCardRenderIconsForAbilities.setText("Enable card icons for abilities (example: flying, deathtouch)");
|
||||
panelCardStyles.add(cbCardRenderIconsForAbilities);
|
||||
|
||||
|
|
@ -3043,6 +3048,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
|
||||
// rendering
|
||||
save(prefs, dialog.cbCardRenderImageFallback, KEY_CARD_RENDERING_IMAGE_MODE, "true", "false");
|
||||
save(prefs, dialog.cbCardRenderRetroFrames, KEY_CARD_RENDERING_ENABLE_RETRO_FRAMES, "true", "false");
|
||||
save(prefs, dialog.cbCardRenderIconsForAbilities, KEY_CARD_RENDERING_ICONS_FOR_ABILITIES, "true", "false");
|
||||
save(prefs, dialog.cbCardRenderIconsForPlayable, KEY_CARD_RENDERING_ICONS_FOR_PLAYABLE, "true", "false");
|
||||
save(prefs, dialog.cbCardRenderHideSetSymbol, KEY_CARD_RENDERING_SET_SYMBOL, "true", "false");
|
||||
|
|
@ -3496,6 +3502,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
|
||||
// rendering settings
|
||||
load(prefs, dialog.cbCardRenderImageFallback, KEY_CARD_RENDERING_IMAGE_MODE, "true", "false");
|
||||
load(prefs, dialog.cbCardRenderRetroFrames, KEY_CARD_RENDERING_ENABLE_RETRO_FRAMES, "true", "false");
|
||||
load(prefs, dialog.cbCardRenderIconsForAbilities, KEY_CARD_RENDERING_ICONS_FOR_ABILITIES, "true", "true");
|
||||
load(prefs, dialog.cbCardRenderIconsForPlayable, KEY_CARD_RENDERING_ICONS_FOR_PLAYABLE, "true", "true");
|
||||
load(prefs, dialog.cbCardRenderHideSetSymbol, KEY_CARD_RENDERING_SET_SYMBOL, "true");
|
||||
|
|
@ -3826,6 +3833,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
}
|
||||
}
|
||||
|
||||
public static boolean getRenderRetroFrames() {
|
||||
return (getCachedValue(PreferencesDialog.KEY_CARD_RENDERING_ENABLE_RETRO_FRAMES, "true").endsWith("true"));
|
||||
}
|
||||
|
||||
public static boolean getRenderIconsForAbilities() {
|
||||
return (getCachedValue(PreferencesDialog.KEY_CARD_RENDERING_ICONS_FOR_ABILITIES, "true").equals("true"));
|
||||
}
|
||||
|
|
@ -4054,6 +4065,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
private javax.swing.JCheckBox cbCardRenderIconsForAbilities;
|
||||
private javax.swing.JCheckBox cbCardRenderIconsForPlayable;
|
||||
private javax.swing.JCheckBox cbCardRenderImageFallback;
|
||||
private javax.swing.JCheckBox cbCardRenderRetroFrames;
|
||||
private javax.swing.JCheckBox cbCardRenderShowAbilityTextOverlay;
|
||||
private javax.swing.JCheckBox cbCardRenderShowReminderText;
|
||||
private javax.swing.JCheckBox cbConfirmEmptyManaPool;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,9 @@
|
|||
|
||||
/**
|
||||
* ms delay between booster showing up and pick being allowed.
|
||||
* Will be disabled in test mode
|
||||
*/
|
||||
private static final int protectionTime = 1500;
|
||||
private static final int PROTECTION_CLICKS_TIMEOUT_MS = 1500;
|
||||
/**
|
||||
* Timer starting at booster being displayed, to protect from early pick due to clicking
|
||||
* a little too much on the last pick.
|
||||
|
|
@ -138,7 +139,11 @@
|
|||
}
|
||||
);
|
||||
|
||||
protectionTimer = new Timer(protectionTime, e -> protectionTimer.stop());
|
||||
int protectionTimeout = PROTECTION_CLICKS_TIMEOUT_MS;
|
||||
if (SessionHandler.isTestMode()) {
|
||||
protectionTimeout = 100;
|
||||
}
|
||||
protectionTimer = new Timer(protectionTimeout, e -> protectionTimer.stop());
|
||||
}
|
||||
|
||||
public void cleanUp() {
|
||||
|
|
@ -396,7 +401,8 @@
|
|||
}
|
||||
|
||||
if (!draftBooster.isEmptyGrid()) {
|
||||
SessionHandler.setBoosterLoaded(draftId); // confirm to the server that the booster has been successfully loaded, otherwise the server will re-send the booster
|
||||
// confirm to the server that the booster has been successfully loaded, otherwise the server will re-send the booster
|
||||
SessionHandler.setBoosterLoaded(draftId);
|
||||
|
||||
if (pickNo != protectionPickNo && !protectionTimer.isRunning()) {
|
||||
// Restart the protection timer.
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class CallbackClientImpl implements CallbackClient {
|
|||
SwingUtilities.invokeLater(() -> {
|
||||
try {
|
||||
if (DebugUtil.NETWORK_SHOW_CLIENT_CALLBACK_MESSAGES_LOG) {
|
||||
logger.info("message " + callback.getMessageId() + " - " + callback.getMethod().getType() + " - " + callback.getMethod());
|
||||
logger.info(callback.getInfo());
|
||||
}
|
||||
|
||||
// process bad connection (events can income in wrong order, so outdated data must be ignored)
|
||||
|
|
|
|||
|
|
@ -129,6 +129,10 @@ public class XmageURLConnection {
|
|||
}
|
||||
|
||||
this.proxy = Proxy.NO_PROXY;
|
||||
if (!PreferencesDialog.NETWORK_ENABLE_PROXY_SUPPORT) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (type != Proxy.Type.DIRECT) {
|
||||
try {
|
||||
String address = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_PROXY_ADDRESS, "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue