mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Only LOOT user data for the selected game will be included
This commit is contained in:
parent
386cb247c6
commit
e3ae59b14c
@ -125,9 +125,27 @@ namespace Wabbajack.Lib
|
||||
|
||||
if (Directory.Exists(lootPath))
|
||||
{
|
||||
lootFiles = Directory.EnumerateFiles(lootPath, "userlist.yaml", SearchOption.AllDirectories)
|
||||
.Where(p => p.FileExists())
|
||||
.Select(p => new RawSourceFile(VFS.Index.ByRootPath[p], Path.Combine(Consts.LOOTFolderFilesDir, p.RelativeTo(lootPath))));
|
||||
var lootGameDirs = new []
|
||||
{
|
||||
CompilingGame.MO2Name, // most of the games use the MO2 name
|
||||
CompilingGame.MO2Name.Replace(" ", "") //eg: Fallout 4 -> Fallout4
|
||||
};
|
||||
|
||||
var lootGameDir = lootGameDirs.Select(x => Path.Combine(lootPath, x))
|
||||
.FirstOrDefault(Directory.Exists);
|
||||
|
||||
if (lootGameDir != null)
|
||||
{
|
||||
Utils.Log($"Found LOOT game folder at {lootGameDir}");
|
||||
lootFiles = Directory.EnumerateFiles(lootGameDir, "userlist.yaml", SearchOption.TopDirectoryOnly)
|
||||
.Where(p => p.FileExists())
|
||||
.Select(p => new RawSourceFile(VFS.Index.ByRootPath[p],
|
||||
Path.Combine(Consts.LOOTFolderFilesDir, p.RelativeTo(lootPath))));
|
||||
|
||||
if (!lootFiles.Any())
|
||||
Utils.Log(
|
||||
$"Found no LOOT user data for {CompilingGame.HumanFriendlyGameName} at {lootGameDir}!");
|
||||
}
|
||||
}
|
||||
|
||||
if (cancel.IsCancellationRequested) return false;
|
||||
|
Loading…
Reference in New Issue
Block a user