mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:10:44 -05:00
27 lines
784 B
C#
27 lines
784 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 ConsistencyMultiPatch : ModulePatch
|
|||
|
{
|
|||
|
protected override MethodBase GetTargetMethod()
|
|||
|
{
|
|||
|
return PatchConstants.FilesCheckerTypes.Single(x => x.Name == "ConsistencyController")
|
|||
|
.GetMethods().Single(x => x.Name == "EnsureConsistency" && x.ReturnType == typeof(Task<ICheckResult>));
|
|||
|
}
|
|||
|
|
|||
|
[PatchPrefix]
|
|||
|
private static bool PatchPrefix(ref object __result)
|
|||
|
{
|
|||
|
__result = Task.FromResult<ICheckResult>(new FakeFileCheckerResult());
|
|||
|
return false;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|