mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #307 from wabbajack-tools/faster-tests
Don't use such a big BA2 file for recompression
This commit is contained in:
commit
271fe56f6b
@ -44,7 +44,8 @@ namespace Compression.BSA.Test
|
||||
(Game.SkyrimSpecialEdition, 12604), // SkyUI
|
||||
(Game.Skyrim, 3863), // SkyUI
|
||||
(Game.Skyrim, 51473), // iNeed
|
||||
(Game.Fallout4, 22223) // 10mm SMG
|
||||
//(Game.Fallout4, 22223) // 10mm SMG
|
||||
(Game.Fallout4, 4472) // True Storms
|
||||
};
|
||||
|
||||
await Task.WhenAll(modIDs.Select(async (info) =>
|
||||
|
@ -311,6 +311,13 @@ namespace Wabbajack.Common
|
||||
}
|
||||
}
|
||||
|
||||
public static Task PDoIndexed<T>(this IEnumerable<T> coll, WorkQueue queue, Action<int, T> f)
|
||||
{
|
||||
return coll.Zip(Enumerable.Range(0, int.MaxValue), (v, idx) => (v, idx))
|
||||
.PMap(queue, vs=> f(vs.idx, vs.v));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Loads INI data from the given filename and returns a dynamic type that
|
||||
|
@ -130,10 +130,10 @@ namespace Wabbajack.Lib
|
||||
.ToList();
|
||||
|
||||
Info("Installing Archives");
|
||||
await archives.PMap(Queue, UpdateTracker,a => InstallArchive(a.Archive, a.AbsolutePath, grouped[a.Archive.Hash]));
|
||||
await archives.PMap(Queue, UpdateTracker,a => InstallArchive(Queue, a.Archive, a.AbsolutePath, grouped[a.Archive.Hash]));
|
||||
}
|
||||
|
||||
private async Task InstallArchive(Archive archive, string absolutePath, IGrouping<string, FromArchive> grouping)
|
||||
private async Task InstallArchive(WorkQueue queue, Archive archive, string absolutePath, IGrouping<string, FromArchive> grouping)
|
||||
{
|
||||
Status($"Extracting {archive.Name}");
|
||||
|
||||
@ -176,8 +176,8 @@ namespace Wabbajack.Lib
|
||||
File.SetLastWriteTime(to, DateTime.Now);
|
||||
}
|
||||
|
||||
vFiles.GroupBy(f => f.FromFile)
|
||||
.DoIndexed((idx, group) =>
|
||||
await vFiles.GroupBy(f => f.FromFile)
|
||||
.PDoIndexed(queue, (idx, group) =>
|
||||
{
|
||||
Utils.Status("Installing files", idx * 100 / vFiles.Count);
|
||||
var firstDest = Path.Combine(OutputFolder, group.First().To);
|
||||
|
@ -31,7 +31,7 @@ namespace Wabbajack.Test
|
||||
utils = new TestUtils();
|
||||
utils.Game = Game.SkyrimSpecialEdition;
|
||||
|
||||
Utils.LogMessages.Subscribe(f => TestContext.WriteLine(f.ToString()));
|
||||
Utils.LogMessages.Subscribe(f => TestContext.WriteLine($"{DateTime.Now} - {f}"));
|
||||
|
||||
if (!Directory.Exists(DOWNLOAD_FOLDER))
|
||||
Directory.CreateDirectory(DOWNLOAD_FOLDER);
|
||||
|
Loading…
Reference in New Issue
Block a user