mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
39 lines
1006 B
C#
39 lines
1006 B
C#
using System.Threading.Tasks;
|
|
using Newtonsoft.Json;
|
|
using Wabbajack.Common;
|
|
|
|
namespace Wabbajack.Lib.CompilationSteps
|
|
{
|
|
public class IgnoreGameFiles : ACompilationStep
|
|
{
|
|
private readonly string _startDir;
|
|
|
|
public IgnoreGameFiles(ACompiler compiler) : base(compiler)
|
|
{
|
|
_startDir = Consts.GameFolderFilesDir + "\\";
|
|
}
|
|
|
|
public override async ValueTask<Directive> Run(RawSourceFile source)
|
|
{
|
|
if (!source.Path.StartsWith(_startDir)) return null;
|
|
var i = source.EvolveTo<IgnoredDirectly>();
|
|
i.Reason = "Default game file";
|
|
return i;
|
|
}
|
|
|
|
public override IState GetState()
|
|
{
|
|
return new State();
|
|
}
|
|
|
|
[JsonObject("IgnoreGameFiles")]
|
|
public class State : IState
|
|
{
|
|
public ICompilationStep CreateStep(ACompiler compiler)
|
|
{
|
|
return new IgnoreGameFiles(compiler);
|
|
}
|
|
}
|
|
}
|
|
}
|