diff --git a/Wabbajack.Lib/CompilationSteps/RunIfGame.cs b/Wabbajack.Lib/CompilationSteps/RunIfGame.cs deleted file mode 100644 index 8cfadaca..00000000 --- a/Wabbajack.Lib/CompilationSteps/RunIfGame.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using Wabbajack.Common; - -namespace Wabbajack.Lib.CompilationSteps -{ - public class RunIfGame : ACompilationStep - { - private readonly Game _game; - private readonly List _microStack; - - public RunIfGame(ACompiler compiler, Game game, List microStack) : base(compiler) - { - _game = game; - _microStack = microStack; - } - - public override Directive Run(RawSourceFile source) - { - return _compiler._vortexCompiler?.Game != _game ? null : _compiler._vortexCompiler.RunStack(_microStack, source); - } - - public override IState GetState() - { - return new State(_game, _microStack); - } - - [JsonArray("RunIfGame")] - public class State : IState - { - public State(Game game, List microStack) - { - Game = game; - MicroStack = microStack; - } - - public Game Game { get; set; } - public List MicroStack { get; set; } - - public ICompilationStep CreateStep(ACompiler compiler) - { - return new RunIfGame(compiler, Game, MicroStack); - } - } - } -} diff --git a/Wabbajack.Lib/VortexCompiler.cs b/Wabbajack.Lib/VortexCompiler.cs index 3df4076a..0b0c8653 100644 --- a/Wabbajack.Lib/VortexCompiler.cs +++ b/Wabbajack.Lib/VortexCompiler.cs @@ -176,7 +176,7 @@ namespace Wabbajack.Lib IEnumerable stack = MakeStack(); Info("Running Compilation Stack"); - List results = AllFiles.PMap(f => RunStack(stack, f)).ToList(); + List results = AllFiles.PMap(f => RunStack(stack.Where(s => s != null), f)).ToList(); IEnumerable noMatch = results.OfType().ToList(); Info($"No match for {noMatch.Count()} files"); @@ -410,9 +410,11 @@ namespace Wabbajack.Lib //new IncludePropertyFiles(this), new IncludeVortexDeployment(this), new IncludeRegex(this, "^*\\.meta"), + + Game == Game.DarkestDungeon ? new IncludeRegex(this, "project\\.xml$") : null, + new IgnoreStartsWith(this, " __vortex_staging_folder"), new IgnoreEndsWith(this, "__vortex_staging_folder"), - new IgnoreEndsWith(this, "project.xml"), // darkest dungeon specific new IgnoreGameFiles(this), diff --git a/Wabbajack.Lib/Wabbajack.Lib.csproj b/Wabbajack.Lib/Wabbajack.Lib.csproj index d252cb62..c5248d75 100644 --- a/Wabbajack.Lib/Wabbajack.Lib.csproj +++ b/Wabbajack.Lib/Wabbajack.Lib.csproj @@ -93,7 +93,6 @@ -