Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of ExtensiveQoL v1.5.0
ExtensiveQoL.dll
Decompiled 5 months agousing System; using System.Collections.Generic; 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 BepInEx.Configuration; using BepInEx.Logging; using ExtensiveQoL.Patch; using HarmonyLib; using Microsoft.CodeAnalysis; using TMPro; using UnityEngine; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyCompany("UnloadedHangar")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Detailed upgrade list")] [assembly: AssemblyFileVersion("1.5.0.0")] [assembly: AssemblyProduct("ExtensiveQoL")] [assembly: AssemblyTitle("ExtensiveQoL")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.5.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 ExtensiveQoL { internal class ConfigManager { public ExtendedConfigEntry<bool> EnableConfiguration; public ExtendedConfigEntry<string> UI_Key; public ExtendedConfigEntry<float> ListXPosition; public ExtendedConfigEntry<float> ListYPosition; public ConfigManager() { BindConfigs(); ClearUnusedEntries(); } private void BindConfigs() { EnableConfiguration = new ExtendedConfigEntry<bool>("General Settings", "EnableConfiguration", defaultValue: false, "Enable if you want to use custom set config setting values. If disabled, the default config setting values will be used."); UI_Key = new ExtendedConfigEntry<string>("UI Options", "UI_Key", "K", "Key that triggers the upgrades list UI.", useEnableConfiguration: true); ListXPosition = new ExtendedConfigEntry<float>("UI Options", "ListXPosition", 249f, "Onscreen UI X position", useEnableConfiguration: true); ListYPosition = new ExtendedConfigEntry<float>("UI Options", "ListYPosition", 201f, "Onscreen UI Y position", useEnableConfiguration: true); } private void ClearUnusedEntries() { ConfigFile config = ((BaseUnityPlugin)ExtensiveQoL.Instance).Config; PropertyInfo property = ((object)config).GetType().GetProperty("OrphanedEntries", BindingFlags.Instance | BindingFlags.NonPublic); Dictionary<ConfigDefinition, string> dictionary = (Dictionary<ConfigDefinition, string>)property.GetValue(config, null); dictionary.Clear(); config.Save(); } } internal class Content { public static GameObject[] AssetsList; public static void Load() { LoadAssetsFromAssetBundle(); } private static void LoadAssetsFromAssetBundle() { try { string directoryName = Path.GetDirectoryName(((BaseUnityPlugin)ExtensiveQoL.Instance).Info.Location); string text = Path.Combine(directoryName, "extensiveqol"); AssetBundle val = AssetBundle.LoadFromFile(text); AssetsList = val.LoadAllAssets<GameObject>(); ExtensiveQoL.logger.LogInfo((object)"Successfully loaded assets from AssetBundle!"); } catch (Exception arg) { ExtensiveQoL.logger.LogError((object)$"Error: failed to load assets from AssetBundle.\n\n{arg}"); } } } public class ExtendedConfigEntry<T> { public ConfigEntry<T> ConfigEntry; public Func<T> GetValue; public Action<T> SetValue; public bool UseEnableConfiguration = false; public T DefaultValue => (T)((ConfigEntryBase)ConfigEntry).DefaultValue; public T Value { get { return GetValue(); } set { SetValue(value); } } public ExtendedConfigEntry(string section, string key, T defaultValue, string description, bool useEnableConfiguration = false) { ConfigEntry = ((BaseUnityPlugin)ExtensiveQoL.Instance).Config.Bind<T>(section, key, defaultValue, description); UseEnableConfiguration = useEnableConfiguration; Initialize(); } public ExtendedConfigEntry(string section, string key, T defaultValue, ConfigDescription configDescription = null, bool useEnableConfiguration = false) { ConfigEntry = ((BaseUnityPlugin)ExtensiveQoL.Instance).Config.Bind<T>(section, key, defaultValue, configDescription); UseEnableConfiguration = useEnableConfiguration; Initialize(); } private void Initialize() { if (GetValue == null) { GetValue = () => (UseEnableConfiguration && !ExtensiveQoL.ConfigManager.EnableConfiguration.Value) ? DefaultValue : ConfigEntry.Value; } if (SetValue == null) { SetValue = delegate(T value) { ConfigEntry.Value = value; }; } } public void ResetToDefault() { ConfigEntry.Value = (T)((ConfigEntryBase)ConfigEntry).DefaultValue; } } public class Helper : MonoBehaviour { internal static bool IsListOpen; internal static bool IsEmergencyResetPrimed; public static Helper Instance { get; private set; } private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } } internal string GetLobbyPlayerNameSafe(int index) { if (GameDirector.instance.PlayerList.Count > index) { return GameDirector.instance.PlayerList[index].playerName; } return "Empty slot"; } internal Color GetLobbyPlayerColorSafe(int index) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if (GameDirector.instance.PlayerList.Count > index) { return GameDirector.instance.PlayerList[index].playerAvatarVisuals.color; } return Color.gray; } internal KeyCode ConvertData(string keyToConvert) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) return (KeyCode)Enum.Parse(typeof(KeyCode), keyToConvert); } internal static string GetLobbyPlayerDataSafe(int index, int entry) { if (GameDirector.instance.PlayerList.Count > index) { return entry switch { 0 => StatsManager.instance.playerUpgradeHealth[GameDirector.instance.PlayerList[index].steamID].ToString(), 1 => StatsManager.instance.playerUpgradeSpeed[GameDirector.instance.PlayerList[index].steamID].ToString(), 2 => StatsManager.instance.playerUpgradeStrength[GameDirector.instance.PlayerList[index].steamID].ToString(), 3 => StatsManager.instance.playerUpgradeExtraJump[GameDirector.instance.PlayerList[index].steamID].ToString(), 4 => StatsManager.instance.playerUpgradeRange[GameDirector.instance.PlayerList[index].steamID].ToString(), 5 => StatsManager.instance.playerUpgradeStamina[GameDirector.instance.PlayerList[index].steamID].ToString(), 6 => StatsManager.instance.playerUpgradeLaunch[GameDirector.instance.PlayerList[index].steamID].ToString(), 7 => StatsManager.instance.playerUpgradeMapPlayerCount[GameDirector.instance.PlayerList[index].steamID].ToString(), 8 => StatsManager.instance.playerUpgradeCrouchRest[GameDirector.instance.PlayerList[index].steamID].ToString(), 9 => StatsManager.instance.playerUpgradeTumbleWings[GameDirector.instance.PlayerList[index].steamID].ToString(), 10 => StatsManager.instance.playerUpgradeTumbleClimb[GameDirector.instance.PlayerList[index].steamID].ToString(), 11 => StatsManager.instance.playerUpgradeDeathHeadBattery[GameDirector.instance.PlayerList[index].steamID].ToString(), _ => "X", }; } return "0"; } internal static int GetLobbyPlayerDataSafeInt(int index, int entry) { if (GameDirector.instance.PlayerList.Count > index) { return entry switch { 0 => StatsManager.instance.playerUpgradeHealth[GameDirector.instance.PlayerList[index].steamID], 1 => StatsManager.instance.playerUpgradeSpeed[GameDirector.instance.PlayerList[index].steamID], 2 => StatsManager.instance.playerUpgradeStrength[GameDirector.instance.PlayerList[index].steamID], 3 => StatsManager.instance.playerUpgradeExtraJump[GameDirector.instance.PlayerList[index].steamID], 4 => StatsManager.instance.playerUpgradeRange[GameDirector.instance.PlayerList[index].steamID], 5 => StatsManager.instance.playerUpgradeStamina[GameDirector.instance.PlayerList[index].steamID], 6 => StatsManager.instance.playerUpgradeLaunch[GameDirector.instance.PlayerList[index].steamID], 7 => StatsManager.instance.playerUpgradeMapPlayerCount[GameDirector.instance.PlayerList[index].steamID], 8 => StatsManager.instance.playerUpgradeCrouchRest[GameDirector.instance.PlayerList[index].steamID], 9 => StatsManager.instance.playerUpgradeTumbleWings[GameDirector.instance.PlayerList[index].steamID], 10 => StatsManager.instance.playerUpgradeTumbleClimb[GameDirector.instance.PlayerList[index].steamID], 11 => StatsManager.instance.playerUpgradeDeathHeadBattery[GameDirector.instance.PlayerList[index].steamID], _ => 999, }; } return 0; } } internal enum PlayerEnum { Player0, Player1, Player2, Player3, Player4, Player5 } public class PlayerListController : MonoBehaviour { internal static PlayerListController instance; [SerializeField] private TextMeshProUGUI NameTextPanel; [Space(1f)] [Header("PlayerNames")] [SerializeField] private TextMeshProUGUI Player0; [SerializeField] private TextMeshProUGUI Player1; [SerializeField] private TextMeshProUGUI Player2; [SerializeField] private TextMeshProUGUI Player3; [SerializeField] private TextMeshProUGUI Player4; [SerializeField] private TextMeshProUGUI Player5; [Space(1f)] [Header("Player0Upgrades")] [SerializeField] private TextMeshProUGUI Player0Health; [SerializeField] private TextMeshProUGUI Player0Speed; [SerializeField] private TextMeshProUGUI Player0Strength; [SerializeField] private TextMeshProUGUI Player0Jump; [SerializeField] private TextMeshProUGUI Player0Range; [SerializeField] private TextMeshProUGUI Player0Stamina; [SerializeField] private TextMeshProUGUI Player0Tumble; [SerializeField] private TextMeshProUGUI Player0DeadHead; [SerializeField] private TextMeshProUGUI Player0StaminaRegen; [SerializeField] private TextMeshProUGUI Player0Wings; [SerializeField] private TextMeshProUGUI Player0Climb; [SerializeField] private GameObject Player0Map; [Space(1f)] [Header("Player1Upgrades")] [SerializeField] private TextMeshProUGUI Player1Health; [SerializeField] private TextMeshProUGUI Player1Speed; [SerializeField] private TextMeshProUGUI Player1Strength; [SerializeField] private TextMeshProUGUI Player1Jump; [SerializeField] private TextMeshProUGUI Player1Range; [SerializeField] private TextMeshProUGUI Player1Stamina; [SerializeField] private TextMeshProUGUI Player1Tumble; [SerializeField] private TextMeshProUGUI Player1DeadHead; [SerializeField] private TextMeshProUGUI Player1StaminaRegen; [SerializeField] private TextMeshProUGUI Player1Wings; [SerializeField] private TextMeshProUGUI Player1Climb; [SerializeField] private GameObject Player1Map; [Space(1f)] [Header("Player2Upgrades")] [SerializeField] private TextMeshProUGUI Player2Health; [SerializeField] private TextMeshProUGUI Player2Speed; [SerializeField] private TextMeshProUGUI Player2Strength; [SerializeField] private TextMeshProUGUI Player2Jump; [SerializeField] private TextMeshProUGUI Player2Range; [SerializeField] private TextMeshProUGUI Player2Stamina; [SerializeField] private TextMeshProUGUI Player2Tumble; [SerializeField] private TextMeshProUGUI Player2DeadHead; [SerializeField] private TextMeshProUGUI Player2StaminaRegen; [SerializeField] private TextMeshProUGUI Player2Wings; [SerializeField] private TextMeshProUGUI Player2Climb; [SerializeField] private GameObject Player2Map; [Space(1f)] [Header("Player3Upgrades")] [SerializeField] private TextMeshProUGUI Player3Health; [SerializeField] private TextMeshProUGUI Player3Speed; [SerializeField] private TextMeshProUGUI Player3Strength; [SerializeField] private TextMeshProUGUI Player3Jump; [SerializeField] private TextMeshProUGUI Player3Range; [SerializeField] private TextMeshProUGUI Player3Stamina; [SerializeField] private TextMeshProUGUI Player3Tumble; [SerializeField] private TextMeshProUGUI Player3DeadHead; [SerializeField] private TextMeshProUGUI Player3StaminaRegen; [SerializeField] private TextMeshProUGUI Player3Wings; [SerializeField] private TextMeshProUGUI Player3Climb; [SerializeField] private GameObject Player3Map; [Space(1f)] [Header("Player4Upgrades")] [SerializeField] private TextMeshProUGUI Player4Health; [SerializeField] private TextMeshProUGUI Player4Speed; [SerializeField] private TextMeshProUGUI Player4Strength; [SerializeField] private TextMeshProUGUI Player4Jump; [SerializeField] private TextMeshProUGUI Player4Range; [SerializeField] private TextMeshProUGUI Player4Stamina; [SerializeField] private TextMeshProUGUI Player4Tumble; [SerializeField] private TextMeshProUGUI Player4DeadHead; [SerializeField] private TextMeshProUGUI Player4StaminaRegen; [SerializeField] private TextMeshProUGUI Player4Wings; [SerializeField] private TextMeshProUGUI Player4Climb; [SerializeField] private GameObject Player4Map; [Space(1f)] [Header("Player5Upgrades")] [SerializeField] private TextMeshProUGUI Player5Health; [SerializeField] private TextMeshProUGUI Player5Speed; [SerializeField] private TextMeshProUGUI Player5Strength; [SerializeField] private TextMeshProUGUI Player5Jump; [SerializeField] private TextMeshProUGUI Player5Range; [SerializeField] private TextMeshProUGUI Player5Stamina; [SerializeField] private TextMeshProUGUI Player5Tumble; [SerializeField] private TextMeshProUGUI Player5DeadHead; [SerializeField] private TextMeshProUGUI Player5StaminaRegen; [SerializeField] private TextMeshProUGUI Player5Wings; [SerializeField] private TextMeshProUGUI Player5Climb; [SerializeField] private GameObject Player5Map; private void Awake() { if ((Object)(object)instance == (Object)null) { instance = this; } } private void Start() { //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) ((TMP_Text)NameTextPanel).font = ((TMP_Text)GoalUI.instance.Text).font; ((TMP_Text)NameTextPanel).text = "ExtensiveQoL 1.5.0"; ((TMP_Text)Player0).SetText(Helper.Instance.GetLobbyPlayerNameSafe(0), true); ((TMP_Text)Player1).SetText(Helper.Instance.GetLobbyPlayerNameSafe(1), true); ((TMP_Text)Player2).SetText(Helper.Instance.GetLobbyPlayerNameSafe(2), true); ((TMP_Text)Player3).SetText(Helper.Instance.GetLobbyPlayerNameSafe(3), true); ((TMP_Text)Player4).SetText(Helper.Instance.GetLobbyPlayerNameSafe(4), true); ((TMP_Text)Player5).SetText(Helper.Instance.GetLobbyPlayerNameSafe(5), true); ((Graphic)Player0).color = Helper.Instance.GetLobbyPlayerColorSafe(0); ((Graphic)Player1).color = Helper.Instance.GetLobbyPlayerColorSafe(1); ((Graphic)Player2).color = Helper.Instance.GetLobbyPlayerColorSafe(2); ((Graphic)Player3).color = Helper.Instance.GetLobbyPlayerColorSafe(3); ((Graphic)Player4).color = Helper.Instance.GetLobbyPlayerColorSafe(4); ((Graphic)Player5).color = Helper.Instance.GetLobbyPlayerColorSafe(5); if (((TMP_Text)Player0).text.Length > 18) { ((TMP_Text)Player0).text = ((TMP_Text)Player0).text.Remove(18, ((TMP_Text)Player0).text.Length - 18); } if (((TMP_Text)Player1).text.Length > 18) { ((TMP_Text)Player1).text = ((TMP_Text)Player1).text.Remove(18, ((TMP_Text)Player1).text.Length - 18); } if (((TMP_Text)Player2).text.Length > 18) { ((TMP_Text)Player2).text = ((TMP_Text)Player2).text.Remove(18, ((TMP_Text)Player2).text.Length - 18); } if (((TMP_Text)Player3).text.Length > 18) { ((TMP_Text)Player3).text = ((TMP_Text)Player3).text.Remove(18, ((TMP_Text)Player3).text.Length - 18); } if (((TMP_Text)Player4).text.Length > 18) { ((TMP_Text)Player4).text = ((TMP_Text)Player4).text.Remove(18, ((TMP_Text)Player4).text.Length - 18); } if (((TMP_Text)Player5).text.Length > 18) { ((TMP_Text)Player5).text = ((TMP_Text)Player5).text.Remove(18, ((TMP_Text)Player5).text.Length - 18); } ((TMP_Text)Player0Health).text = Helper.GetLobbyPlayerDataSafe(0, 0); ((TMP_Text)Player0Speed).text = Helper.GetLobbyPlayerDataSafe(0, 1); ((TMP_Text)Player0Strength).text = Helper.GetLobbyPlayerDataSafe(0, 2); ((TMP_Text)Player0Jump).text = Helper.GetLobbyPlayerDataSafe(0, 3); ((TMP_Text)Player0Range).text = Helper.GetLobbyPlayerDataSafe(0, 4); ((TMP_Text)Player0Stamina).text = Helper.GetLobbyPlayerDataSafe(0, 5); ((TMP_Text)Player0Tumble).text = Helper.GetLobbyPlayerDataSafe(0, 6); ((TMP_Text)Player0DeadHead).text = Helper.GetLobbyPlayerDataSafe(0, 11); ((TMP_Text)Player0StaminaRegen).text = Helper.GetLobbyPlayerDataSafe(0, 8); ((TMP_Text)Player0Wings).text = Helper.GetLobbyPlayerDataSafe(0, 9); if (Helper.GetLobbyPlayerDataSafeInt(0, 7) > 0) { Player0Map.SetActive(true); } ((TMP_Text)Player1Health).text = Helper.GetLobbyPlayerDataSafe(1, 0); ((TMP_Text)Player1Speed).text = Helper.GetLobbyPlayerDataSafe(1, 1); ((TMP_Text)Player1Strength).text = Helper.GetLobbyPlayerDataSafe(1, 2); ((TMP_Text)Player1Jump).text = Helper.GetLobbyPlayerDataSafe(1, 3); ((TMP_Text)Player1Range).text = Helper.GetLobbyPlayerDataSafe(1, 4); ((TMP_Text)Player1Stamina).text = Helper.GetLobbyPlayerDataSafe(1, 5); ((TMP_Text)Player1Tumble).text = Helper.GetLobbyPlayerDataSafe(1, 6); ((TMP_Text)Player1DeadHead).text = Helper.GetLobbyPlayerDataSafe(1, 11); ((TMP_Text)Player1StaminaRegen).text = Helper.GetLobbyPlayerDataSafe(1, 8); ((TMP_Text)Player1Wings).text = Helper.GetLobbyPlayerDataSafe(1, 9); if (Helper.GetLobbyPlayerDataSafeInt(1, 7) > 0) { Player1Map.SetActive(true); } ((TMP_Text)Player2Health).text = Helper.GetLobbyPlayerDataSafe(2, 0); ((TMP_Text)Player2Speed).text = Helper.GetLobbyPlayerDataSafe(2, 1); ((TMP_Text)Player2Strength).text = Helper.GetLobbyPlayerDataSafe(2, 2); ((TMP_Text)Player2Jump).text = Helper.GetLobbyPlayerDataSafe(2, 3); ((TMP_Text)Player2Range).text = Helper.GetLobbyPlayerDataSafe(2, 4); ((TMP_Text)Player2Stamina).text = Helper.GetLobbyPlayerDataSafe(2, 5); ((TMP_Text)Player2Tumble).text = Helper.GetLobbyPlayerDataSafe(2, 6); ((TMP_Text)Player2DeadHead).text = Helper.GetLobbyPlayerDataSafe(2, 11); ((TMP_Text)Player2StaminaRegen).text = Helper.GetLobbyPlayerDataSafe(2, 8); ((TMP_Text)Player2Wings).text = Helper.GetLobbyPlayerDataSafe(2, 9); if (Helper.GetLobbyPlayerDataSafeInt(2, 7) > 0) { Player2Map.SetActive(true); } ((TMP_Text)Player3Health).text = Helper.GetLobbyPlayerDataSafe(3, 0); ((TMP_Text)Player3Speed).text = Helper.GetLobbyPlayerDataSafe(3, 1); ((TMP_Text)Player3Strength).text = Helper.GetLobbyPlayerDataSafe(3, 2); ((TMP_Text)Player3Jump).text = Helper.GetLobbyPlayerDataSafe(3, 3); ((TMP_Text)Player3Range).text = Helper.GetLobbyPlayerDataSafe(3, 4); ((TMP_Text)Player3Stamina).text = Helper.GetLobbyPlayerDataSafe(3, 5); ((TMP_Text)Player3Tumble).text = Helper.GetLobbyPlayerDataSafe(3, 6); ((TMP_Text)Player3DeadHead).text = Helper.GetLobbyPlayerDataSafe(3, 11); ((TMP_Text)Player3StaminaRegen).text = Helper.GetLobbyPlayerDataSafe(3, 8); ((TMP_Text)Player3Wings).text = Helper.GetLobbyPlayerDataSafe(3, 9); if (Helper.GetLobbyPlayerDataSafeInt(3, 7) > 0) { Player3Map.SetActive(true); } ((TMP_Text)Player4Health).text = Helper.GetLobbyPlayerDataSafe(4, 0); ((TMP_Text)Player4Speed).text = Helper.GetLobbyPlayerDataSafe(4, 1); ((TMP_Text)Player4Strength).text = Helper.GetLobbyPlayerDataSafe(4, 2); ((TMP_Text)Player4Jump).text = Helper.GetLobbyPlayerDataSafe(4, 3); ((TMP_Text)Player4Range).text = Helper.GetLobbyPlayerDataSafe(4, 4); ((TMP_Text)Player4Stamina).text = Helper.GetLobbyPlayerDataSafe(4, 5); ((TMP_Text)Player4Tumble).text = Helper.GetLobbyPlayerDataSafe(4, 6); ((TMP_Text)Player4DeadHead).text = Helper.GetLobbyPlayerDataSafe(4, 11); ((TMP_Text)Player4StaminaRegen).text = Helper.GetLobbyPlayerDataSafe(4, 8); ((TMP_Text)Player4Wings).text = Helper.GetLobbyPlayerDataSafe(4, 9); if (Helper.GetLobbyPlayerDataSafeInt(4, 7) > 0) { Player4Map.SetActive(true); } ((TMP_Text)Player5Health).text = Helper.GetLobbyPlayerDataSafe(5, 0); ((TMP_Text)Player5Speed).text = Helper.GetLobbyPlayerDataSafe(5, 1); ((TMP_Text)Player5Strength).text = Helper.GetLobbyPlayerDataSafe(5, 2); ((TMP_Text)Player5Jump).text = Helper.GetLobbyPlayerDataSafe(5, 3); ((TMP_Text)Player5Range).text = Helper.GetLobbyPlayerDataSafe(5, 4); ((TMP_Text)Player5Stamina).text = Helper.GetLobbyPlayerDataSafe(5, 5); ((TMP_Text)Player5Tumble).text = Helper.GetLobbyPlayerDataSafe(5, 6); ((TMP_Text)Player5DeadHead).text = Helper.GetLobbyPlayerDataSafe(5, 11); ((TMP_Text)Player5StaminaRegen).text = Helper.GetLobbyPlayerDataSafe(5, 8); ((TMP_Text)Player5Wings).text = Helper.GetLobbyPlayerDataSafe(5, 9); if (Helper.GetLobbyPlayerDataSafeInt(5, 7) > 0) { Player5Map.SetActive(true); } } } [BepInProcess("REPO.exe")] [BepInPlugin("ExtensiveQoL-UnloadedHangar", "ExtensiveQoL", "1.5.0")] public class ExtensiveQoL : BaseUnityPlugin { public static class PluginInfo { public const string Guid = "ExtensiveQoL-UnloadedHangar"; public const string Name = "ExtensiveQoL"; public const string Ver = "1.5.0"; } internal static ManualLogSource logger; internal static ConfigManager ConfigManager; private Harmony _harmony; internal static ExtensiveQoL Instance { get; private set; } private void Awake() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown if ((Object)(object)Instance == (Object)null) { Instance = this; } logger = Logger.CreateLogSource("ExtensiveQoL-UnloadedHangar"); logger.LogInfo((object)"ExtensiveQoL-UnloadedHangar loaded"); ConfigManager = new ConfigManager(); Content.Load(); _harmony = new Harmony("ExtensiveQoL-UnloadedHangar"); _harmony.PatchAll(typeof(Patches)); } } public class Singleton<T> : MonoBehaviour where T : Component { private static T _instance; public static T Instance { get { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown if ((Object)(object)_instance == (Object)null) { T[] array = Object.FindObjectsOfType(typeof(T)) as T[]; if (array.Length != 0) { _instance = array[0]; } if (array.Length > 1) { ExtensiveQoL.logger.LogError((object)("There is more than one " + typeof(T).Name + " in the scene.")); } if ((Object)(object)_instance == (Object)null) { GameObject val = new GameObject(); ((Object)val).name = "_" + typeof(T).Name; _instance = val.AddComponent<T>(); } } return _instance; } } } public class SubHeaderComp : MonoBehaviour { } internal class Ui : MonoBehaviour { internal static Ui instance { get; private set; } private void Awake() { if ((Object)(object)instance == (Object)null) { instance = this; } } private void Start() { SpawnUi(); } internal void SpawnUi() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) Object.Instantiate<GameObject>(Content.AssetsList[1], new Vector3(ExtensiveQoL.ConfigManager.ListXPosition.Value, ExtensiveQoL.ConfigManager.ListYPosition.Value, 0f), Content.AssetsList[1].transform.rotation, ((Component)instance).gameObject.transform); } } } namespace ExtensiveQoL.Patch { [HarmonyPatch] internal class Patches : MonoBehaviour { [HarmonyPrefix] [HarmonyPatch(typeof(PlayerController), "Update")] private static void FlashlightPatch() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) if (!SemiFunc.IsMultiplayer()) { return; } if (Input.GetKeyDown(Helper.Instance.ConvertData(ExtensiveQoL.ConfigManager.UI_Key.Value.ToUpper()))) { if (ChatManager.instance.chatActive) { return; } Helper.IsListOpen = true; GameObject gameObject = ((Component)Singleton<Ui>.Instance).gameObject; ((Object)gameObject).name = "PlayerListUi"; gameObject.transform.parent = ((Component)((Component)GoalUI.instance).gameObject.transform.parent).transform; } else if (Input.GetKeyUp(Helper.Instance.ConvertData(ExtensiveQoL.ConfigManager.UI_Key.Value.ToUpper())) && Helper.IsListOpen) { try { Helper.IsListOpen = false; Object.Destroy((Object)(object)((Component)Ui.instance).gameObject); } catch (Exception arg) { ExtensiveQoL.logger.LogError((object)$"Something has gone wrong, game object was somehow destroyed too early... Exception: {arg}"); } } if (Input.GetKeyDown((KeyCode)305)) { Helper.IsEmergencyResetPrimed = true; } else if (Input.GetKeyUp((KeyCode)305)) { Helper.IsEmergencyResetPrimed = false; } if (!Input.GetKeyDown((KeyCode)8) || !Helper.IsEmergencyResetPrimed) { return; } try { Object.Destroy((Object)(object)((Component)Ui.instance).gameObject); ExtensiveQoL.logger.LogWarning((object)"Attempting to run emergency reset!"); } catch (Exception arg2) { ExtensiveQoL.logger.LogError((object)$"Emergency reset failed! No such object detected! Exception: {arg2}"); } } [HarmonyPrefix] [HarmonyPatch(typeof(GameDirector), "Start")] private static void ObjectSpawnPatch() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown GameObject val = new GameObject("ExtensiveQoL_Helper", new Type[1] { typeof(Helper) }); } } } namespace ExtensiveQoL.LogClass { [Obsolete] internal class Log { [Obsolete] internal static ManualLogSource logSource; [Obsolete] internal static void Initalize(ManualLogSource LogSource) { logSource = LogSource; } [Obsolete] internal static void LogDebug(object data) { logSource.LogDebug(data); } [Obsolete] internal static void LogError(object data) { logSource.LogError(data); } [Obsolete] internal static void LogFatal(object data) { logSource.LogFatal(data); } [Obsolete] internal static void LogInfo(object data) { logSource.LogInfo(data); } [Obsolete] internal static void LogMessage(object data) { logSource.LogMessage(data); } [Obsolete] internal static void LogWarning(object data) { logSource.LogWarning(data); } } } namespace ExtensiveQoL.EmptyClasses { internal class Header : MonoBehaviour { } internal class ImageHeader : MonoBehaviour { } internal class PlayerListBackground : MonoBehaviour { } internal class SubHeader : MonoBehaviour { } internal class Upgrades : MonoBehaviour { } }