using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using Fusion; using HarmonyLib; using Il2CppInterop.Runtime; using Il2CppInterop.Runtime.Attributes; using Il2CppInterop.Runtime.Injection; using Il2CppInterop.Runtime.InteropTypes; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem; using Il2CppSystem.Collections.Generic; using Microsoft.CodeAnalysis; using SSSGame; using SSSGame.Localization; using SSSGame.UI; using SSSGame.Weather; using SandSailorStudio.Localization; using SandSailorStudio.UI; using SandSailorStudio.WorldGen; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("SettingsPlus")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.1.0")] [assembly: AssemblyInformationalVersion("1.1.0+73c92fd9f13dedca88f0d9075e047a3c248bbb9f")] [assembly: AssemblyProduct("Settings Plus")] [assembly: AssemblyTitle("SettingsPlus")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.1.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 AskaSettingsPlus { [HarmonyPatch(typeof(PauseMenu))] public static class PauseMenuButtonPatch { private const string CloneName = "SettingsPlus_MenuButton"; private const string ButtonLabel = "Settings Plus"; private const string SaveMethodName = "BtnSave"; private static UnityAction _menuButtonClick; [HarmonyPostfix] [HarmonyPatch("OnActivate")] public static void OnActivate(PauseMenu __instance) { //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Expected O, but got Unknown //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Expected O, but got Unknown bool flag = default(bool); try { RectTransform buttonsPanel = __instance.buttonsPanel; if ((Object)(object)buttonsPanel == (Object)null) { Plugin.Log.LogWarning((object)"[SettingsPlus] PauseMenu.buttonsPanel was null; cannot inject button."); } else { if (!SettingsPanel.IsHostOrSingleplayer()) { return; } foreach (Transform componentsInChild in ((Component)buttonsPanel).GetComponentsInChildren(true)) { if (((Object)componentsInChild).name == "SettingsPlus_MenuButton") { return; } } Button[] array = Il2CppArrayBase