mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -05:00
27 lines
791 B
C#
27 lines
791 B
C#
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Threading.Tasks;
|
|
using Aki.Reflection.Patching;
|
|
using Aki.Reflection.Utils;
|
|
using Aki.Core.Models;
|
|
using FilesChecker;
|
|
|
|
namespace Aki.Core.Patches
|
|
{
|
|
public class ConsistencySinglePatch : ModulePatch
|
|
{
|
|
protected override MethodBase GetTargetMethod()
|
|
{
|
|
return PatchConstants.FilesCheckerTypes.Single(x => x.Name == "ConsistencyController")
|
|
.GetMethods().Single(x => x.Name == "EnsureConsistencySingle" && x.ReturnType == typeof(Task<ICheckResult>));
|
|
}
|
|
|
|
[PatchPrefix]
|
|
private static bool PatchPrefix(ref object __result)
|
|
{
|
|
__result = Task.FromResult<ICheckResult>(new FakeFileCheckerResult());
|
|
return false;
|
|
}
|
|
}
|
|
}
|