mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Created IncludeVortexDeployment Compilation Step
This commit is contained in:
parent
8d650fcbd9
commit
bd3d753138
38
Wabbajack.Lib/CompilationSteps/IncludeVortexDeployment.cs
Normal file
38
Wabbajack.Lib/CompilationSteps/IncludeVortexDeployment.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wabbajack.Lib.CompilationSteps
|
||||
{
|
||||
public class IncludeVortexDeployment : ACompilationStep
|
||||
{
|
||||
public IncludeVortexDeployment(ACompiler compiler) : base(compiler)
|
||||
{
|
||||
}
|
||||
|
||||
public override Directive Run(RawSourceFile source)
|
||||
{
|
||||
if (!source.Path.EndsWith("\\vortex.deployment.msgpack") &&
|
||||
!source.Path.EndsWith("\\vortex.deployment.json")) return null;
|
||||
var inline = source.EvolveTo<InlineFile>();
|
||||
inline.SourceDataID = _compiler.IncludeFile(File.ReadAllBytes(source.AbsolutePath));
|
||||
return inline;
|
||||
}
|
||||
|
||||
public override IState GetState()
|
||||
{
|
||||
return new State();
|
||||
}
|
||||
|
||||
public class State : IState
|
||||
{
|
||||
public ICompilationStep CreateStep(ACompiler compiler)
|
||||
{
|
||||
return new IncludeVortexDeployment(compiler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -290,15 +290,16 @@ namespace Wabbajack.Lib
|
||||
return new List<ICompilationStep>
|
||||
{
|
||||
//new IncludePropertyFiles(this),
|
||||
|
||||
new IgnoreGameFiles(this),
|
||||
new IncludeRegex(this, @".*\.zip?$"),
|
||||
//new IncludeRegex(this, "^.*\\.zip"),
|
||||
new IncludeVortexDeployment(this),
|
||||
//new IncludeRegex(this, "*.zip"),
|
||||
//new IgnoreStartsWith(this, Path.Combine(Consts.GameFolderFilesDir, "Data")),
|
||||
//new IgnoreStartsWith(this, Path.Combine(Consts.GameFolderFilesDir, "Papyrus Compiler")),
|
||||
//new IgnoreStartsWith(this, Path.Combine(Consts.GameFolderFilesDir, "Skyrim")),
|
||||
//new IgnoreRegex(this, Consts.GameFolderFilesDir + "\\\\.*\\.bsa"),
|
||||
|
||||
new IgnoreGameFiles(this),
|
||||
|
||||
new DirectMatch(this),
|
||||
|
||||
new IgnoreGameFiles(this),
|
||||
|
@ -102,6 +102,7 @@
|
||||
<Compile Include="CompilationSteps\IncludeStubbedConfigFiles.cs" />
|
||||
<Compile Include="CompilationSteps\IncludeTaggedMods.cs" />
|
||||
<Compile Include="CompilationSteps\IncludeThisProfile.cs" />
|
||||
<Compile Include="CompilationSteps\IncludeVortexDeployment.cs" />
|
||||
<Compile Include="CompilationSteps\IStackStep.cs" />
|
||||
<Compile Include="CompilationSteps\PatchStockESMs.cs" />
|
||||
<Compile Include="CompilationSteps\Serialization.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user