Skip to content

Commit 30afdc5

Browse files
committed
Add flag for closing MTS when done
For automating out-jar/package
1 parent 5565721 commit 30afdc5

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Changelog ##
22
#### dev ####
3+
* Add flag for closing MTS when done
4+
* For automating out-jar/package
35

46
#### v3.26.0 ####
57
* Add ability to create pre-patched version of the game

src/main/java/com/evacipated/cardcrawl/modthespire/Loader.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public class Loader
3434
public static boolean DEBUG = false;
3535
public static boolean OUT_JAR = false;
3636
public static boolean PACKAGE = false;
37+
public static boolean CLOSE_WHEN_FINISHED = false;
3738

3839
public static Semver MTS_VERSION;
3940
public static String MOD_DIR = "mods/";
@@ -156,6 +157,9 @@ public static void main(String[] args)
156157
if (argList.contains("--package")) {
157158
PACKAGE = true;
158159
}
160+
if (argList.contains("--close-when-finished")) {
161+
CLOSE_WHEN_FINISHED = true;
162+
}
159163

160164
allowBeta = true;
161165
if (argList.contains("--allow-beta")) {

src/main/java/com/evacipated/cardcrawl/modthespire/ui/ModSelectWindow.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ private JPanel makeModListPanel()
283283
}
284284

285285
Loader.runMods(selectedMods);
286+
if (Loader.CLOSE_WHEN_FINISHED) {
287+
Loader.closeWindow();
288+
}
286289
});
287290
t.start();
288291
});

0 commit comments

Comments
 (0)