Skip to content

Commit 2ac8e0f

Browse files
committed
Small fixes [release]
1 parent c95af29 commit 2ac8e0f

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

dist/changelog/3.2.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Support for EU5 1.0.8
2+
- Fix EU5 melter messing up disease resistance for provinces

pdxu-app/src/main/java/com/crschnick/pdxu/app/info/hoi4/Hoi4SavegameData.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ protected void init(SavegameContent content) {
5555
}
5656

5757
private void initVersion(Node n) {
58-
Pattern p = Pattern.compile("([\\w ]+)\\s+v(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\w+))?\\s+.*");
58+
Pattern p = Pattern.compile("([\\w ]+)\\s+v(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d{1,2}))?(?:\\.(\\w+))?\\s+.*");
5959
var string = n.getNodeForKey("version").getString();
6060
Matcher m = p.matcher(string);
6161
if (m.matches()) {
6262
version = new GameNamedVersion(
6363
Integer.parseInt(m.group(2)),
6464
Integer.parseInt(m.group(3)),
6565
Integer.parseInt(m.group(4)),
66-
0,
66+
m.group(5) != null ? Integer.parseInt(m.group(5)) : 0,
6767
m.group(1));
6868
} else {
6969
throw new IllegalArgumentException("Could not parse HOI4 version string: " + string);

pdxu-app/src/main/java/com/crschnick/pdxu/app/installation/dist/SteamDist.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ public static List<Path> getSteamCommonLibraryPaths() {
154154
public static Path getSteamAppsCompatDir(Game g) {
155155
// This returns the common paths
156156
var libs = getSteamCommonLibraryPaths().stream().map(path -> path.getParent().getParent()).toList();
157+
158+
// What if Steam was not detected
159+
if (libs.isEmpty()) {
160+
return AppSystemInfo.ofCurrent().getUserHome();
161+
}
162+
157163
var paths = libs.stream()
158164
.map(path -> path.resolve("steamapps", "compatdata", g.getSteamAppId() + ""))
159165
.filter(path -> Files.exists(path))

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.11
1+
3.2.0

0 commit comments

Comments
 (0)