using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using Microsoft.CodeAnalysis; 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: AssemblyCompany("HTFModManager")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("HTFModManager")] [assembly: AssemblyTitle("HTFModManager")] [assembly: AssemblyVersion("1.0.0.0")] [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 HTFModManager { [BepInPlugin("com.howtofish.htfmodmanager", "HTF Mod Manager", "1.0.1")] public sealed class Plugin : BaseUnityPlugin { public const string Guid = "com.howtofish.htfmodmanager"; public const string Name = "HTF Mod Manager"; public const string Version = "1.0.1"; private static ManualLogSource Log; private ConfigEntry _dumpOptionsKey; private ConfigEntry _dumpModsKey; private ConfigEntry _injectModsKey; private GameObject _modsButton; private GameObject _modsDisplay; private GameObject _optionsScreen; private GameObject _gameplayDisplayTemplate; private GameObject _bloodRowTemplate; private GameObject _sliderRowTemplate; private GameObject _editButtonTemplate; private PluginInfo _selectedPlugin; private bool _injected; private float _nextAutoInjectTry; private bool _configViewOpen; private ScrollRect _modsScrollRect; private RectTransform _modsViewport; private RectTransform _modsContent; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; _dumpOptionsKey = ((BaseUnityPlugin)this).Config.Bind("Debug", "DumpOptionsKey", (KeyCode)288, "Dump quirúrgico de OptionsScreen."); _dumpModsKey = ((BaseUnityPlugin)this).Config.Bind("Debug", "DumpModsKey", (KeyCode)289, "Vuelca plugins BepInEx cargados y ConfigEntry vivos."); _injectModsKey = ((BaseUnityPlugin)this).Config.Bind("Debug", "InjectModsKey", (KeyCode)290, "Crea/recrea la pestaña MODS nativa dentro de Options."); Log.LogInfo((object)"HTF Mod Manager 1.0.1 loaded."); Log.LogInfo((object)"F7 = dump quirúrgico de OptionsScreen"); Log.LogInfo((object)"F8 = dump mods + ConfigEntry"); Log.LogInfo((object)"F9 = inyectar/recrear pestaña MODS (debug; auto-inject activo)"); } private void OnDestroy() { } private void Update() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(_dumpOptionsKey.Value)) { DumpOptionsScreenFocused(); } if (Input.GetKeyDown(_dumpModsKey.Value)) { DumpLoadedModsAndConfigs(); } if (Input.GetKeyDown(_injectModsKey.Value)) { _injected = false; TryInjectModsTab(rebuild: true); } if (!_injected && Time.unscaledTime >= _nextAutoInjectTry) { _nextAutoInjectTry = Time.unscaledTime + 1f; TryInjectModsTab(rebuild: false); } if (_configViewOpen && Input.GetKeyDown((KeyCode)27)) { ReturnToModsList(); } } private void DumpOptionsScreenFocused() { //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown Log.LogInfo((object)""); Log.LogInfo((object)"================ HTF MOD MANAGER - OPTIONS FOCUSED DUMP ================"); GameObject val = FindOptionsScreen(); if ((Object)(object)val == (Object)null) { Log.LogWarning((object)"[OPTIONS] No encontré OptionsScreen. Abre Options y pulsa F7 otra vez."); Log.LogInfo((object)"================ END OPTIONS FOCUSED DUMP ==============================="); return; } Log.LogInfo((object)$"[OPTIONS] root='{GetPath(val.transform)}' activeSelf={val.activeSelf} activeHierarchy={val.activeInHierarchy}"); DumpTree(val.transform, 0, 5); Log.LogInfo((object)""); Log.LogInfo((object)"---------------- UPPER BUTTONS ----------------"); Transform val2 = FindChildRecursive(val.transform, "UpperButtonHolder"); if ((Object)(object)val2 != (Object)null) { foreach (Transform item in val2) { Transform val3 = item; Button component = ((Component)val3).GetComponent