Autosave limited decks on submit (#11147)

* Autosave limited decks in gamelogs folder

* differentiate LIMITED_SIDEBOARD_BUILDING from LIMITED_BUILDING
This commit is contained in:
Susucre 2023-09-13 03:43:13 +02:00 committed by GitHub
parent 0a3fa8c25a
commit b62b089659
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 101 additions and 33 deletions

View file

@ -1197,6 +1197,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
DeckEditorPane deckEditorPane = (DeckEditorPane) window;
if (deckEditorPane.getDeckEditorMode() == DeckEditorMode.LIMITED_BUILDING
|| deckEditorPane.getDeckEditorMode() == DeckEditorMode.SIDEBOARDING
|| deckEditorPane.getDeckEditorMode() == DeckEditorMode.LIMITED_SIDEBOARD_BUILDING
|| deckEditorPane.getDeckEditorMode() == DeckEditorMode.VIEW_LIMITED_DECK) {
deckEditorPane.removeFrame();
}
@ -1207,7 +1208,10 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
public void showDeckEditor(DeckEditorMode mode, Deck deck, UUID tableId, int time) {
String name;
if (mode == DeckEditorMode.SIDEBOARDING || mode == DeckEditorMode.LIMITED_BUILDING || mode == DeckEditorMode.VIEW_LIMITED_DECK) {
if (mode == DeckEditorMode.SIDEBOARDING
|| mode == DeckEditorMode.LIMITED_BUILDING
|| mode == DeckEditorMode.LIMITED_SIDEBOARD_BUILDING
|| mode == DeckEditorMode.VIEW_LIMITED_DECK) {
name = "Deck Editor - " + tableId.toString();
} else {
if (deck != null) {