This commit is contained in:
Anuken
2021-08-01 17:00:24 -04:00
parent e64cd905d6
commit 9c1f897fff
3 changed files with 9 additions and 7 deletions

View File

@@ -100,9 +100,6 @@ public class DesktopLauncher extends ClientLauncher{
if(SteamAPI.restartAppIfNecessary(SVars.steamID)){
System.exit(0);
}
}catch(NullPointerException ignored){
steam = false;
Log.info("Running in offline mode.");
}catch(Throwable e){
steam = false;
Log.err("Failed to load Steam native libraries.");

View File

@@ -33,10 +33,9 @@ public class SWorkshop implements SteamUGCCallback{
ItemInstallInfo info = new ItemInstallInfo();
ugc.getSubscribedItems(ids);
Seq<Fi> folders = Seq.with(ids).map(f -> {
ugc.getItemInstallInfo(f, info);
return new Fi(info.getFolder());
}).select(f -> f != null && f.list().length > 0);
Seq<Fi> folders = Seq.with(ids)
.map(f -> !ugc.getItemInstallInfo(f, info) || info.getFolder() == null ? null : new Fi(info.getFolder()))
.select(f -> f != null && f.list().length > 0);
workshopFiles.put(Map.class, folders.select(f -> f.list().length == 1 && f.list()[0].extension().equals(mapExtension)).map(f -> f.list()[0]));
workshopFiles.put(Schematic.class, folders.select(f -> f.list().length == 1 && f.list()[0].extension().equals(schematicExtension)).map(f -> f.list()[0]));