mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #339 from erri120/store-fixes
Added more verbose output to the StoreHandlers
This commit is contained in:
commit
96f899648d
@ -105,15 +105,18 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
};
|
||||
|
||||
var gameMeta = GameRegistry.Games.Values.FirstOrDefault(g =>
|
||||
g.GOGIDs != null
|
||||
&&
|
||||
g.GOGIDs.Contains(game.ID)
|
||||
&&
|
||||
g.RequiredFiles.TrueForAll(file =>
|
||||
File.Exists(Path.Combine(game.Path, file))));
|
||||
{
|
||||
return g.GOGIDs != null
|
||||
&& (g.SteamIDs?.Contains(gameID) ?? false)
|
||||
&& (g.RequiredFiles?.TrueForAll(file => File.Exists(Path.Combine(game.Path, file))) ??
|
||||
true);
|
||||
});
|
||||
|
||||
if (gameMeta == null)
|
||||
{
|
||||
Utils.Log($"GOG Game \"{gameName}\"({gameID}) is not supported, skipping");
|
||||
return;
|
||||
}
|
||||
|
||||
game.Game = gameMeta.Game;
|
||||
|
||||
|
@ -128,6 +128,8 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
|
||||
SteamUniverses.Do(u =>
|
||||
{
|
||||
Utils.Log($"Searching for Steam Games in {u}");
|
||||
|
||||
Directory.EnumerateFiles(u, "*.acf", SearchOption.TopDirectoryOnly).Where(File.Exists).Do(f =>
|
||||
{
|
||||
var game = new SteamGame();
|
||||
@ -146,14 +148,12 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
if (l.Contains("\"name\""))
|
||||
game.Name = GetVdfValue(l);
|
||||
|
||||
if (l.Contains("\"installdir\""))
|
||||
{
|
||||
var path = Path.Combine(u, "common", GetVdfValue(l));
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
game.Path = path;
|
||||
}
|
||||
}
|
||||
if (!l.Contains("\"installdir\""))
|
||||
return;
|
||||
|
||||
var path = Path.Combine(u, "common", GetVdfValue(l));
|
||||
if (Directory.Exists(path))
|
||||
game.Path = path;
|
||||
});
|
||||
|
||||
if (!gotID || !Directory.Exists(game.Path)) return;
|
||||
@ -165,7 +165,10 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
});
|
||||
|
||||
if (gameMeta == null)
|
||||
{
|
||||
Utils.Log($"Steam Game {game.Name}({game.ID}) is not supported, skipping");
|
||||
return;
|
||||
}
|
||||
|
||||
game.Game = gameMeta.Game;
|
||||
game.Universe = u;
|
||||
@ -183,7 +186,7 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
return true;
|
||||
}
|
||||
|
||||
private void LoadWorkshopItems(SteamGame game)
|
||||
private static void LoadWorkshopItems(SteamGame game)
|
||||
{
|
||||
if(game.WorkshopItems == null)
|
||||
game.WorkshopItems = new List<SteamWorkshopItem>();
|
||||
|
Loading…
Reference in New Issue
Block a user