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