File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
pdxu-app/src/main/java/com/crschnick/pdxu/app Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1+ - Support for EU5 1.0.8
2+ - Fix EU5 melter messing up disease resistance for provinces
Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff 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 ))
Original file line number Diff line number Diff line change 1- 3.1.11
1+ 3.2.0
You can’t perform that action at this time.
0 commit comments