Created SteamHandler

This commit is contained in:
erri120 2019-11-05 15:20:12 +01:00 committed by Timothy Baldridge
parent 2497d5ba88
commit 2044a6728a

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
@ -35,6 +35,7 @@ namespace Wabbajack.Common
private string SteamConfig => Path.Combine(SteamPath, "config", "config.vdf");
<<<<<<< HEAD
public SteamHandler(bool init)
{
var steamKey = Registry.CurrentUser.OpenSubKey(SteamRegKey);
@ -42,6 +43,12 @@ namespace Wabbajack.Common
if(!init) return;
LoadInstallFolders();
LoadAllSteamGames();
=======
public SteamHandler()
{
var steamKey = Registry.CurrentUser.OpenSubKey(SteamRegKey);
SteamPath = steamKey?.GetValue("SteamPath").ToString();
>>>>>>> Created SteamHandler
}
/// <summary>
@ -64,9 +71,13 @@ namespace Wabbajack.Common
File.ReadLines(SteamConfig, Encoding.UTF8).Do(l =>
{
if (!l.Contains("BaseInstallFolder_")) return;
<<<<<<< HEAD
var s = GetVdfValue(l);
s = Path.Combine(s, "steamapps");
paths.Add(s);
=======
paths.Add(GetVdfValue(l));
>>>>>>> Created SteamHandler
});
InstallFolders = paths;