using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Imui.Controls; using Imui.Core; using Imui.IO; using Imui.IO.Touch; using Imui.IO.UGUI; using Imui.Rendering; using Imui.Style; using ImuiBepInEx.API; using Microsoft.CodeAnalysis; using TMPro; using UnityEngine; using UnityEngine.Audio; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; using WKLib.API; using WKLib.API.Assets; using WKLib.API.Input; using WKLib.API.UI; using WKLib.Core.Attributes; using WKLib.Core.Classes; using WKLib.Core.Config; using WKLib.Core.Reflection; using WKLib.Core.UI; using WKLib.Core.UI.Windows; using WKLib.Examples.UI; using WKLib.Utilities; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: AssemblyCompany("WKLib")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("0.3.0.0")] [assembly: AssemblyInformationalVersion("0.3.0+783600fdf7a4da27907d61242ace9cff4b43419f")] [assembly: AssemblyProduct("WKLib")] [assembly: AssemblyTitle("WKLib")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.3.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace WKLib { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.monksilly.WKLib", "WKLib", "0.3.0")] public class WKLibPlugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__5_0; public static UnityAction <>9__5_1; internal void b__5_0() { MonoSingleton.Instance.IsOpen = !MonoSingleton.Instance.IsOpen; EventSystem.current.SetSelectedGameObject((GameObject)null); } internal void b__5_1() { MonoSingleton.Instance.IsOpen = !MonoSingleton.Instance.IsOpen; EventSystem.current.SetSelectedGameObject((GameObject)null); } } public const string GUID = "com.monksilly.WKLib"; public const string NAME = "WKLib"; public const string VERSION = "0.3.0"; private static Harmony harmony; private void Awake() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown WKLog.Initialize(((BaseUnityPlugin)this).Logger); WKLog.Debug("Initalizing reflection..."); ReflectionUtility.Initialize(); WKLog.Debug("Initalizing input utility..."); InputUtility.Initialize(); ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; harmony = new Harmony("com.monksilly.WKLib"); Type[] types = typeof(WKLibPlugin).Assembly.GetTypes(); foreach (Type type in types) { if (type.GetCustomAttribute() != null) { harmony.PatchAll(type); } } ConfigManager.CreateEntries(((BaseUnityPlugin)this).Config); WKLog.Info("Plugin WKLib v0.3.0 is loaded!"); SceneManager.sceneLoaded -= OnSceneLoaded; SceneManager.sceneLoaded += OnSceneLoaded; } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown bool flag = false; if (((Scene)(ref scene)).name == "Main-Menu") { GameObject obj = GameObject.Find("Canvas - Main Menu/Main Menu/Version Text"); TextMeshProUGUI val = ((obj != null) ? obj.GetComponent() : null); if (val != null) { ((TMP_Text)val).text = ((TMP_Text)val).text + string.Format(" (wklib-{0}) ({1} Mods)", "0.3.0", Chainloader.PluginInfos.Count); } GameObject val2 = GameObject.Find("Canvas - Main Menu/Main Menu/Support Menu/Update Info"); if (!((Object)(object)val2 != (Object)null)) { return; } GameObject val3 = Object.Instantiate(val2, val2.transform.parent); val3.transform.SetSiblingIndex(0); ((Object)val3).name = "Toggle Overlay"; UI_MenuButton component = val3.GetComponent(); if (component != null) { Object.DestroyImmediate((Object)(object)component); } TextMeshProUGUI componentInChildren = val3.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { ((TMP_Text)componentInChildren).text = "Toggle Overlay"; } Button component2 = val3.GetComponent