mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Bug fixes
This commit is contained in:
parent
62c3178ff2
commit
259863458d
@ -56,6 +56,9 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
|
||||
public override bool LoadAllGames()
|
||||
{
|
||||
if(Games == null)
|
||||
Games = new List<AStoreGame>();
|
||||
|
||||
try
|
||||
{
|
||||
string[] keys = GOGKey.GetSubKeyNames();
|
||||
@ -94,9 +97,16 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
|
||||
var path = pathValue.ToString();
|
||||
|
||||
var game = new GOGGame() {ID = gameID, Name = gameName, Path = path};
|
||||
var game = new GOGGame
|
||||
{
|
||||
ID = gameID,
|
||||
Name = gameName,
|
||||
Path = path
|
||||
};
|
||||
|
||||
var gameMeta = GameRegistry.Games.Values.FirstOrDefault(g =>
|
||||
g.GOGIDs != null
|
||||
&&
|
||||
g.GOGIDs.Contains(game.ID)
|
||||
&&
|
||||
g.RequiredFiles.TrueForAll(file =>
|
||||
|
@ -36,7 +36,7 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
|
||||
private const string SteamRegKey = @"Software\Valve\Steam";
|
||||
|
||||
private string SteamPath { get; set; }
|
||||
public string SteamPath { get; set; }
|
||||
private List<string> SteamUniverses { get; set; }
|
||||
|
||||
private string SteamConfig => Path.Combine(SteamPath, "config", "config.vdf");
|
||||
@ -123,6 +123,9 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
return false;
|
||||
}
|
||||
|
||||
if(Games == null)
|
||||
Games = new List<AStoreGame>();
|
||||
|
||||
SteamUniverses.Do(u =>
|
||||
{
|
||||
Directory.EnumerateFiles(u, "*.acf", SearchOption.TopDirectoryOnly).Where(File.Exists).Do(f =>
|
||||
|
@ -57,6 +57,11 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
return StoreGames.FirstOrDefault(g => g.Game == game)?.Path;
|
||||
}
|
||||
|
||||
public string GetGamePath(Game game, StoreType type)
|
||||
{
|
||||
return StoreGames.FirstOrDefault(g => g.Type == type && g.Game == game)?.Path;
|
||||
}
|
||||
|
||||
public string GetGamePath(int id)
|
||||
{
|
||||
return StoreGames.FirstOrDefault(g => g.ID == id)?.Path;
|
||||
|
Loading…
Reference in New Issue
Block a user