mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
server: now it disable draft's clicks protection timeout in test mode;
This commit is contained in:
parent
33fb660dc8
commit
571605e224
2 changed files with 9 additions and 3 deletions
|
|
@ -45,8 +45,9 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ms delay between booster showing up and pick being allowed.
|
* 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
|
* Timer starting at booster being displayed, to protect from early pick due to clicking
|
||||||
* a little too much on the last pick.
|
* 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() {
|
public void cleanUp() {
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,8 @@ public final class Main {
|
||||||
// - fast game buttons;
|
// - fast game buttons;
|
||||||
// - cheat commands;
|
// - cheat commands;
|
||||||
// - no deck validation;
|
// - no deck validation;
|
||||||
// - no connection validation by pings (no disconnects on IDE's debugger usage)
|
// - no draft's clicks protection timeout;
|
||||||
|
// - no connection validation by pings (no disconnects on IDE's debugger usage);
|
||||||
// - load any deck in sideboarding;
|
// - load any deck in sideboarding;
|
||||||
// - simplified registration and login (no password check);
|
// - simplified registration and login (no password check);
|
||||||
// - debug main menu for GUI and rendering testing (must use -debug arg for client app);
|
// - debug main menu for GUI and rendering testing (must use -debug arg for client app);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue