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 =>
|
var gameMeta = GameRegistry.Games.Values.FirstOrDefault(g =>
|
||||||
g.GOGIDs != null
|
{
|
||||||
&&
|
return g.GOGIDs != null
|
||||||
g.GOGIDs.Contains(game.ID)
|
&& (g.SteamIDs?.Contains(gameID) ?? false)
|
||||||
&&
|
&& (g.RequiredFiles?.TrueForAll(file => File.Exists(Path.Combine(game.Path, file))) ??
|
||||||
g.RequiredFiles.TrueForAll(file =>
|
true);
|
||||||
File.Exists(Path.Combine(game.Path, file))));
|
});
|
||||||
|
|
||||||
if (gameMeta == null)
|
if (gameMeta == null)
|
||||||
|
{
|
||||||
|
Utils.Log($"GOG Game \"{gameName}\"({gameID}) is not supported, skipping");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
game.Game = gameMeta.Game;
|
game.Game = gameMeta.Game;
|
||||||
|
|
||||||
|
@ -128,6 +128,8 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
|
|
||||||
SteamUniverses.Do(u =>
|
SteamUniverses.Do(u =>
|
||||||
{
|
{
|
||||||
|
Utils.Log($"Searching for Steam Games in {u}");
|
||||||
|
|
||||||
Directory.EnumerateFiles(u, "*.acf", SearchOption.TopDirectoryOnly).Where(File.Exists).Do(f =>
|
Directory.EnumerateFiles(u, "*.acf", SearchOption.TopDirectoryOnly).Where(File.Exists).Do(f =>
|
||||||
{
|
{
|
||||||
var game = new SteamGame();
|
var game = new SteamGame();
|
||||||
@ -146,14 +148,12 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
if (l.Contains("\"name\""))
|
if (l.Contains("\"name\""))
|
||||||
game.Name = GetVdfValue(l);
|
game.Name = GetVdfValue(l);
|
||||||
|
|
||||||
if (l.Contains("\"installdir\""))
|
if (!l.Contains("\"installdir\""))
|
||||||
{
|
return;
|
||||||
|
|
||||||
var path = Path.Combine(u, "common", GetVdfValue(l));
|
var path = Path.Combine(u, "common", GetVdfValue(l));
|
||||||
if (Directory.Exists(path))
|
if (Directory.Exists(path))
|
||||||
{
|
|
||||||
game.Path = path;
|
game.Path = path;
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!gotID || !Directory.Exists(game.Path)) return;
|
if (!gotID || !Directory.Exists(game.Path)) return;
|
||||||
@ -165,7 +165,10 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (gameMeta == null)
|
if (gameMeta == null)
|
||||||
|
{
|
||||||
|
Utils.Log($"Steam Game {game.Name}({game.ID}) is not supported, skipping");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
game.Game = gameMeta.Game;
|
game.Game = gameMeta.Game;
|
||||||
game.Universe = u;
|
game.Universe = u;
|
||||||
@ -183,7 +186,7 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadWorkshopItems(SteamGame game)
|
private static void LoadWorkshopItems(SteamGame game)
|
||||||
{
|
{
|
||||||
if(game.WorkshopItems == null)
|
if(game.WorkshopItems == null)
|
||||||
game.WorkshopItems = new List<SteamWorkshopItem>();
|
game.WorkshopItems = new List<SteamWorkshopItem>();
|
||||||
|
Loading…
Reference in New Issue
Block a user