Decompiled source of DesktopPhysicalGrab v1.0.1

plugins/DesktopPhysicalGrab.dll

Decompiled 4 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.NET.Common;
using BepInExResoniteShim;
using FrooxEngine;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]
[assembly: AssemblyCompany("eia485")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1+c6342d95258f64c56549b71aa990c0c31daaa63e")]
[assembly: AssemblyProduct("DesktopPhysicalGrab")]
[assembly: AssemblyTitle("DesktopPhysicalGrab")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/EIA485/NeosDesktopPhysicalGrab")]
[assembly: AssemblyVersion("1.0.1.0")]
[module: RefSafetyRules(11)]
namespace DesktopPhysicalGrab;

[ResonitePlugin("net.eia485.DesktopPhysicalGrab", "DesktopPhysicalGrab", "1.0.1", "eia485", "https://github.com/EIA485/NeosDesktopPhysicalGrab")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BasePlugin
{
	[HarmonyPatch(typeof(InteractionHandler), "TryPointGrab")]
	private class Patch
	{
		private static bool Prefix(InteractionHandler __instance)
		{
			return !(bool)((MethodBase)meth).Invoke((object)__instance, new object[2] { false, null });
		}
	}

	private static MethodInfo meth = typeof(InteractionHandler).GetMethod("Grab", (BindingFlags)36, (Binder)null, new global::System.Type[2]
	{
		typeof(bool),
		typeof(ICollider)
	}, (ParameterModifier[])null);

	public override void Load()
	{
		((BasePlugin)this).HarmonyInstance.PatchAll();
	}
}
public static class PluginMetadata
{
	public const string GUID = "net.eia485.DesktopPhysicalGrab";

	public const string NAME = "DesktopPhysicalGrab";

	public const string VERSION = "1.0.1";

	public const string AUTHORS = "eia485";

	public const string REPOSITORY_URL = "https://github.com/EIA485/NeosDesktopPhysicalGrab";
}