mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #326 from erri120/steam-fixes-2
Added more verbose output to the SteamHandler when finding libs/games
This commit is contained in:
commit
7b6f445304
@ -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))
|
||||
paths.Add(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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user