mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
35 lines
1000 B
C#
35 lines
1000 B
C#
using System.IO;
|
|
|
|
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") && Path.GetExtension(source.Path) != ".meta") 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);
|
|
}
|
|
}
|
|
}
|
|
}
|