Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of AdminMenuButton v1.0.0
plugins/AdminMenuButton.dll
Decompiled 2 months agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using HarmonyLib; using MenuLib; 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("ClassLibrary2")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ClassLibrary2")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("7F64413D-250C-485B-A293-1DA418BB4CA3")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [BepInPlugin("h3nw.adminmenubutton", "Admin Menu Button", "1.0.0")] [BepInDependency("nickklmao.menulib", "2.5.0")] public class AdminMenuButton : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static BuilderDelegate <>9__1_0; internal void <Awake>b__1_0(Transform parent) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Admin Menu", (Action)OnAdminMenuClicked, parent, new Vector2(126f, 62f)); } } internal static ManualLogSource Log; private void Awake() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; object obj = <>c.<>9__1_0; if (obj == null) { BuilderDelegate val = delegate(Transform parent) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Admin Menu", (Action)OnAdminMenuClicked, parent, new Vector2(126f, 62f)); }; <>c.<>9__1_0 = val; obj = (object)val; } MenuAPI.AddElementToEscapeMenu((BuilderDelegate)obj); Log.LogInfo((object)"Admin Menu Button registered in escape menu."); } private static void OnAdminMenuClicked() { AccessTools.Method(typeof(MenuManager), "PageCloseAll", (Type[])null, (Type[])null)?.Invoke(MenuManager.instance, null); Type type = Type.GetType("RepoAdminMenu.Menu, RepoAdminMenu"); type.GetMethod("toggleMenu", BindingFlags.Static | BindingFlags.Public)?.Invoke(null, null); } }