Added more verbose output to the SteamHandler when finding libs/games

This commit is contained in:
erri120 2020-01-01 13:11:53 +01:00
parent f9cdbbc6a1
commit 336193a266
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135

View File

@ -65,6 +65,8 @@ namespace Wabbajack.Common
{
var steamKey = Registry.CurrentUser.OpenSubKey(SteamRegKey);
SteamPath = steamKey?.GetValue("SteamPath").ToString();
if(string.IsNullOrWhiteSpace(SteamPath) || steamKey == null || !Directory.Exists(SteamPath))
Utils.ErrorThrow(new Exception("Could not find the Steam folder!"));
if(!init) return;
LoadInstallFolders();
LoadAllSteamGames();
@ -92,10 +94,15 @@ namespace Wabbajack.Common
if (!l.Contains("BaseInstallFolder_")) return;
var s = GetVdfValue(l);
s = Path.Combine(s, "steamapps");
if(Directory.Exists(s))
if (!Directory.Exists(s))
return;
paths.Add(s);
Utils.Log($"Steam Library found at {s}");
});
Utils.Log($"Total number of Steam Libraries found: {paths.Count}");
// Default path in the Steam folder isn't in the configs
if(Directory.Exists(Path.Combine(SteamPath, "steamapps")))
paths.Add(Path.Combine(SteamPath, "steamapps"));
@ -145,9 +152,13 @@ namespace Wabbajack.Common
g.RequiredFiles.TrueForAll(s => File.Exists(Path.Combine(steamGame.InstallDir, s)))
)?.Game;
games.Add(steamGame);
Utils.Log($"Found Game: {steamGame.Name} ({steamGame.AppId}) at {steamGame.InstallDir}");
});
});
Utils.Log($"Total number of Steam Games found: {games.Count}");
Games = games;
}