forked from External/mage
Network upgrade and new reconnection mode (#11527)
Network upgrade and new reconnection mode: * users can disconnect or close app without game progress loose now; * disconnect dialog will show active tables stats and additional options; * all active tables will be restored on reconnect (tables, tourneys, games, drafts, sideboarding, constructing); * user must use same server and username on next connection; * there are few minutes for reconnect until server kick off a disconnected player from all player's tables (concede/loose); * now you can safety reconnect after IP change (after proxy/vpn/wifi/router restart); Other improvements and fixes: * gui: main menu - improved switch panel button, added stats about current tables/panels; * gui: improved data sync and updates (fixes many use cases with empty battlefield, not started games/drafts/tourneys, not updatable drafts, etc); * gui: improved stability on game updates (fixes some random errors related to wrong threads); * server: fixed miss messages about player's disconnection problems for other players in the chat; * refactor: simplified and improved connection and network related code, deleted outdated code, added docs; * tests: improved load test to support lands only set for more stable performance/network testing (set TEST_AI_RANDOM_DECK_SETS = PELP and run test_TwoAIPlayGame_Multiple);
This commit is contained in:
parent
7f0558ff3c
commit
960e896903
71 changed files with 1274 additions and 802 deletions
|
|
@ -12,13 +12,14 @@ import java.util.Map;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* GUI: deck editor, used all around the app
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class DeckEditorPane extends MagePane {
|
||||
|
||||
/**
|
||||
* Creates new form TablesPane
|
||||
*/
|
||||
private UUID tableId = null;
|
||||
|
||||
public DeckEditorPane() {
|
||||
boolean initialized = false;
|
||||
if (Plugins.instance.isThemePluginLoaded()) {
|
||||
|
|
@ -45,6 +46,7 @@ public class DeckEditorPane extends MagePane {
|
|||
}
|
||||
|
||||
public void show(DeckEditorMode mode, Deck deck, String name, UUID tableId, int time) {
|
||||
this.tableId = tableId;
|
||||
if (mode == DeckEditorMode.SIDEBOARDING
|
||||
|| mode == DeckEditorMode.LIMITED_BUILDING
|
||||
|| mode == DeckEditorMode.LIMITED_SIDEBOARD_BUILDING) {
|
||||
|
|
@ -60,6 +62,11 @@ public class DeckEditorPane extends MagePane {
|
|||
this.repaint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActiveTable() {
|
||||
return this.tableId != null;
|
||||
}
|
||||
|
||||
public DeckEditorMode getDeckEditorMode() {
|
||||
return this.deckEditorPanel1.getDeckEditorMode();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,11 @@ public class CollectionViewerPane extends MagePane {
|
|||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActiveTable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisible(boolean aFlag) {
|
||||
super.setVisible(aFlag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue