mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fixed stack compilation endless loop
This commit is contained in:
parent
6a4600dcc1
commit
ece05901c2
@ -16,7 +16,7 @@ namespace Wabbajack.Lib.CompilationSteps
|
||||
|
||||
public DeconstructBSAs(ACompiler compiler) : base(compiler)
|
||||
{
|
||||
_include_directly = compiler._mo2Compiler.ModInis.Where(kv =>
|
||||
_include_directly = _compiler._mo2Compiler.ModInis.Where(kv =>
|
||||
{
|
||||
var general = kv.Value.General;
|
||||
if (general.notes != null && general.notes.Contains(Consts.WABBAJACK_INCLUDE)) return true;
|
||||
@ -28,16 +28,16 @@ namespace Wabbajack.Lib.CompilationSteps
|
||||
|
||||
_microstack = new List<ICompilationStep>
|
||||
{
|
||||
new DirectMatch(compiler),
|
||||
new IncludePatches(compiler._mo2Compiler),
|
||||
new DropAll(compiler)
|
||||
new DirectMatch(_compiler._mo2Compiler),
|
||||
new IncludePatches(_compiler._mo2Compiler),
|
||||
new DropAll(_compiler._mo2Compiler)
|
||||
};
|
||||
|
||||
_microstackWithInclude = new List<ICompilationStep>
|
||||
{
|
||||
new DirectMatch(compiler),
|
||||
new IncludePatches(compiler._mo2Compiler),
|
||||
new IncludeAll(compiler._mo2Compiler)
|
||||
new DirectMatch(_compiler._mo2Compiler),
|
||||
new IncludePatches(_compiler._mo2Compiler),
|
||||
new IncludeAll(_compiler._mo2Compiler)
|
||||
};
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ namespace Wabbajack.Lib.CompilationSteps
|
||||
|
||||
var id = Guid.NewGuid().ToString();
|
||||
|
||||
var matches = source_files.PMap(e => _compiler.RunStack(stack, new RawSourceFile(e)
|
||||
var matches = source_files.PMap(e => _compiler._mo2Compiler.RunStack(stack, new RawSourceFile(e)
|
||||
{
|
||||
Path = Path.Combine(Consts.BSACreationDir, id, e.Paths.Last())
|
||||
}));
|
||||
|
@ -12,10 +12,10 @@ namespace Wabbajack.Lib.CompilationSteps
|
||||
|
||||
public IgnoreDisabledMods(ACompiler compiler) : base(compiler)
|
||||
{
|
||||
var alwaysEnabled = compiler._mo2Compiler.ModInis.Where(f => IsAlwaysEnabled(f.Value)).Select(f => f.Key).ToHashSet();
|
||||
var alwaysEnabled = _compiler._mo2Compiler.ModInis.Where(f => IsAlwaysEnabled(f.Value)).Select(f => f.Key).ToHashSet();
|
||||
|
||||
_allEnabledMods = compiler._mo2Compiler.SelectedProfiles
|
||||
.SelectMany(p => File.ReadAllLines(Path.Combine(compiler._mo2Compiler.MO2Folder, "profiles", p, "modlist.txt")))
|
||||
_allEnabledMods = _compiler._mo2Compiler.SelectedProfiles
|
||||
.SelectMany(p => File.ReadAllLines(Path.Combine(_compiler._mo2Compiler.MO2Folder, "profiles", p, "modlist.txt")))
|
||||
.Where(line => line.StartsWith("+") || line.EndsWith("_separator"))
|
||||
.Select(line => line.Substring(1))
|
||||
.Concat(alwaysEnabled)
|
||||
|
@ -26,9 +26,9 @@ namespace Wabbajack.Lib.CompilationSteps
|
||||
var data = File.ReadAllText(source.AbsolutePath);
|
||||
var originalData = data;
|
||||
|
||||
data = data.Replace(_compiler.GamePath, Consts.GAME_PATH_MAGIC_BACK);
|
||||
data = data.Replace(_compiler.GamePath.Replace("\\", "\\\\"), Consts.GAME_PATH_MAGIC_DOUBLE_BACK);
|
||||
data = data.Replace(_compiler.GamePath.Replace("\\", "/"), Consts.GAME_PATH_MAGIC_FORWARD);
|
||||
data = data.Replace(_compiler._mo2Compiler.GamePath, Consts.GAME_PATH_MAGIC_BACK);
|
||||
data = data.Replace(_compiler._mo2Compiler.GamePath.Replace("\\", "\\\\"), Consts.GAME_PATH_MAGIC_DOUBLE_BACK);
|
||||
data = data.Replace(_compiler._mo2Compiler.GamePath.Replace("\\", "/"), Consts.GAME_PATH_MAGIC_FORWARD);
|
||||
|
||||
data = data.Replace(_compiler._mo2Compiler.MO2Folder, Consts.MO2_PATH_MAGIC_BACK);
|
||||
data = data.Replace(_compiler._mo2Compiler.MO2Folder.Replace("\\", "\\\\"), Consts.MO2_PATH_MAGIC_DOUBLE_BACK);
|
||||
|
@ -14,7 +14,7 @@ namespace Wabbajack.Lib.CompilationSteps
|
||||
public IncludeTaggedMods(ACompiler compiler, string tag) : base(compiler)
|
||||
{
|
||||
_tag = tag;
|
||||
_includeDirectly = compiler._mo2Compiler.ModInis.Where(kv =>
|
||||
_includeDirectly = _compiler._mo2Compiler.ModInis.Where(kv =>
|
||||
{
|
||||
var general = kv.Value.General;
|
||||
if (general.notes != null && general.notes.Contains(_tag))
|
||||
|
@ -12,7 +12,7 @@ namespace Wabbajack.Lib.CompilationSteps
|
||||
|
||||
public IncludeThisProfile(ACompiler compiler) : base(compiler)
|
||||
{
|
||||
_correctProfiles = compiler._mo2Compiler.SelectedProfiles.Select(p => Path.Combine("profiles", p) + "\\").ToList();
|
||||
_correctProfiles = _compiler._mo2Compiler.SelectedProfiles.Select(p => Path.Combine("profiles", p) + "\\").ToList();
|
||||
}
|
||||
|
||||
public override Directive Run(RawSourceFile source)
|
||||
|
Loading…
Reference in New Issue
Block a user