using System; using System.Collections; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using HarmonyLib; using Microsoft.CodeAnalysis; using Photon.Pun; using Photon.Realtime; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 PeakPresets { public static class Loc { public static bool IsUkrainian => (int)LocalizedText.CURRENT_LANGUAGE == 8; public static string T(string uk, string en) { if (!IsUkrainian) { return en; } return uk; } } [HarmonyPatch(typeof(PauseMenuMainPage), "Start")] public static class PauseMenuMainPage_Start_Patch { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__0_0; internal void b__0_0() { if ((Object)(object)PresetsWindow.Instance != (Object)null) { PresetsWindow.Instance.Toggle(); } } } private static void Postfix(PauseMenuMainPage __instance) { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown //IL_020a: Unknown result type (might be due to invalid IL or missing references) try { object? value = AccessTools.Field(typeof(PauseMenuMainPage), "m_settingsButton").GetValue(__instance); Button val = (Button)((value is Button) ? value : null); if ((Object)(object)val == (Object)null) { return; } Transform parent = ((Component)val).transform.parent; if ((Object)(object)parent.Find("PeakPresetsButton") != (Object)null) { return; } RectTransform component = ((Component)val).GetComponent(); GameObject val2 = new GameObject("PeakPresetsButton", new Type[1] { typeof(RectTransform) }); val2.transform.SetParent(parent, false); RectTransform component2 = val2.GetComponent(); component2.sizeDelta = component.sizeDelta; component2.anchorMin = component.anchorMin; component2.anchorMax = component.anchorMax; component2.pivot = component.pivot; ((Transform)component2).localScale = ((Transform)component).localScale; Image val3 = val2.AddComponent(); Image component3 = ((Component)val).GetComponent(); if ((Object)(object)component3 != (Object)null) { val3.sprite = component3.sprite; } val3.type = (Type)1; ((Graphic)val3).color = new Color(0.25f, 0.55f, 0.6f); ButtonClickedEvent onClick = val2.AddComponent