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

@ -15,6 +15,14 @@ public abstract class DeckExporter {
DeckFormats.writeDeck(file, deck, this);
}
public void writeDeck(File directory, String filename, DeckCardLists deck) throws IOException {
if (!directory.exists()) {
directory.mkdirs();
}
String path = new File(directory, filename).getPath();
DeckFormats.writeDeck(path, deck, this);
}
public void writeDeck(File file, DeckCardLists deck) throws IOException {
DeckFormats.writeDeck(file, deck, this);
}