Decompiled source of ScanLock v1.0.1

ScanLock.dll

Decompiled 2 days ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]
[assembly: AssemblyCompany("ScanLock")]
[assembly: AssemblyConfiguration("R")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ScanLock")]
[assembly: AssemblyTitle("ScanLock")]
[assembly: AssemblyVersion("1.0.0.0")]
[HarmonyPatch(typeof(ScannerController))]
public static class ScannerControllerPatch
{
	private static bool isScanning;

	public static bool skipPatch;

	[HarmonyPatch("Update")]
	[HarmonyPrefix]
	public static void UpdatePatch(ScannerController __instance)
	{
		if (!skipPatch)
		{
			if (PlayerInputController.instance.useEquipment)
			{
				isScanning = !isScanning;
			}
			if (isScanning)
			{
				__instance.Scan();
			}
		}
	}
}
[BepInPlugin("com.tawoly.ScanLock", "ScanLock", "1.0.1")]
[BepInIncompatibility("ContiScan")]
public class ScanLockMod : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		Harmony val = new Harmony("com.tawoly.ScanLock");
		val.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"ScanLockMod: Loaded and Harmony-Patches active");
	}
}