Decompiled source of OpenDebugMenu v1.0.0

OpenDebugMenu.dll

Decompiled 2 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OpenDebugMenu")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OpenDebugMenu")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("5a0a2e2a-cc53-4c8f-b905-a41aadc39e41")]
[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 OpenDebugMenu
{
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "OpenDebugMenu";

		public const string PLUGIN_NAME = "OpenDebugMenu";

		public const string PLUGIN_VERSION = "1.0.0";
	}
	[BepInPlugin("OpenDebugMenu", "OpenDebugMenu", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin OpenDebugMenu is loaded!");
			Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null);
		}
	}
}
namespace OpenDebugMenu.Patches
{
	[HarmonyPatch(typeof(OswaldController), "Update")]
	internal class UpdatePatch
	{
		private static void Postfix(OswaldController __instance)
		{
			if (((ButtonControl)Keyboard.current[(Key)68]).wasPressedThisFrame)
			{
				NoxConsole instance = SingletonMB<NoxConsole>.Instance;
				if ((Object)(object)instance != (Object)null)
				{
					instance.OnExternalActivate();
				}
			}
		}
	}
}