mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
parent
40640dff5a
commit
84b27b2a9c
@ -39,10 +39,17 @@ namespace Wabbajack.Lib.CompilationSteps
|
||||
return new State();
|
||||
}
|
||||
|
||||
private static async Task<byte[]> ReadAndCleanModlist(AbsolutePath absolutePath)
|
||||
{
|
||||
var lines = await absolutePath.ReadAllLinesAsync();
|
||||
lines = lines.Where(line => !(line.StartsWith("-") && !line.EndsWith("_separator"))).ToArray();
|
||||
private async Task<byte[]> ReadAndCleanModlist(AbsolutePath absolutePath)
|
||||
{
|
||||
var alwaysEnabled = _mo2Compiler.ModInis.Where(f => IgnoreDisabledMods.IsAlwaysEnabled(f.Value))
|
||||
.Select(f => f.Key)
|
||||
.Distinct();
|
||||
var lines = File.ReadAllLines(absolutePath.ToString()).Where(l =>
|
||||
{
|
||||
return l.StartsWith("+")
|
||||
|| alwaysEnabled.Any(x => x.Equals(l.Substring(1)))
|
||||
|| l.EndsWith("_separator");
|
||||
}).ToArray();
|
||||
return Encoding.UTF8.GetBytes(string.Join("\r\n", lines));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user