Decompiled source of Inspect Anything v1.0.0

InspectAnything.dll

Decompiled 8 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("InspectAnything")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("InspectAnything")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ad29e738-fc67-4d9b-88bc-994a87fbbea2")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace InspectAnything;

[BepInPlugin("ironbean.InspectAnything", "Inspect Anything", "1.0.0")]
public class InspectAnythingBase : BaseUnityPlugin
{
	[HarmonyPatch(typeof(GrabbableObject))]
	internal class InspectPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void CreatePatch(GrabbableObject __instance)
		{
			__instance.itemProperties.canBeInspected = true;
		}
	}

	private const string modGUID = "ironbean.InspectAnything";

	private const string modName = "Inspect Anything";

	private const string modVersion = "1.0.0";

	private readonly Harmony harmony = new Harmony("ironbean.InspectAnything");

	private static InspectAnythingBase Instance;

	internal static ManualLogSource mls;

	private void Awake()
	{
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
		}
		mls = Logger.CreateLogSource("ironbean.InspectAnything");
		mls.LogInfo((object)"Inspect Anything -- Loaded");
		harmony.PatchAll(typeof(InspectAnythingBase));
		harmony.PatchAll(typeof(InspectPatch));
	}
}