mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 05:50:44 -05:00
27 lines
802 B
C#
27 lines
802 B
C#
using System.Reflection;
|
|
using System.Threading.Tasks;
|
|
using SPT.Reflection.Patching;
|
|
using SPT.Reflection.Utils;
|
|
using SPT.Core.Models;
|
|
using FilesChecker;
|
|
|
|
namespace SPT.Core.Patches
|
|
{
|
|
public class ConsistencySinglePatch : ModulePatch
|
|
{
|
|
protected override MethodBase GetTargetMethod()
|
|
{
|
|
return PatchConstants.FilesCheckerTypes.SingleCustom(x => x.Name == "ConsistencyController")
|
|
.GetMethods().SingleCustom(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; // Skip original
|
|
}
|
|
}
|
|
}
|