Decompiled source of ExtensiveQoL v1.3.7

ExtensiveQoL.dll

Decompiled a month ago
using System;
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.Logging;
using ExtensiveQoL.NonPatch;
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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ExtensiveQoL")]
[assembly: AssemblyConfiguration("NoFlashlight")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+552f92f9356b00e45fbaddb12e89b0152d01cda7")]
[assembly: AssemblyProduct("ExtensiveQoL")]
[assembly: AssemblyTitle("ExtensiveQoL")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.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 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 PlayerListController : MonoBehaviour
	{
		internal static PlayerListController instance;

		[SerializeField]
		private TextMeshProUGUI NameTextPanel;

		[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;

		[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 Player0Map;

		[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 Player1Map;

		[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 Player2Map;

		[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 Player3Map;

		[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 Player4Map;

		[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 Player5Map;

		private void Awake()
		{
			if ((Object)(object)instance == (Object)null)
			{
				instance = this;
			}
		}

		private void Start()
		{
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			((TMP_Text)Player0).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player1).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player2).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player3).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player4).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player5).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)NameTextPanel).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)NameTextPanel).text = ((TMP_Text)NameTextPanel).text.Insert(((TMP_Text)NameTextPanel).text.Length, " 1.3.7");
			((TMP_Text)Player0).SetText(NonPatches.Instance.GetLobbyPlayerNameSafe(0), true);
			((TMP_Text)Player1).SetText(NonPatches.Instance.GetLobbyPlayerNameSafe(1), true);
			((TMP_Text)Player2).SetText(NonPatches.Instance.GetLobbyPlayerNameSafe(2), true);
			((TMP_Text)Player3).SetText(NonPatches.Instance.GetLobbyPlayerNameSafe(3), true);
			((TMP_Text)Player4).SetText(NonPatches.Instance.GetLobbyPlayerNameSafe(4), true);
			((TMP_Text)Player5).SetText(NonPatches.Instance.GetLobbyPlayerNameSafe(5), true);
			((Graphic)Player0).color = NonPatches.Instance.GetLobbyPlayerColorSafe(0);
			((Graphic)Player1).color = NonPatches.Instance.GetLobbyPlayerColorSafe(1);
			((Graphic)Player2).color = NonPatches.Instance.GetLobbyPlayerColorSafe(2);
			((Graphic)Player3).color = NonPatches.Instance.GetLobbyPlayerColorSafe(3);
			((Graphic)Player4).color = NonPatches.Instance.GetLobbyPlayerColorSafe(4);
			((Graphic)Player5).color = NonPatches.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).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player0Speed).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player0Strength).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player0Jump).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player0Range).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player0Stamina).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player0Tumble).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player0Map).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player1Health).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player1Speed).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player1Strength).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player1Jump).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player1Range).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player1Stamina).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player1Tumble).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player1Map).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player2Health).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player2Speed).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player2Strength).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player2Jump).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player2Range).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player2Stamina).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player2Tumble).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player2Map).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player3Health).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player3Speed).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player3Strength).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player3Jump).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player3Range).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player3Stamina).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player3Tumble).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player3Map).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player4Health).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player4Speed).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player4Strength).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player4Jump).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player4Range).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player4Stamina).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player4Tumble).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player4Map).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player5Health).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player5Speed).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player5Strength).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player5Jump).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player5Range).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player5Stamina).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player5Tumble).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player5Map).font = ((TMP_Text)GoalUI.instance.Text).font;
			((TMP_Text)Player0Health).text = NonPatches.GetLobbyPlayerDataSafe(0, 0);
			((TMP_Text)Player0Speed).text = NonPatches.GetLobbyPlayerDataSafe(0, 1);
			((TMP_Text)Player0Strength).text = NonPatches.GetLobbyPlayerDataSafe(0, 2);
			((TMP_Text)Player0Jump).text = NonPatches.GetLobbyPlayerDataSafe(0, 3);
			((TMP_Text)Player0Range).text = NonPatches.GetLobbyPlayerDataSafe(0, 4);
			((TMP_Text)Player0Stamina).text = NonPatches.GetLobbyPlayerDataSafe(0, 5);
			((TMP_Text)Player0Tumble).text = NonPatches.GetLobbyPlayerDataSafe(0, 6);
			((TMP_Text)Player0Map).text = NonPatches.GetLobbyPlayerDataSafe(0, 7);
			((TMP_Text)Player1Health).text = NonPatches.GetLobbyPlayerDataSafe(1, 0);
			((TMP_Text)Player1Speed).text = NonPatches.GetLobbyPlayerDataSafe(1, 1);
			((TMP_Text)Player1Strength).text = NonPatches.GetLobbyPlayerDataSafe(1, 2);
			((TMP_Text)Player1Jump).text = NonPatches.GetLobbyPlayerDataSafe(1, 3);
			((TMP_Text)Player1Range).text = NonPatches.GetLobbyPlayerDataSafe(1, 4);
			((TMP_Text)Player1Stamina).text = NonPatches.GetLobbyPlayerDataSafe(1, 5);
			((TMP_Text)Player1Tumble).text = NonPatches.GetLobbyPlayerDataSafe(1, 6);
			((TMP_Text)Player1Map).text = NonPatches.GetLobbyPlayerDataSafe(1, 7);
			((TMP_Text)Player2Health).text = NonPatches.GetLobbyPlayerDataSafe(2, 0);
			((TMP_Text)Player2Speed).text = NonPatches.GetLobbyPlayerDataSafe(2, 1);
			((TMP_Text)Player2Strength).text = NonPatches.GetLobbyPlayerDataSafe(2, 2);
			((TMP_Text)Player2Jump).text = NonPatches.GetLobbyPlayerDataSafe(2, 3);
			((TMP_Text)Player2Range).text = NonPatches.GetLobbyPlayerDataSafe(2, 4);
			((TMP_Text)Player2Stamina).text = NonPatches.GetLobbyPlayerDataSafe(2, 5);
			((TMP_Text)Player2Tumble).text = NonPatches.GetLobbyPlayerDataSafe(2, 6);
			((TMP_Text)Player2Map).text = NonPatches.GetLobbyPlayerDataSafe(2, 7);
			((TMP_Text)Player3Health).text = NonPatches.GetLobbyPlayerDataSafe(3, 0);
			((TMP_Text)Player3Speed).text = NonPatches.GetLobbyPlayerDataSafe(3, 1);
			((TMP_Text)Player3Strength).text = NonPatches.GetLobbyPlayerDataSafe(3, 2);
			((TMP_Text)Player3Jump).text = NonPatches.GetLobbyPlayerDataSafe(3, 3);
			((TMP_Text)Player3Range).text = NonPatches.GetLobbyPlayerDataSafe(3, 4);
			((TMP_Text)Player3Stamina).text = NonPatches.GetLobbyPlayerDataSafe(3, 5);
			((TMP_Text)Player3Tumble).text = NonPatches.GetLobbyPlayerDataSafe(3, 6);
			((TMP_Text)Player3Map).text = NonPatches.GetLobbyPlayerDataSafe(3, 7);
			((TMP_Text)Player4Health).text = NonPatches.GetLobbyPlayerDataSafe(4, 0);
			((TMP_Text)Player4Speed).text = NonPatches.GetLobbyPlayerDataSafe(4, 1);
			((TMP_Text)Player4Strength).text = NonPatches.GetLobbyPlayerDataSafe(4, 2);
			((TMP_Text)Player4Jump).text = NonPatches.GetLobbyPlayerDataSafe(4, 3);
			((TMP_Text)Player4Range).text = NonPatches.GetLobbyPlayerDataSafe(4, 4);
			((TMP_Text)Player4Stamina).text = NonPatches.GetLobbyPlayerDataSafe(4, 5);
			((TMP_Text)Player4Tumble).text = NonPatches.GetLobbyPlayerDataSafe(4, 6);
			((TMP_Text)Player4Map).text = NonPatches.GetLobbyPlayerDataSafe(4, 7);
			((TMP_Text)Player5Health).text = NonPatches.GetLobbyPlayerDataSafe(5, 0);
			((TMP_Text)Player5Speed).text = NonPatches.GetLobbyPlayerDataSafe(5, 1);
			((TMP_Text)Player5Strength).text = NonPatches.GetLobbyPlayerDataSafe(5, 2);
			((TMP_Text)Player5Jump).text = NonPatches.GetLobbyPlayerDataSafe(5, 3);
			((TMP_Text)Player5Range).text = NonPatches.GetLobbyPlayerDataSafe(5, 4);
			((TMP_Text)Player5Stamina).text = NonPatches.GetLobbyPlayerDataSafe(5, 5);
			((TMP_Text)Player5Tumble).text = NonPatches.GetLobbyPlayerDataSafe(5, 6);
			((TMP_Text)Player5Map).text = NonPatches.GetLobbyPlayerDataSafe(5, 7);
		}
	}
	[BepInPlugin("ExtensiveQoL-UnloadedHangar", "ExtensiveQoL", "1.3.7")]
	public class ExtensiveQoL : BaseUnityPlugin
	{
		public static class PluginInfo
		{
			public const string Guid = "ExtensiveQoL-UnloadedHangar";

			public const string Name = "ExtensiveQoL";

			public const string Ver = "1.3.7";
		}

		internal static ManualLogSource logger;

		private Harmony _harmony;

		internal static ExtensiveQoL Instance { get; private set; }

		private void Awake()
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			logger = Logger.CreateLogSource("ExtensiveQoL-UnloadedHangar");
			logger.LogInfo((object)"ExtensiveQoL-UnloadedHangar loaded");
			Content.Load();
			_harmony = new Harmony("ExtensiveQoL-UnloadedHangar");
			_harmony.PatchAll();
		}
	}
	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_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			Object.Instantiate<GameObject>(Content.AssetsList[1], Content.AssetsList[1].gameObject.transform.position, 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()
		{
			if (!SemiFunc.IsMultiplayer())
			{
				return;
			}
			if (Input.GetKeyDown((KeyCode)107))
			{
				if (ChatManager.instance.chatActive)
				{
					return;
				}
				NonPatches.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((KeyCode)107) && NonPatches.IsListOpen)
			{
				try
				{
					NonPatches.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))
			{
				NonPatches.IsEmergencyResetPrimed = true;
			}
			else if (Input.GetKeyUp((KeyCode)305))
			{
				NonPatches.IsEmergencyResetPrimed = false;
			}
			if (!Input.GetKeyDown((KeyCode)8) || !NonPatches.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_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			GameObject val = new GameObject("ExtensiveQoL_Handler");
			val.AddComponent<NonPatches>();
		}
	}
}
namespace ExtensiveQoL.NonPatch
{
	public class NonPatches : MonoBehaviour
	{
		internal static bool IsListOpen;

		internal static bool IsEmergencyResetPrimed;

		public static NonPatches 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 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(), 
					_ => "X", 
				};
			}
			return "0";
		}
	}
}
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
	{
	}
}