using System; using System.Collections; using System.Collections.Generic; 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.Threading; using System.Threading.Tasks; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using HarmonyLib; using Imui.Controls; using Imui.Core; using Imui.IO; using Imui.IO.Events; using Imui.IO.Touch; using Imui.IO.UGUI; using Imui.Rendering; using Imui.Style; using ImuiBepInEx.API; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; using WKLib.API; using WKLib.API.Assets; using WKLib.API.Config; using WKLib.API.Input; using WKLib.API.UI; using WKLib.Core.Attributes; using WKLib.Core.Classes; using WKLib.Core.Config; using WKLib.Core.Config.Converters; 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.2.3.0")] [assembly: AssemblyInformationalVersion("0.2.3+062d1f5bd928f5cf8e87168ae3295ace1c91ea47")] [assembly: AssemblyProduct("WKLib")] [assembly: AssemblyTitle("WKLib")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.2.3.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.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.2.3")] 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.2.3"; private static Harmony harmony; private void Awake() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown WKLog.Initialize(((BaseUnityPlugin)this).Logger); ((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); } } WKLog.Info("Plugin WKLib v0.2.3 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.2.3", 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