Decompiled source of ModpackDebugger v1.0.0

ModpackDebugger.dll

Decompiled 8 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HG;
using HarmonyLib;
using IL.RoR2.UI;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using On.RoR2.ContentManagement;
using On.RoR2.ExpansionManagement;
using On.RoR2.Skills;
using On.RoR2.UI;
using On.RoR2.UI.LogBook;
using R2API;
using RoR2;
using RoR2.ContentManagement;
using RoR2.ExpansionManagement;
using RoR2.Skills;
using RoR2.UI;
using RoR2.UI.LogBook;
using UnityEngine;
using UnityEngine.SceneManagement;

[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("ModpackDebugger")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ModpackDebugger")]
[assembly: AssemblyTitle("ModpackDebugger")]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace ModpackDebugger
{
	[BepInPlugin("000.prodzpod.ModpackDebugger", "ModpackDebugger", "1.0.0")]
	public class Main : BaseUnityPlugin
	{
		public class EnforcerGangFallBack
		{
			public static void Prefix(IContentPackProvider __instance)
			{
				//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
				PluginInfo val = ((IEnumerable<PluginInfo>)Chainloader.PluginInfos.Values).FirstOrDefault((Func<PluginInfo, bool>)((PluginInfo x) => ((object)x.Instance).GetType().Assembly == ((object)__instance).GetType().Assembly));
				if (val == null || ForbiddenGUIDs.Any(val.Metadata.GUID.Contains))
				{
					return;
				}
				packIdentifierToGUID[__instance.identifier] = val.Metadata.GUID;
				IEnumerable<FieldInfo> enumerable = from x in ((object)__instance).GetType().GetRuntimeFields()
					where typeof(ContentPack).IsAssignableFrom(x.FieldType)
					select x;
				foreach (FieldInfo item in enumerable)
				{
					((ContentPack)item.GetValue(__instance)).identifier = __instance.identifier;
				}
			}

			public static IEnumerable<MethodBase> TargetMethods()
			{
				List<MethodBase> list = new List<MethodBase>();
				Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
				foreach (Assembly assembly in assemblies)
				{
					IEnumerable<Type> source = from x in assembly.GetTypes()
						where ((MemberInfo)x).GetCustomAttributes<BepInPlugin>(inherit: true).ToArray().Length != 0
						select x;
					if (source.Any((Type x) => ((MemberInfo)x).GetCustomAttributes<BepInDependency>(inherit: true).Any((BepInDependency y) => y.DependencyGUID == "com.TeamMoonstorm.MSU")))
					{
						continue;
					}
					Type[] types = assembly.GetTypes();
					foreach (Type type in types)
					{
						try
						{
							if (!type.IsAbstract && !type.IsInterface && typeof(IContentPackProvider).IsAssignableFrom(type))
							{
								list.Add(type.GetMethod("GenerateContentPackAsync"));
							}
						}
						catch
						{
						}
					}
				}
				return list;
			}
		}

		public class MSUFallBack
		{
			public static void Postfix(BaseUnityPlugin __instance)
			{
				//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cc: Expected O, but got Unknown
				string gUID = ((MemberInfo)((object)__instance).GetType()).GetCustomAttribute<BepInPlugin>().GUID;
				Type[] array = (from t in ((object)__instance).GetType().Assembly.GetTypes()
					where !t.IsAbstract && !t.IsInterface && typeof(IContentPackProvider).IsAssignableFrom(t)
					select t).ToArray();
				Type[] array2 = array;
				foreach (Type type in array2)
				{
					IEnumerable<object> enumerable = from x in type.GetRuntimeProperties()
						where typeof(ContentPack).IsAssignableFrom(x.PropertyType)
						select x.GetValue(null);
					foreach (object item in enumerable)
					{
						ContentPack val = (ContentPack)item;
						val._identifier = gUID;
						packIdentifierToGUID[val.identifier] = gUID;
					}
				}
			}

			public static IEnumerable<MethodBase> TargetMethods()
			{
				List<MethodBase> list = new List<MethodBase>();
				Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
				foreach (Assembly assembly in assemblies)
				{
					IEnumerable<Type> source = from x in assembly.GetTypes()
						where ((MemberInfo)x).GetCustomAttributes<BepInPlugin>(inherit: true).ToArray().Length != 0
						select x;
					list.AddRange(from t in source
						where !t.IsAbstract && !t.IsInterface && ((MemberInfo)t).GetCustomAttributes<BepInDependency>(inherit: true).Any((BepInDependency attr) => attr.DependencyGUID == "com.TeamMoonstorm.MSU")
						select t into x
						select x.GetMethod("Awake"));
				}
				return list;
			}
		}

		[HarmonyPatch(typeof(Skins), "CreateNewSkinDef")]
		public class HookR2API
		{
			public static void Prefix(SkinDefInfo skin)
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				stuffDefToAssemblies[skin] = GetAssembliesFromStackTrace();
			}
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_ctor <>9__25_0;

			public static hook_ctor <>9__25_1;

			public static hook_ctor <>9__25_2;

			public static hook_ctor <>9__25_3;

			public static hook_ctor <>9__25_4;

			public static hook_ctor <>9__25_5;

			public static hook_CanSelectEquipmentEntry <>9__25_15;

			public static Action <>9__25_6;

			public static hook_GetPickupTooltipContent <>9__25_7;

			public static hook_GetMonsterTooltipContent <>9__25_8;

			public static hook_GetSurvivorTooltipContent <>9__25_9;

			public static hook_GetStageTooltipContent <>9__25_10;

			public static hook_GetAchievementTooltipContent <>9__25_11;

			public static hook_Start <>9__25_12;

			public static hook_RebuildHeaders <>9__25_13;

			public static Func<Instruction, bool> <>9__25_34;

			public static Func<Instruction, bool> <>9__25_35;

			public static Func<SkinDef, string> <>9__25_36;

			public static Manipulator <>9__25_14;

			public static Func<StackFrame, string> <>9__28_0;

			internal void <Awake>b__25_0(orig_ctor orig, ContentPack self)
			{
				orig.Invoke(self);
				contentPacks.Add(self);
			}

			internal void <Awake>b__25_1(orig_ctor orig, DifficultyDef self, float a, string b, string c, string d, Color e, string f, bool g)
			{
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self, a, b, c, d, e, f, g);
				stuffDefToAssemblies[self] = GetAssembliesFromStackTrace();
			}

			internal void <Awake>b__25_2(orig_ctor orig, SkillDef self)
			{
				orig.Invoke(self);
				stuffDefToAssemblies[self] = GetAssembliesFromStackTrace();
			}

			internal void <Awake>b__25_3(orig_ctor orig, ArtifactDef self)
			{
				orig.Invoke(self);
				stuffDefToAssemblies[self] = GetAssembliesFromStackTrace();
			}

			internal void <Awake>b__25_4(orig_ctor orig, SkinDef self)
			{
				orig.Invoke(self);
				stuffDefToAssemblies[self] = GetAssembliesFromStackTrace();
			}

			internal void <Awake>b__25_5(orig_ctor orig, ExpansionDef self)
			{
				orig.Invoke(self);
				stuffDefToAssemblies[self] = GetAssembliesFromStackTrace();
			}

			internal void <Awake>b__25_6()
			{
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0063: Unknown result type (might be due to invalid IL or missing references)
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0134: Unknown result type (might be due to invalid IL or missing references)
				//IL_0139: Unknown result type (might be due to invalid IL or missing references)
				//IL_013f: Expected O, but got Unknown
				if (Chainloader.PluginInfos.ContainsKey(""))
				{
					return;
				}
				EliteDef[] eliteDefs = EliteCatalog.eliteDefs;
				foreach (EliteDef val in eliteDefs)
				{
					if (!eliteEquips.ContainsKey(val.eliteEquipmentDef))
					{
						eliteEquips.Add(val.eliteEquipmentDef, val);
					}
				}
				Enumerator<ItemDef> enumerator = ItemCatalog.allItemDefs.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						<>c__DisplayClass25_0 CS$<>8__locals0 = new <>c__DisplayClass25_0
						{
							i = enumerator.Current
						};
						if (Object.op_Implicit((Object)(object)CS$<>8__locals0.i))
						{
							EquipmentDef val2 = ((IEnumerable<EquipmentDef>)eliteEquips.Keys).FirstOrDefault((Func<EquipmentDef, bool>)((EquipmentDef x) => (Object)(object)x.pickupModelPrefab == (Object)(object)CS$<>8__locals0.i.pickupModelPrefab));
							if (Object.op_Implicit((Object)(object)val2) && !eliteItems.ContainsKey(CS$<>8__locals0.i))
							{
								eliteItems.Add(CS$<>8__locals0.i, eliteEquips[val2]);
							}
						}
					}
				}
				finally
				{
					((IDisposable)enumerator).Dispose();
				}
				object obj = <>9__25_15;
				if (obj == null)
				{
					hook_CanSelectEquipmentEntry val3 = delegate(orig_CanSelectEquipmentEntry orig, EquipmentDef def, Dictionary<ExpansionDef, bool> a)
					{
						bool flag = orig.Invoke(def, a);
						return (Object.op_Implicit((Object)(object)def) && eliteEquips.ContainsKey(def)) || flag;
					};
					<>9__25_15 = val3;
					obj = (object)val3;
				}
				LogBookController.CanSelectEquipmentEntry += (hook_CanSelectEquipmentEntry)obj;
			}

			internal bool <Awake>b__25_15(orig_CanSelectEquipmentEntry orig, EquipmentDef def, Dictionary<ExpansionDef, bool> a)
			{
				bool result = orig.Invoke(def, a);
				if (Object.op_Implicit((Object)(object)def) && eliteEquips.ContainsKey(def))
				{
					return true;
				}
				return result;
			}

			internal TooltipContent <Awake>b__25_7(orig_GetPickupTooltipContent orig, ref Entry entry, UserProfile b, EntryStatus c)
			{
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_006a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Invalid comparison between Unknown and I4
				//IL_0175: Unknown result type (might be due to invalid IL or missing references)
				//IL_017b: Invalid comparison between Unknown and I4
				//IL_0085: 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_00c2: Unknown result type (might be due to invalid IL or missing references)
				//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
				//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
				//IL_057f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0585: Invalid comparison between Unknown and I4
				//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
				//IL_059f: Unknown result type (might be due to invalid IL or missing references)
				//IL_05a9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0446: Unknown result type (might be due to invalid IL or missing references)
				//IL_04bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_0616: Unknown result type (might be due to invalid IL or missing references)
				//IL_0691: Unknown result type (might be due to invalid IL or missing references)
				//IL_0692: Unknown result type (might be due to invalid IL or missing references)
				//IL_0696: Unknown result type (might be due to invalid IL or missing references)
				<>c__DisplayClass25_1 CS$<>8__locals0 = new <>c__DisplayClass25_1();
				TooltipContent val = orig.Invoke(ref entry, b, c);
				CS$<>8__locals0.pickup = PickupCatalog.GetPickupDef((PickupIndex)entry.extraData);
				if (!string.IsNullOrWhiteSpace(val.overrideBodyText))
				{
					val.overrideBodyText += "\n\n";
				}
				string text = "";
				string text2 = "";
				CS$<>8__locals0.elite = null;
				if ((int)CS$<>8__locals0.pickup.itemIndex != -1)
				{
					ItemDef itemDef = ItemCatalog.GetItemDef(CS$<>8__locals0.pickup.itemIndex);
					if (PrintID.Value)
					{
						text = text + "ItemDef Name: " + ((Object)itemDef).name + "\n";
						text += $"ItemIndex: {itemDef.itemIndex}\n";
					}
					if (PrintTokens.Value)
					{
						text = text + "ItemDef NameToken: " + itemDef.nameToken + "\n";
						text = text + "ItemDef PickupToken: " + itemDef.pickupToken + "\n";
						text = text + "ItemDef DescriptionToken: " + itemDef.descriptionToken + "\n";
						text = text + "ItemDef LoreToken: " + itemDef.loreToken + "\n";
					}
					if (eliteItems.ContainsKey(itemDef))
					{
						CS$<>8__locals0.elite = eliteItems[itemDef];
					}
				}
				if ((int)CS$<>8__locals0.pickup.equipmentIndex != -1)
				{
					EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(CS$<>8__locals0.pickup.equipmentIndex);
					if (PrintID.Value)
					{
						text = text + "EquipmentDef Name: " + ((Object)equipmentDef).name + "\n";
						text += $"EquipmentIndex: {equipmentDef.equipmentIndex}\n";
					}
					if (PrintTokens.Value)
					{
						text = text + "EquipmentDef NameToken: " + equipmentDef.nameToken + "\n";
						text = text + "EquipmentDef PickupToken: " + equipmentDef.pickupToken + "\n";
						text = text + "EquipmentDef DescriptionToken: " + equipmentDef.descriptionToken + "\n";
						text = text + "EquipmentDef LoreToken: " + equipmentDef.loreToken + "\n";
					}
					if (eliteEquips.ContainsKey(equipmentDef))
					{
						CS$<>8__locals0.elite = eliteEquips[equipmentDef];
					}
				}
				if (PrintID.Value)
				{
					text = text + "PickupDef Name: " + CS$<>8__locals0.pickup.internalName + "\n";
					text += $"PickupIndex: {CS$<>8__locals0.pickup.pickupIndex}\n";
				}
				if (PrintGraphics.Value)
				{
					string text3 = text;
					GameObject displayPrefab = CS$<>8__locals0.pickup.displayPrefab;
					text = text3 + "PickupDef Prefab Name: " + ((displayPrefab != null) ? ((Object)displayPrefab).name : null) + "\n";
					string text4 = text;
					Sprite iconSprite = CS$<>8__locals0.pickup.iconSprite;
					text = text4 + "PickupDef Icon Sprite Name: " + ((iconSprite != null) ? ((Object)iconSprite).name : null) + "\n";
					string text5 = text;
					Texture iconTexture = CS$<>8__locals0.pickup.iconTexture;
					text = text5 + "PickupDef Icon Texture Name: " + ((iconTexture != null) ? ((Object)iconTexture).name : null) + "\n";
				}
				if ((Object)(object)CS$<>8__locals0.elite != (Object)null)
				{
					BuffDef val2 = ((IEnumerable<BuffDef>)BuffCatalog.buffDefs).FirstOrDefault((Func<BuffDef, bool>)((BuffDef x) => (Object)(object)x.eliteDef == (Object)(object)CS$<>8__locals0.elite));
					if (PrintID.Value)
					{
						text = text + "EliteDef Name: " + ((Object)CS$<>8__locals0.elite).name + "\n";
						text += $"EliteIndex: {CS$<>8__locals0.elite.eliteIndex}\n";
					}
					if (PrintTokens.Value)
					{
						text = text + "EliteDef ModifierToken: " + CS$<>8__locals0.elite.modifierToken + " (" + Language.GetString(CS$<>8__locals0.elite.modifierToken) + ")\n";
					}
					if (PrintGraphics.Value)
					{
						text += $"EliteDef Color: {CS$<>8__locals0.elite.color}\n";
						text += $"EliteDef RampIndex: {CS$<>8__locals0.elite.shaderEliteRampIndex}\n";
					}
					if (Object.op_Implicit((Object)(object)val2))
					{
						if (PrintID.Value)
						{
							text = text + "BuffDef Name: " + ((Object)val2).name + "\n";
							text += $"BuffIndex: {val2.buffIndex}\n";
						}
						if (PrintGraphics.Value)
						{
							text = text + "BuffDef Icon: " + val2.iconPath + "\n";
							string text6 = text;
							Sprite iconSprite2 = val2.iconSprite;
							text = text6 + "BuffDef IconName: " + ((iconSprite2 != null) ? ((Object)iconSprite2).name : null) + "\n";
						}
					}
					int num = contentPacks.FindIndex((ContentPack x) => x.eliteDefs.Contains(CS$<>8__locals0.elite));
					if (num != -1)
					{
						text2 = text2 + GetModName(contentPacks[num].identifier) + "\nSource Mod (Equipment): ";
					}
				}
				if (PrintID.Value && (int)CS$<>8__locals0.pickup.itemIndex != -1)
				{
					text += $"ItemTierDef Name: {ItemTierCatalog.GetItemTierDef(ItemCatalog.GetItemDef(CS$<>8__locals0.pickup.itemIndex).tier)}\n";
				}
				if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)CS$<>8__locals0.pickup.unlockableDef))
				{
					text = text + "UnlockableDef Name: " + CS$<>8__locals0.pickup.unlockableDef.cachedName + "\n";
					text += $"UnlockableIndex: {CS$<>8__locals0.pickup.unlockableDef.index}\n";
				}
				int num2 = contentPacks.FindIndex(delegate(ContentPack x)
				{
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Invalid comparison between Unknown and I4
					//IL_003a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0040: Invalid comparison between Unknown and I4
					//IL_0022: Unknown result type (might be due to invalid IL or missing references)
					//IL_0055: Unknown result type (might be due to invalid IL or missing references)
					if ((int)CS$<>8__locals0.pickup.itemIndex != -1)
					{
						return x.itemDefs.Contains(ItemCatalog.GetItemDef(CS$<>8__locals0.pickup.itemIndex));
					}
					return (int)CS$<>8__locals0.pickup.equipmentIndex != -1 && x.equipmentDefs.Contains(EquipmentCatalog.GetEquipmentDef(CS$<>8__locals0.pickup.equipmentIndex));
				});
				if (num2 != -1)
				{
					text2 += GetModName(contentPacks[num2].identifier);
				}
				val.overrideBodyText += FormatInternal(text, text2, LogbookZoom.Value);
				return val;
			}

			internal TooltipContent <Awake>b__25_8(orig_GetMonsterTooltipContent orig, ref Entry entry, UserProfile b, EntryStatus c)
			{
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0024: Expected O, but got Unknown
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_009e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0138: Unknown result type (might be due to invalid IL or missing references)
				//IL_01de: Unknown result type (might be due to invalid IL or missing references)
				//IL_01df: Unknown result type (might be due to invalid IL or missing references)
				//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
				<>c__DisplayClass25_2 CS$<>8__locals0 = new <>c__DisplayClass25_2();
				TooltipContent val = orig.Invoke(ref entry, b, c);
				CS$<>8__locals0.body = (CharacterBody)entry.extraData;
				CharacterMaster master = CS$<>8__locals0.body.master;
				if (!string.IsNullOrWhiteSpace(val.overrideBodyText))
				{
					val.overrideBodyText += "\n\n";
				}
				string text = "";
				string sourcemod = "";
				if (PrintID.Value)
				{
					text = text + "CharacterBody Name: " + ((Object)CS$<>8__locals0.body).name + "\n";
					text += $"BodyIndex: {CS$<>8__locals0.body.bodyIndex}\n";
				}
				if (PrintTokens.Value)
				{
					text = text + "CharacterBody NameToken: " + CS$<>8__locals0.body.baseNameToken + "\n";
					text = text + "CharacterBody SubtitleToken: " + CS$<>8__locals0.body.subtitleNameToken + "\n";
				}
				if (PrintID.Value && Object.op_Implicit((Object)(object)master))
				{
					text = text + "CharacterMaster Name: " + ((Object)master).name + "\n";
					text += $"MasterIndex: {master.masterIndex}\n";
				}
				if (PrintGraphics.Value)
				{
					text = text + "CharacterBody Portrait Icon: " + ((Object)CS$<>8__locals0.body.portraitIcon).name + "\n";
				}
				int num = contentPacks.FindIndex((ContentPack x) => Object.op_Implicit((Object)(object)((Component)CS$<>8__locals0.body).gameObject) && x.bodyPrefabs.Contains(((Component)CS$<>8__locals0.body).gameObject));
				if (num != -1)
				{
					sourcemod = GetModName(contentPacks[num].identifier);
				}
				val.overrideBodyText += FormatInternal(text, sourcemod, LogbookZoom.Value);
				return val;
			}

			internal TooltipContent <Awake>b__25_9(orig_GetSurvivorTooltipContent orig, ref Entry entry, UserProfile b, EntryStatus c)
			{
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_0019: Unknown result type (might be due to invalid IL or missing references)
				//IL_001f: Expected O, but got Unknown
				//IL_002e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0042: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
				//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
				//IL_0252: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
				<>c__DisplayClass25_3 CS$<>8__locals0 = new <>c__DisplayClass25_3();
				TooltipContent val = orig.Invoke(ref entry, b, c);
				CharacterBody val2 = (CharacterBody)entry.extraData;
				CharacterMaster master = val2.master;
				CS$<>8__locals0.surv = SurvivorCatalog.FindSurvivorDefFromBody(((Component)(CharacterBody)entry.extraData).gameObject);
				if (!string.IsNullOrWhiteSpace(val.overrideBodyText))
				{
					val.overrideBodyText += "\n\n";
				}
				string text = "";
				string text2 = "";
				if (PrintID.Value)
				{
					text = text + "SurvivorDef Name: " + CS$<>8__locals0.surv.cachedName + "\n";
					text += $"SurvivorIndex: {CS$<>8__locals0.surv.survivorIndex}\n";
					text = text + "CharacterBody Name: " + ((Object)val2).name + "\n";
					text += $"BodyIndex: {val2.bodyIndex}\n";
				}
				if (PrintTokens.Value)
				{
					text = text + "CharacterBody NameToken: " + val2.baseNameToken + "\n";
					text = text + "CharacterBody SubtitleToken: " + val2.subtitleNameToken + "\n";
					text = text + "SurvivorDef DescriptionToken: " + CS$<>8__locals0.surv.descriptionToken + "\n";
					text = text + "SurvivorDef OutroToken: " + CS$<>8__locals0.surv.outroFlavorToken + "\n";
					text = text + "SurvivorDef OutroFailureToken: " + CS$<>8__locals0.surv.mainEndingEscapeFailureFlavorToken + "\n";
				}
				if (PrintID.Value && Object.op_Implicit((Object)(object)master))
				{
					text = text + "CharacterMaster Name: " + ((Object)master).name + "\n";
					text += $"MasterIndex: {master.masterIndex}\n";
				}
				if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)CS$<>8__locals0.surv.unlockableDef))
				{
					text = text + "UnlockableDef Name: " + CS$<>8__locals0.surv.unlockableDef.cachedName + "\n";
					text += $"UnlockableIndex: {CS$<>8__locals0.surv.unlockableDef.index}\n";
				}
				int num = contentPacks.FindIndex((ContentPack x) => x.survivorDefs.Contains(CS$<>8__locals0.surv));
				if (num != -1)
				{
					text2 += GetModName(contentPacks[num].identifier);
				}
				val.overrideBodyText += FormatInternal(text, text2, LogbookZoom.Value);
				return val;
			}

			internal TooltipContent <Awake>b__25_10(orig_GetStageTooltipContent orig, ref Entry entry, UserProfile b, EntryStatus c)
			{
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0024: Expected O, but got Unknown
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				//IL_0091: Unknown result type (might be due to invalid IL or missing references)
				//IL_0170: Unknown result type (might be due to invalid IL or missing references)
				//IL_0171: Unknown result type (might be due to invalid IL or missing references)
				//IL_0175: Unknown result type (might be due to invalid IL or missing references)
				<>c__DisplayClass25_4 CS$<>8__locals0 = new <>c__DisplayClass25_4();
				TooltipContent val = orig.Invoke(ref entry, b, c);
				CS$<>8__locals0.scene = (SceneDef)entry.extraData;
				if (!string.IsNullOrWhiteSpace(val.overrideBodyText))
				{
					val.overrideBodyText += "\n\n";
				}
				string text = "";
				string text2 = "";
				if (PrintID.Value)
				{
					text = text + "SceneDef Name: " + CS$<>8__locals0.scene.cachedName + "\n";
					text += $"SceneDefIndex: {CS$<>8__locals0.scene.sceneDefIndex}\n";
				}
				if (PrintTokens.Value)
				{
					text = text + "SceneDef NameToken: " + CS$<>8__locals0.scene.nameToken + "\n";
					text = text + "SceneDef SubtitleToken: " + CS$<>8__locals0.scene.subtitleToken + "\n";
					text = text + "SceneDef LoreToken: " + CS$<>8__locals0.scene.loreToken + "\n";
				}
				int num = contentPacks.FindIndex((ContentPack x) => x.sceneDefs.Contains(CS$<>8__locals0.scene));
				if (num != -1)
				{
					text2 += GetModName(contentPacks[num].identifier);
				}
				val.overrideBodyText += FormatInternal(text, text2, LogbookZoom.Value);
				return val;
			}

			internal TooltipContent <Awake>b__25_11(orig_GetAchievementTooltipContent orig, ref Entry entry, UserProfile b, EntryStatus c)
			{
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_0019: Unknown result type (might be due to invalid IL or missing references)
				//IL_001f: Expected O, but got Unknown
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0094: Unknown result type (might be due to invalid IL or missing references)
				//IL_017f: Unknown result type (might be due to invalid IL or missing references)
				//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
				//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
				//IL_0200: Unknown result type (might be due to invalid IL or missing references)
				<>c__DisplayClass25_5 CS$<>8__locals0 = new <>c__DisplayClass25_5();
				TooltipContent val = orig.Invoke(ref entry, b, c);
				AchievementDef val2 = (AchievementDef)entry.extraData;
				CS$<>8__locals0.unlockable = UnlockableCatalog.GetUnlockableDef(val2.unlockableRewardIdentifier);
				if (!string.IsNullOrWhiteSpace(val.overrideBodyText))
				{
					val.overrideBodyText += "\n\n";
				}
				string text = "";
				string text2 = "";
				if (PrintID.Value)
				{
					text = text + "AchievementDef Name: " + val2.identifier + "\n";
					text += $"AchievementIndex: {val2.index}\n";
				}
				if (PrintTokens.Value)
				{
					text = text + "AchievementDef NameToken: " + val2.nameToken + "\n";
					text = text + "AchievementDef DescriptionToken: " + val2.descriptionToken + "\n";
				}
				if (PrintGraphics.Value)
				{
					text = text + "AchievementDef Icon: " + val2.iconPath + "\n";
					string text3 = text;
					Sprite achievedIcon = val2.achievedIcon;
					text = text3 + "AchievementDef IconName: " + ((achievedIcon != null) ? ((Object)achievedIcon).name : null) + "\n";
				}
				if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)CS$<>8__locals0.unlockable))
				{
					text = text + "UnlockableDef Name: " + CS$<>8__locals0.unlockable.cachedName + "\n";
					text += $"UnlockableIndex: {CS$<>8__locals0.unlockable.index}\n";
				}
				int num = contentPacks.FindIndex((ContentPack x) => Object.op_Implicit((Object)(object)CS$<>8__locals0.unlockable) && x.unlockableDefs.Contains(CS$<>8__locals0.unlockable));
				if (num != -1)
				{
					text2 += GetModName(contentPacks[num].identifier);
				}
				val.overrideBodyText += FormatInternal(text, text2, LogbookZoom.Value);
				return val;
			}

			internal void <Awake>b__25_12(orig_Start orig, PreGameController self)
			{
				//IL_009d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0236: Unknown result type (might be due to invalid IL or missing references)
				//IL_023b: Unknown result type (might be due to invalid IL or missing references)
				//IL_023f: Unknown result type (might be due to invalid IL or missing references)
				//IL_057b: Unknown result type (might be due to invalid IL or missing references)
				//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
				//IL_0605: Unknown result type (might be due to invalid IL or missing references)
				//IL_0722: Unknown result type (might be due to invalid IL or missing references)
				//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
				//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
				//IL_09eb: Unknown result type (might be due to invalid IL or missing references)
				//IL_0843: Unknown result type (might be due to invalid IL or missing references)
				//IL_0ae2: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self);
				using (IEnumerator<DifficultyDef> enumerator = DifficultyAPI.difficultyDefinitions.Values.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						<>c__DisplayClass25_6 CS$<>8__locals2 = new <>c__DisplayClass25_6
						{
							diff = enumerator.Current
						};
						<>c__DisplayClass25_7 CS$<>8__locals5 = new <>c__DisplayClass25_7();
						string text = "";
						string text2 = "";
						string text3 = (string.IsNullOrWhiteSpace(Language.GetString(CS$<>8__locals2.diff.descriptionToken)) ? "" : "\n\n");
						if (PrintID.Value)
						{
							text += $"DifficultyIndex: {DifficultyAPI.difficultyDefinitions.First((KeyValuePair<DifficultyIndex, DifficultyDef> x) => x.Value == CS$<>8__locals2.diff).Key}\n";
						}
						if (PrintTokens.Value)
						{
							text = text + "DifficultyDef NameToken: " + CS$<>8__locals2.diff.nameToken + "\n";
							text = text + "DifficultyDef DescriptionToken: " + CS$<>8__locals2.diff.descriptionToken + "\n";
						}
						if (PrintID.Value)
						{
							text = text + "DifficultyDef ServerTag: " + CS$<>8__locals2.diff.serverTag + "\n";
						}
						if (PrintGraphics.Value)
						{
							text = text + "DifficultyDef Icon: " + CS$<>8__locals2.diff.iconPath + "\n";
							string text4 = text;
							Sprite iconSprite = CS$<>8__locals2.diff.iconSprite;
							text = text4 + "DifficultyDef IconName: " + ((iconSprite != null) ? ((Object)iconSprite).name : null) + "\n";
						}
						text2 = ((!TryGetGUID(CS$<>8__locals2.diff, out var guid)) ? "Vanilla" : GetModName(guid));
						CS$<>8__locals5.temp = text3 + FormatInternal(text, text2, LobbyZoom.Value);
						DescTokenToExtraData[CS$<>8__locals2.diff.descriptionToken] = (string orig) => orig + CS$<>8__locals5.temp;
					}
				}
				foreach (SkillFamily allSkillFamily in SkillCatalog.allSkillFamilies)
				{
					for (int i = 0; i < allSkillFamily.variants.Length; i++)
					{
						<>c__DisplayClass25_8 CS$<>8__locals0 = new <>c__DisplayClass25_8();
						Variant val = allSkillFamily.variants[i];
						CS$<>8__locals0.skill = val.skillDef;
						string text = "";
						string text2 = "";
						string text3 = (string.IsNullOrWhiteSpace(Language.GetString(CS$<>8__locals0.skill.skillDescriptionToken)) ? "" : "\n\n");
						if (PrintID.Value)
						{
							text = text + "SkillFamily Name: " + allSkillFamily.name + "\n";
							text += $"SkillFamily CatalogIndex: {allSkillFamily.catalogIndex}\n";
							text += $"Variant Number: {i}\n";
						}
						if (PrintTokens.Value)
						{
							text = text + "SkillDef NameToken: " + CS$<>8__locals0.skill.skillNameToken + "\n";
							text = text + "SkillDef DescriptionToken: " + CS$<>8__locals0.skill.skillDescriptionToken + "\n";
							if (CS$<>8__locals0.skill.keywordTokens != null)
							{
								text = text + "SkillDef KeywordTokens: " + string.Join(", ", CS$<>8__locals0.skill.keywordTokens) + "\n";
							}
						}
						if (PrintGraphics.Value)
						{
							string text5 = text;
							Sprite icon = CS$<>8__locals0.skill.icon;
							text = text5 + "SkillDef IconName: " + ((icon != null) ? ((Object)icon).name : null) + "\n";
						}
						if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)val.unlockableDef))
						{
							text = text + "UnlockableDef Name: " + val.unlockableDef.cachedName + "\n";
							text += $"UnlockableIndex: {val.unlockableDef.index}\n";
						}
						if (TryGetGUID(CS$<>8__locals0.skill, out var guid2))
						{
							text2 = GetModName(guid2);
						}
						else
						{
							int num = contentPacks.FindIndex((ContentPack x) => Object.op_Implicit((Object)(object)CS$<>8__locals0.skill) && x.skillDefs.Contains(CS$<>8__locals0.skill));
							if (num != -1)
							{
								if (contentPacks[num].identifier == "RoR2.Junk" && DescTokenToExtraData.ContainsKey(CS$<>8__locals0.skill.skillDescriptionToken))
								{
									continue;
								}
								text2 = GetModName(contentPacks[num].identifier);
							}
						}
						CS$<>8__locals0.temp = text3 + FormatInternal(text, text2, LobbyZoom.Value);
						DescTokenToExtraData[CS$<>8__locals0.skill.skillDescriptionToken] = delegate(string orig)
						{
							LoadoutPanelController obj = Object.FindObjectOfType<LoadoutPanelController>();
							bool? obj2;
							if (obj == null)
							{
								obj2 = null;
							}
							else
							{
								GameObject gameObject = ((Component)obj).gameObject;
								obj2 = ((gameObject != null) ? new bool?(gameObject.activeSelf) : null);
							}
							bool? flag = obj2;
							return orig + (flag.GetValueOrDefault() ? CS$<>8__locals0.temp : "");
						};
					}
				}
				SkinDef[] allSkinDefs = SkinCatalog.allSkinDefs;
				foreach (SkinDef val2 in allSkinDefs)
				{
					<>c__DisplayClass25_9 CS$<>8__locals1 = new <>c__DisplayClass25_9();
					string text = "";
					string text2 = "";
					string text3 = "";
					if (PrintID.Value)
					{
						text = text + "SkinDef Name: " + ((Object)val2).name + "\n";
						text += $"SkinIndex: {val2.skinIndex}\n";
					}
					if (PrintTokens.Value)
					{
						text = text + "SkinDef NameToken: " + val2.nameToken + "\n";
					}
					if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)val2.unlockableDef))
					{
						text = text + "UnlockableDef Name: " + val2.unlockableDef.cachedName + "\n";
						text += $"UnlockableIndex: {val2.unlockableDef.index}\n";
					}
					if (TryGetGUID(val2, out var guid3))
					{
						text2 = GetModName(guid3);
					}
					CS$<>8__locals1.temp = text3 + FormatInternal(text, text2, LobbyZoom.Value);
					DescTokenToExtraData[val2.nameToken + "_DESC"] = (string _) => CS$<>8__locals1.temp;
				}
				ArtifactDef[] artifactDefs = ArtifactCatalog.artifactDefs;
				for (int k = 0; k < artifactDefs.Length; k++)
				{
					<>c__DisplayClass25_10 CS$<>8__locals3 = new <>c__DisplayClass25_10
					{
						artifact = artifactDefs[k]
					};
					<>c__DisplayClass25_11 CS$<>8__locals4 = new <>c__DisplayClass25_11();
					string text = "";
					string text2 = "";
					string text3 = (string.IsNullOrWhiteSpace(Language.GetString(CS$<>8__locals3.artifact.descriptionToken)) ? "" : "\n\n");
					if (PrintID.Value)
					{
						text = text + "ArtifactDef Name: " + CS$<>8__locals3.artifact.cachedName + "\n";
						text += $"ArtifactIndex: {CS$<>8__locals3.artifact.artifactIndex}\n";
					}
					if (PrintTokens.Value)
					{
						text = text + "ArtifactDef NameToken: " + CS$<>8__locals3.artifact.nameToken + "\n";
						text = text + "ArtifactDef DescriptionToken: " + CS$<>8__locals3.artifact.descriptionToken + "\n";
					}
					if (PrintGraphics.Value)
					{
						string text6 = text;
						GameObject pickupModelPrefab = CS$<>8__locals3.artifact.pickupModelPrefab;
						text = text6 + "ArtifactDef Pickup Name: " + ((pickupModelPrefab != null) ? ((Object)pickupModelPrefab).name : null) + "\n";
						string text7 = text;
						Sprite smallIconSelectedSprite = CS$<>8__locals3.artifact.smallIconSelectedSprite;
						text = text7 + "ArtifactDef IconName: " + ((smallIconSelectedSprite != null) ? ((Object)smallIconSelectedSprite).name : null) + "\n";
					}
					if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)CS$<>8__locals3.artifact.unlockableDef))
					{
						text = text + "UnlockableDef Name: " + CS$<>8__locals3.artifact.unlockableDef.cachedName + "\n";
						text += $"UnlockableIndex: {CS$<>8__locals3.artifact.unlockableDef.index}\n";
					}
					if (TryGetGUID(CS$<>8__locals3.artifact, out var guid4))
					{
						text2 = GetModName(guid4);
					}
					else
					{
						int num2 = contentPacks.FindIndex((ContentPack x) => Object.op_Implicit((Object)(object)CS$<>8__locals3.artifact) && x.artifactDefs.Contains(CS$<>8__locals3.artifact));
						if (num2 != -1)
						{
							if (contentPacks[num2].identifier == "RoR2.Junk" && DescTokenToExtraData.ContainsKey(CS$<>8__locals3.artifact.descriptionToken))
							{
								continue;
							}
							text2 += GetModName(contentPacks[num2].identifier);
						}
					}
					CS$<>8__locals4.temp = text3 + FormatInternal(text, text2, LobbyZoom.Value);
					DescTokenToExtraData[CS$<>8__locals3.artifact.descriptionToken] = (string orig) => orig + CS$<>8__locals4.temp;
				}
				ExpansionDef[] expansionDefs = ContentManager.expansionDefs;
				for (int l = 0; l < expansionDefs.Length; l++)
				{
					<>c__DisplayClass25_12 CS$<>8__locals6 = new <>c__DisplayClass25_12
					{
						exp = expansionDefs[l]
					};
					<>c__DisplayClass25_13 CS$<>8__locals7 = new <>c__DisplayClass25_13();
					string text = "";
					string text2 = "";
					string text3 = (string.IsNullOrWhiteSpace(Language.GetString(CS$<>8__locals6.exp.descriptionToken)) ? "" : "\n\n");
					if (PrintID.Value)
					{
						text = text + "ExpansionDef Name: " + ((Object)CS$<>8__locals6.exp).name + "\n";
						text += $"ExpansionIndex: {CS$<>8__locals6.exp.expansionIndex}\n";
					}
					if (PrintTokens.Value)
					{
						text = text + "ExpansionDef NameToken: " + CS$<>8__locals6.exp.nameToken + "\n";
						text = text + "ExpansionDef DescriptionToken: " + CS$<>8__locals6.exp.descriptionToken + "\n";
					}
					if (PrintGraphics.Value)
					{
						string text8 = text;
						Sprite iconSprite2 = CS$<>8__locals6.exp.iconSprite;
						text = text8 + "ExpansionDef IconName: " + ((iconSprite2 != null) ? ((Object)iconSprite2).name : null) + "\n";
					}
					if (PrintUnlocks.Value && (Object)(object)CS$<>8__locals6.exp.requiredEntitlement != (Object)null)
					{
						text = text + "ExpansionDef Required EntitlementDef Name: " + ((Object)CS$<>8__locals6.exp.requiredEntitlement).name + "\n";
						text += $"ExpansionDef Required EntitlementIndex: {CS$<>8__locals6.exp.requiredEntitlement.entitlementIndex}\n";
						text = text + "ExpansionDef Required EntitlementDef NameToken: " + CS$<>8__locals6.exp.requiredEntitlement.nameToken + "\n";
					}
					if (TryGetGUID(CS$<>8__locals6.exp, out var guid5))
					{
						text2 = GetModName(guid5);
					}
					else
					{
						int num3 = contentPacks.FindIndex((ContentPack x) => Object.op_Implicit((Object)(object)CS$<>8__locals6.exp) && x.expansionDefs.Contains(CS$<>8__locals6.exp));
						if (num3 != -1)
						{
							if (contentPacks[num3].identifier == "RoR2.Junk" && DescTokenToExtraData.ContainsKey(CS$<>8__locals6.exp.descriptionToken))
							{
								continue;
							}
							text2 = GetModName(contentPacks[num3].identifier);
						}
					}
					CS$<>8__locals7.temp = text3 + FormatInternal(text, text2, LobbyZoom.Value);
					DescTokenToExtraData[CS$<>8__locals6.exp.descriptionToken] = (string orig) => orig + CS$<>8__locals7.temp;
				}
				DescTokenToExtraData.Remove("");
			}

			internal void <Awake>b__25_13(orig_RebuildHeaders orig, HGHeaderNavigationController self)
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self);
				Scene activeScene = SceneManager.GetActiveScene();
				if (!(((Scene)(ref activeScene)).name != "lobby"))
				{
					Object.FindObjectOfType<CharacterSelectController>().RebuildLocal(false);
				}
			}

			internal void <Awake>b__25_14(ILContext il)
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Expected O, but got Unknown
				//IL_0077: Unknown result type (might be due to invalid IL or missing references)
				//IL_0083: Unknown result type (might be due to invalid IL or missing references)
				<>c__DisplayClass25_14 CS$<>8__locals0 = new <>c__DisplayClass25_14();
				ILCursor val = new ILCursor(il);
				CS$<>8__locals0.skin = -1;
				val.GotoNext((MoveType)2, new Func<Instruction, bool>[3]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref CS$<>8__locals0.skin),
					(Instruction x) => ILPatternMatchingExt.MatchLdfld<SkinDef>(x, "nameToken"),
					(Instruction x) => ILPatternMatchingExt.MatchLdsfld<string>(x, "Empty")
				});
				val.Emit(OpCodes.Pop);
				val.Emit(OpCodes.Ldloc, CS$<>8__locals0.skin);
				val.EmitDelegate<Func<SkinDef, string>>((Func<SkinDef, string>)((SkinDef def) => def.nameToken + "_DESC"));
			}

			internal bool <Awake>b__25_34(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<SkinDef>(x, "nameToken");
			}

			internal bool <Awake>b__25_35(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld<string>(x, "Empty");
			}

			internal string <Awake>b__25_36(SkinDef def)
			{
				return def.nameToken + "_DESC";
			}

			internal string <GetAssembliesFromStackTrace>b__28_0(StackFrame frame)
			{
				return frame.GetMethod().DeclaringType.Assembly.FullName;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_0
		{
			public ItemDef i;

			internal bool <Awake>b__16(EquipmentDef x)
			{
				return (Object)(object)x.pickupModelPrefab == (Object)(object)i.pickupModelPrefab;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_1
		{
			public EliteDef elite;

			public PickupDef pickup;

			internal bool <Awake>b__18(BuffDef x)
			{
				return (Object)(object)x.eliteDef == (Object)(object)elite;
			}

			internal bool <Awake>b__19(ContentPack x)
			{
				return x.eliteDefs.Contains(elite);
			}

			internal bool <Awake>b__17(ContentPack x)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Invalid comparison between Unknown and I4
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0040: Invalid comparison between Unknown and I4
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				if ((int)pickup.itemIndex != -1)
				{
					return x.itemDefs.Contains(ItemCatalog.GetItemDef(pickup.itemIndex));
				}
				if ((int)pickup.equipmentIndex != -1)
				{
					return x.equipmentDefs.Contains(EquipmentCatalog.GetEquipmentDef(pickup.equipmentIndex));
				}
				return false;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_10
		{
			public ArtifactDef artifact;

			internal bool <Awake>b__30(ContentPack x)
			{
				return Object.op_Implicit((Object)(object)artifact) && x.artifactDefs.Contains(artifact);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_11
		{
			public string temp;

			internal string <Awake>b__29(string orig)
			{
				return orig + temp;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_12
		{
			public ExpansionDef exp;

			internal bool <Awake>b__32(ContentPack x)
			{
				return Object.op_Implicit((Object)(object)exp) && x.expansionDefs.Contains(exp);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_13
		{
			public string temp;

			internal string <Awake>b__31(string orig)
			{
				return orig + temp;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_14
		{
			public int skin;

			internal bool <Awake>b__33(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdloc(x, ref skin);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_2
		{
			public CharacterBody body;

			internal bool <Awake>b__20(ContentPack x)
			{
				return Object.op_Implicit((Object)(object)((Component)body).gameObject) && x.bodyPrefabs.Contains(((Component)body).gameObject);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_3
		{
			public SurvivorDef surv;

			internal bool <Awake>b__21(ContentPack x)
			{
				return x.survivorDefs.Contains(surv);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_4
		{
			public SceneDef scene;

			internal bool <Awake>b__22(ContentPack x)
			{
				return x.sceneDefs.Contains(scene);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_5
		{
			public UnlockableDef unlockable;

			internal bool <Awake>b__23(ContentPack x)
			{
				return Object.op_Implicit((Object)(object)unlockable) && x.unlockableDefs.Contains(unlockable);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_6
		{
			public DifficultyDef diff;

			internal bool <Awake>b__24(KeyValuePair<DifficultyIndex, DifficultyDef> x)
			{
				return x.Value == diff;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_7
		{
			public string temp;

			internal string <Awake>b__25(string orig)
			{
				return orig + temp;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_8
		{
			public SkillDef skill;

			public string temp;

			internal bool <Awake>b__27(ContentPack x)
			{
				return Object.op_Implicit((Object)(object)skill) && x.skillDefs.Contains(skill);
			}

			internal string <Awake>b__26(string orig)
			{
				LoadoutPanelController obj = Object.FindObjectOfType<LoadoutPanelController>();
				bool? obj2;
				if (obj == null)
				{
					obj2 = null;
				}
				else
				{
					GameObject gameObject = ((Component)obj).gameObject;
					obj2 = ((gameObject != null) ? new bool?(gameObject.activeSelf) : null);
				}
				bool? flag = obj2;
				return orig + (flag.GetValueOrDefault() ? temp : "");
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass25_9
		{
			public string temp;

			internal string <Awake>b__28(string _)
			{
				return temp;
			}
		}

		public const string PluginGUID = "000.prodzpod.ModpackDebugger";

		public const string PluginAuthor = "000.prodzpod";

		public const string PluginName = "ModpackDebugger";

		public const string PluginVersion = "1.0.0";

		public static ManualLogSource Log;

		public static PluginInfo pluginInfo;

		public static Harmony Harmony;

		public static ConfigFile Config;

		public static List<ContentPack> contentPacks = new List<ContentPack>();

		public static Dictionary<string, string> packIdentifierToGUID = new Dictionary<string, string>();

		public static Dictionary<object, string[]> stuffDefToAssemblies = new Dictionary<object, string[]>();

		public static Dictionary<string, Func<string, string>> DescTokenToExtraData = new Dictionary<string, Func<string, string>>();

		public static ConfigEntry<bool> PrintID;

		public static ConfigEntry<bool> PrintTokens;

		public static ConfigEntry<bool> PrintGraphics;

		public static ConfigEntry<bool> PrintUnlocks;

		public static ConfigEntry<bool> PrintSourceMod;

		public static ConfigEntry<bool> DebugMode;

		public static ConfigEntry<float> LogbookZoom;

		public static ConfigEntry<float> LobbyZoom;

		public static ConfigEntry<bool> EnableLobbyTooltips;

		public static ConfigEntry<bool> ShowEliteAspects;

		public static Dictionary<EquipmentDef, EliteDef> eliteEquips = new Dictionary<EquipmentDef, EliteDef>();

		public static Dictionary<ItemDef, EliteDef> eliteItems = new Dictionary<ItemDef, EliteDef>();

		public const string MSU_GUID = "com.TeamMoonstorm.MSU";

		public static List<string> ForbiddenGUIDs = new List<string>(5) { "ModpackDebugger", "r2api", "mysticsrisky2utils", "MSU", "TILER2" };

		public void Awake()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Expected O, but got Unknown
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Expected O, but got Unknown
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Expected O, but got Unknown
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Expected O, but got Unknown
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Expected O, but got Unknown
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Expected O, but got Unknown
			//IL_0295: Unknown result type (might be due to invalid IL or missing references)
			//IL_029a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Expected O, but got Unknown
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			//IL_031b: Expected O, but got Unknown
			//IL_0335: Unknown result type (might be due to invalid IL or missing references)
			//IL_033a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0340: Expected O, but got Unknown
			//IL_035a: Unknown result type (might be due to invalid IL or missing references)
			//IL_035f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0365: Expected O, but got Unknown
			//IL_037f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0384: Unknown result type (might be due to invalid IL or missing references)
			//IL_038a: Expected O, but got Unknown
			//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03af: Expected O, but got Unknown
			//IL_03d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e2: Expected O, but got Unknown
			//IL_040a: Unknown result type (might be due to invalid IL or missing references)
			//IL_040f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0415: Expected O, but got Unknown
			//IL_043d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0442: Unknown result type (might be due to invalid IL or missing references)
			//IL_0448: Expected O, but got Unknown
			pluginInfo = ((BaseUnityPlugin)this).Info;
			Log = ((BaseUnityPlugin)this).Logger;
			Harmony = new Harmony("000.prodzpod.ModpackDebugger");
			Config = new ConfigFile(Path.Combine(Paths.ConfigPath, "000.prodzpod.ModpackDebugger.cfg"), true);
			PrintID = Config.Bind<bool>("General", "Print ID", true, "Prints internal IDs and indices.");
			PrintTokens = Config.Bind<bool>("General", "Print Tokens", true, "Prints language token IDs.");
			PrintGraphics = Config.Bind<bool>("General", "Print Graphics", true, "Prints model and sprite names and paths.");
			PrintUnlocks = Config.Bind<bool>("General", "Print Unlocks", true, "Prints unlockable IDs.");
			PrintSourceMod = Config.Bind<bool>("General", "Print Source Mod", true, "Prints source mod for the content.");
			LogbookZoom = Config.Bind<float>("General", "Logbook Zoom", 50f, "in % compared to normal text");
			LobbyZoom = Config.Bind<float>("General", "Lobby Zoom", 75f, "in % compared to normal text");
			EnableLobbyTooltips = Config.Bind<bool>("General", "Enable Lobby Tooltips", true, "disable if switching character lags too much");
			ShowEliteAspects = Config.Bind<bool>("General", "Show Elite Aspects on Logbook", true, "overridden if zetaspects is installed");
			packIdentifierToGUID.Add("RoR2.BaseContent", "Vanilla (No DLC)");
			packIdentifierToGUID.Add("RoR2.Junk", "Vanilla (Unused)");
			packIdentifierToGUID.Add("RoR2.DLC1", "Vanilla (SotV)");
			packIdentifierToGUID.Add("RoR2.DLC2", "Vanilla (SotS)");
			object obj = <>c.<>9__25_0;
			if (obj == null)
			{
				hook_ctor val = delegate(orig_ctor orig, ContentPack self)
				{
					orig.Invoke(self);
					contentPacks.Add(self);
				};
				<>c.<>9__25_0 = val;
				obj = (object)val;
			}
			ContentPack.ctor += (hook_ctor)obj;
			Harmony.PatchAll(typeof(EnforcerGangFallBack));
			object obj2 = <>c.<>9__25_1;
			if (obj2 == null)
			{
				hook_ctor val2 = delegate(orig_ctor orig, DifficultyDef self, float a, string b, string c, string d, Color e, string f, bool g)
				{
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					orig.Invoke(self, a, b, c, d, e, f, g);
					stuffDefToAssemblies[self] = GetAssembliesFromStackTrace();
				};
				<>c.<>9__25_1 = val2;
				obj2 = (object)val2;
			}
			DifficultyDef.ctor += (hook_ctor)obj2;
			object obj3 = <>c.<>9__25_2;
			if (obj3 == null)
			{
				hook_ctor val3 = delegate(orig_ctor orig, SkillDef self)
				{
					orig.Invoke(self);
					stuffDefToAssemblies[self] = GetAssembliesFromStackTrace();
				};
				<>c.<>9__25_2 = val3;
				obj3 = (object)val3;
			}
			SkillDef.ctor += (hook_ctor)obj3;
			object obj4 = <>c.<>9__25_3;
			if (obj4 == null)
			{
				hook_ctor val4 = delegate(orig_ctor orig, ArtifactDef self)
				{
					orig.Invoke(self);
					stuffDefToAssemblies[self] = GetAssembliesFromStackTrace();
				};
				<>c.<>9__25_3 = val4;
				obj4 = (object)val4;
			}
			ArtifactDef.ctor += (hook_ctor)obj4;
			object obj5 = <>c.<>9__25_4;
			if (obj5 == null)
			{
				hook_ctor val5 = delegate(orig_ctor orig, SkinDef self)
				{
					orig.Invoke(self);
					stuffDefToAssemblies[self] = GetAssembliesFromStackTrace();
				};
				<>c.<>9__25_4 = val5;
				obj5 = (object)val5;
			}
			SkinDef.ctor += (hook_ctor)obj5;
			object obj6 = <>c.<>9__25_5;
			if (obj6 == null)
			{
				hook_ctor val6 = delegate(orig_ctor orig, ExpansionDef self)
				{
					orig.Invoke(self);
					stuffDefToAssemblies[self] = GetAssembliesFromStackTrace();
				};
				<>c.<>9__25_5 = val6;
				obj6 = (object)val6;
			}
			ExpansionDef.ctor += (hook_ctor)obj6;
			Harmony.PatchAll(typeof(HookR2API));
			if (ShowEliteAspects.Value)
			{
				RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, (Action)delegate
				{
					//IL_005e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0063: Unknown result type (might be due to invalid IL or missing references)
					//IL_0067: Unknown result type (might be due to invalid IL or missing references)
					//IL_006c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0134: Unknown result type (might be due to invalid IL or missing references)
					//IL_0139: Unknown result type (might be due to invalid IL or missing references)
					//IL_013f: Expected O, but got Unknown
					if (!Chainloader.PluginInfos.ContainsKey(""))
					{
						EliteDef[] eliteDefs = EliteCatalog.eliteDefs;
						foreach (EliteDef val26 in eliteDefs)
						{
							if (!eliteEquips.ContainsKey(val26.eliteEquipmentDef))
							{
								eliteEquips.Add(val26.eliteEquipmentDef, val26);
							}
						}
						Enumerator<ItemDef> enumerator3 = ItemCatalog.allItemDefs.GetEnumerator();
						try
						{
							while (enumerator3.MoveNext())
							{
								ItemDef m = enumerator3.Current;
								if (Object.op_Implicit((Object)(object)m))
								{
									EquipmentDef val27 = ((IEnumerable<EquipmentDef>)eliteEquips.Keys).FirstOrDefault((Func<EquipmentDef, bool>)((EquipmentDef x) => (Object)(object)x.pickupModelPrefab == (Object)(object)m.pickupModelPrefab));
									if (Object.op_Implicit((Object)(object)val27) && !eliteItems.ContainsKey(m))
									{
										eliteItems.Add(m, eliteEquips[val27]);
									}
								}
							}
						}
						finally
						{
							((IDisposable)enumerator3).Dispose();
						}
						object obj17 = <>c.<>9__25_15;
						if (obj17 == null)
						{
							hook_CanSelectEquipmentEntry val28 = delegate(orig_CanSelectEquipmentEntry orig, EquipmentDef def, Dictionary<ExpansionDef, bool> a)
							{
								bool flag2 = orig.Invoke(def, a);
								return (Object.op_Implicit((Object)(object)def) && eliteEquips.ContainsKey(def)) || flag2;
							};
							<>c.<>9__25_15 = val28;
							obj17 = (object)val28;
						}
						LogBookController.CanSelectEquipmentEntry += (hook_CanSelectEquipmentEntry)obj17;
					}
				});
			}
			object obj7 = <>c.<>9__25_7;
			if (obj7 == null)
			{
				hook_GetPickupTooltipContent val7 = delegate(orig_GetPickupTooltipContent orig, ref Entry entry, UserProfile b, EntryStatus c)
				{
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					//IL_000c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_001a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0029: Unknown result type (might be due to invalid IL or missing references)
					//IL_006a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0070: Invalid comparison between Unknown and I4
					//IL_0175: Unknown result type (might be due to invalid IL or missing references)
					//IL_017b: Invalid comparison between Unknown and I4
					//IL_0085: 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_00c2: Unknown result type (might be due to invalid IL or missing references)
					//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
					//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
					//IL_057f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0585: Invalid comparison between Unknown and I4
					//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
					//IL_059f: Unknown result type (might be due to invalid IL or missing references)
					//IL_05a9: Unknown result type (might be due to invalid IL or missing references)
					//IL_0446: Unknown result type (might be due to invalid IL or missing references)
					//IL_04bf: Unknown result type (might be due to invalid IL or missing references)
					//IL_0616: Unknown result type (might be due to invalid IL or missing references)
					//IL_0691: Unknown result type (might be due to invalid IL or missing references)
					//IL_0692: Unknown result type (might be due to invalid IL or missing references)
					//IL_0696: Unknown result type (might be due to invalid IL or missing references)
					TooltipContent val24 = orig.Invoke(ref entry, b, c);
					PickupDef pickup = PickupCatalog.GetPickupDef((PickupIndex)entry.extraData);
					if (!string.IsNullOrWhiteSpace(val24.overrideBodyText))
					{
						val24.overrideBodyText += "\n\n";
					}
					string text17 = "";
					string text18 = "";
					EliteDef elite = null;
					if ((int)pickup.itemIndex != -1)
					{
						ItemDef itemDef = ItemCatalog.GetItemDef(pickup.itemIndex);
						if (PrintID.Value)
						{
							text17 = text17 + "ItemDef Name: " + ((Object)itemDef).name + "\n";
							text17 += $"ItemIndex: {itemDef.itemIndex}\n";
						}
						if (PrintTokens.Value)
						{
							text17 = text17 + "ItemDef NameToken: " + itemDef.nameToken + "\n";
							text17 = text17 + "ItemDef PickupToken: " + itemDef.pickupToken + "\n";
							text17 = text17 + "ItemDef DescriptionToken: " + itemDef.descriptionToken + "\n";
							text17 = text17 + "ItemDef LoreToken: " + itemDef.loreToken + "\n";
						}
						if (eliteItems.ContainsKey(itemDef))
						{
							elite = eliteItems[itemDef];
						}
					}
					if ((int)pickup.equipmentIndex != -1)
					{
						EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(pickup.equipmentIndex);
						if (PrintID.Value)
						{
							text17 = text17 + "EquipmentDef Name: " + ((Object)equipmentDef).name + "\n";
							text17 += $"EquipmentIndex: {equipmentDef.equipmentIndex}\n";
						}
						if (PrintTokens.Value)
						{
							text17 = text17 + "EquipmentDef NameToken: " + equipmentDef.nameToken + "\n";
							text17 = text17 + "EquipmentDef PickupToken: " + equipmentDef.pickupToken + "\n";
							text17 = text17 + "EquipmentDef DescriptionToken: " + equipmentDef.descriptionToken + "\n";
							text17 = text17 + "EquipmentDef LoreToken: " + equipmentDef.loreToken + "\n";
						}
						if (eliteEquips.ContainsKey(equipmentDef))
						{
							elite = eliteEquips[equipmentDef];
						}
					}
					if (PrintID.Value)
					{
						text17 = text17 + "PickupDef Name: " + pickup.internalName + "\n";
						text17 += $"PickupIndex: {pickup.pickupIndex}\n";
					}
					if (PrintGraphics.Value)
					{
						string text19 = text17;
						GameObject displayPrefab = pickup.displayPrefab;
						text17 = text19 + "PickupDef Prefab Name: " + ((displayPrefab != null) ? ((Object)displayPrefab).name : null) + "\n";
						string text20 = text17;
						Sprite iconSprite3 = pickup.iconSprite;
						text17 = text20 + "PickupDef Icon Sprite Name: " + ((iconSprite3 != null) ? ((Object)iconSprite3).name : null) + "\n";
						string text21 = text17;
						Texture iconTexture = pickup.iconTexture;
						text17 = text21 + "PickupDef Icon Texture Name: " + ((iconTexture != null) ? ((Object)iconTexture).name : null) + "\n";
					}
					if ((Object)(object)elite != (Object)null)
					{
						BuffDef val25 = ((IEnumerable<BuffDef>)BuffCatalog.buffDefs).FirstOrDefault((Func<BuffDef, bool>)((BuffDef x) => (Object)(object)x.eliteDef == (Object)(object)elite));
						if (PrintID.Value)
						{
							text17 = text17 + "EliteDef Name: " + ((Object)elite).name + "\n";
							text17 += $"EliteIndex: {elite.eliteIndex}\n";
						}
						if (PrintTokens.Value)
						{
							text17 = text17 + "EliteDef ModifierToken: " + elite.modifierToken + " (" + Language.GetString(elite.modifierToken) + ")\n";
						}
						if (PrintGraphics.Value)
						{
							text17 += $"EliteDef Color: {elite.color}\n";
							text17 += $"EliteDef RampIndex: {elite.shaderEliteRampIndex}\n";
						}
						if (Object.op_Implicit((Object)(object)val25))
						{
							if (PrintID.Value)
							{
								text17 = text17 + "BuffDef Name: " + ((Object)val25).name + "\n";
								text17 += $"BuffIndex: {val25.buffIndex}\n";
							}
							if (PrintGraphics.Value)
							{
								text17 = text17 + "BuffDef Icon: " + val25.iconPath + "\n";
								string text22 = text17;
								Sprite iconSprite4 = val25.iconSprite;
								text17 = text22 + "BuffDef IconName: " + ((iconSprite4 != null) ? ((Object)iconSprite4).name : null) + "\n";
							}
						}
						int num8 = contentPacks.FindIndex((ContentPack x) => x.eliteDefs.Contains(elite));
						if (num8 != -1)
						{
							text18 = text18 + GetModName(contentPacks[num8].identifier) + "\nSource Mod (Equipment): ";
						}
					}
					if (PrintID.Value && (int)pickup.itemIndex != -1)
					{
						text17 += $"ItemTierDef Name: {ItemTierCatalog.GetItemTierDef(ItemCatalog.GetItemDef(pickup.itemIndex).tier)}\n";
					}
					if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)pickup.unlockableDef))
					{
						text17 = text17 + "UnlockableDef Name: " + pickup.unlockableDef.cachedName + "\n";
						text17 += $"UnlockableIndex: {pickup.unlockableDef.index}\n";
					}
					int num9 = contentPacks.FindIndex(delegate(ContentPack x)
					{
						//IL_0007: Unknown result type (might be due to invalid IL or missing references)
						//IL_000d: Invalid comparison between Unknown and I4
						//IL_003a: Unknown result type (might be due to invalid IL or missing references)
						//IL_0040: Invalid comparison between Unknown and I4
						//IL_0022: Unknown result type (might be due to invalid IL or missing references)
						//IL_0055: Unknown result type (might be due to invalid IL or missing references)
						if ((int)pickup.itemIndex != -1)
						{
							return x.itemDefs.Contains(ItemCatalog.GetItemDef(pickup.itemIndex));
						}
						return (int)pickup.equipmentIndex != -1 && x.equipmentDefs.Contains(EquipmentCatalog.GetEquipmentDef(pickup.equipmentIndex));
					});
					if (num9 != -1)
					{
						text18 += GetModName(contentPacks[num9].identifier);
					}
					val24.overrideBodyText += FormatInternal(text17, text18, LogbookZoom.Value);
					return val24;
				};
				<>c.<>9__25_7 = val7;
				obj7 = (object)val7;
			}
			LogBookController.GetPickupTooltipContent += (hook_GetPickupTooltipContent)obj7;
			object obj8 = <>c.<>9__25_8;
			if (obj8 == null)
			{
				hook_GetMonsterTooltipContent val8 = delegate(orig_GetMonsterTooltipContent orig, ref Entry entry, UserProfile b, EntryStatus c)
				{
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					//IL_000c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_001a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0024: Expected O, but got Unknown
					//IL_0030: Unknown result type (might be due to invalid IL or missing references)
					//IL_009e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0138: Unknown result type (might be due to invalid IL or missing references)
					//IL_01de: Unknown result type (might be due to invalid IL or missing references)
					//IL_01df: Unknown result type (might be due to invalid IL or missing references)
					//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
					TooltipContent val23 = orig.Invoke(ref entry, b, c);
					CharacterBody body = (CharacterBody)entry.extraData;
					CharacterMaster master2 = body.master;
					if (!string.IsNullOrWhiteSpace(val23.overrideBodyText))
					{
						val23.overrideBodyText += "\n\n";
					}
					string text16 = "";
					string sourcemod = "";
					if (PrintID.Value)
					{
						text16 = text16 + "CharacterBody Name: " + ((Object)body).name + "\n";
						text16 += $"BodyIndex: {body.bodyIndex}\n";
					}
					if (PrintTokens.Value)
					{
						text16 = text16 + "CharacterBody NameToken: " + body.baseNameToken + "\n";
						text16 = text16 + "CharacterBody SubtitleToken: " + body.subtitleNameToken + "\n";
					}
					if (PrintID.Value && Object.op_Implicit((Object)(object)master2))
					{
						text16 = text16 + "CharacterMaster Name: " + ((Object)master2).name + "\n";
						text16 += $"MasterIndex: {master2.masterIndex}\n";
					}
					if (PrintGraphics.Value)
					{
						text16 = text16 + "CharacterBody Portrait Icon: " + ((Object)body.portraitIcon).name + "\n";
					}
					int num7 = contentPacks.FindIndex((ContentPack x) => Object.op_Implicit((Object)(object)((Component)body).gameObject) && x.bodyPrefabs.Contains(((Component)body).gameObject));
					if (num7 != -1)
					{
						sourcemod = GetModName(contentPacks[num7].identifier);
					}
					val23.overrideBodyText += FormatInternal(text16, sourcemod, LogbookZoom.Value);
					return val23;
				};
				<>c.<>9__25_8 = val8;
				obj8 = (object)val8;
			}
			LogBookController.GetMonsterTooltipContent += (hook_GetMonsterTooltipContent)obj8;
			object obj9 = <>c.<>9__25_9;
			if (obj9 == null)
			{
				hook_GetSurvivorTooltipContent val9 = delegate(orig_GetSurvivorTooltipContent orig, ref Entry entry, UserProfile b, EntryStatus c)
				{
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					//IL_000c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_0019: Unknown result type (might be due to invalid IL or missing references)
					//IL_001f: Expected O, but got Unknown
					//IL_002e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0042: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
					//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
					//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
					//IL_0252: Unknown result type (might be due to invalid IL or missing references)
					//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
					//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
					//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
					TooltipContent val21 = orig.Invoke(ref entry, b, c);
					CharacterBody val22 = (CharacterBody)entry.extraData;
					CharacterMaster master = val22.master;
					SurvivorDef surv = SurvivorCatalog.FindSurvivorDefFromBody(((Component)(CharacterBody)entry.extraData).gameObject);
					if (!string.IsNullOrWhiteSpace(val21.overrideBodyText))
					{
						val21.overrideBodyText += "\n\n";
					}
					string text14 = "";
					string text15 = "";
					if (PrintID.Value)
					{
						text14 = text14 + "SurvivorDef Name: " + surv.cachedName + "\n";
						text14 += $"SurvivorIndex: {surv.survivorIndex}\n";
						text14 = text14 + "CharacterBody Name: " + ((Object)val22).name + "\n";
						text14 += $"BodyIndex: {val22.bodyIndex}\n";
					}
					if (PrintTokens.Value)
					{
						text14 = text14 + "CharacterBody NameToken: " + val22.baseNameToken + "\n";
						text14 = text14 + "CharacterBody SubtitleToken: " + val22.subtitleNameToken + "\n";
						text14 = text14 + "SurvivorDef DescriptionToken: " + surv.descriptionToken + "\n";
						text14 = text14 + "SurvivorDef OutroToken: " + surv.outroFlavorToken + "\n";
						text14 = text14 + "SurvivorDef OutroFailureToken: " + surv.mainEndingEscapeFailureFlavorToken + "\n";
					}
					if (PrintID.Value && Object.op_Implicit((Object)(object)master))
					{
						text14 = text14 + "CharacterMaster Name: " + ((Object)master).name + "\n";
						text14 += $"MasterIndex: {master.masterIndex}\n";
					}
					if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)surv.unlockableDef))
					{
						text14 = text14 + "UnlockableDef Name: " + surv.unlockableDef.cachedName + "\n";
						text14 += $"UnlockableIndex: {surv.unlockableDef.index}\n";
					}
					int num6 = contentPacks.FindIndex((ContentPack x) => x.survivorDefs.Contains(surv));
					if (num6 != -1)
					{
						text15 += GetModName(contentPacks[num6].identifier);
					}
					val21.overrideBodyText += FormatInternal(text14, text15, LogbookZoom.Value);
					return val21;
				};
				<>c.<>9__25_9 = val9;
				obj9 = (object)val9;
			}
			LogBookController.GetSurvivorTooltipContent += (hook_GetSurvivorTooltipContent)obj9;
			object obj10 = <>c.<>9__25_10;
			if (obj10 == null)
			{
				hook_GetStageTooltipContent val10 = delegate(orig_GetStageTooltipContent orig, ref Entry entry, UserProfile b, EntryStatus c)
				{
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					//IL_000c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_001a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0024: Expected O, but got Unknown
					//IL_0024: Unknown result type (might be due to invalid IL or missing references)
					//IL_0091: Unknown result type (might be due to invalid IL or missing references)
					//IL_0170: Unknown result type (might be due to invalid IL or missing references)
					//IL_0171: Unknown result type (might be due to invalid IL or missing references)
					//IL_0175: Unknown result type (might be due to invalid IL or missing references)
					TooltipContent val20 = orig.Invoke(ref entry, b, c);
					SceneDef scene = (SceneDef)entry.extraData;
					if (!string.IsNullOrWhiteSpace(val20.overrideBodyText))
					{
						val20.overrideBodyText += "\n\n";
					}
					string text12 = "";
					string text13 = "";
					if (PrintID.Value)
					{
						text12 = text12 + "SceneDef Name: " + scene.cachedName + "\n";
						text12 += $"SceneDefIndex: {scene.sceneDefIndex}\n";
					}
					if (PrintTokens.Value)
					{
						text12 = text12 + "SceneDef NameToken: " + scene.nameToken + "\n";
						text12 = text12 + "SceneDef SubtitleToken: " + scene.subtitleToken + "\n";
						text12 = text12 + "SceneDef LoreToken: " + scene.loreToken + "\n";
					}
					int num5 = contentPacks.FindIndex((ContentPack x) => x.sceneDefs.Contains(scene));
					if (num5 != -1)
					{
						text13 += GetModName(contentPacks[num5].identifier);
					}
					val20.overrideBodyText += FormatInternal(text12, text13, LogbookZoom.Value);
					return val20;
				};
				<>c.<>9__25_10 = val10;
				obj10 = (object)val10;
			}
			LogBookController.GetStageTooltipContent += (hook_GetStageTooltipContent)obj10;
			object obj11 = <>c.<>9__25_11;
			if (obj11 == null)
			{
				hook_GetAchievementTooltipContent val11 = delegate(orig_GetAchievementTooltipContent orig, ref Entry entry, UserProfile b, EntryStatus c)
				{
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					//IL_000c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_0019: Unknown result type (might be due to invalid IL or missing references)
					//IL_001f: Expected O, but got Unknown
					//IL_0030: Unknown result type (might be due to invalid IL or missing references)
					//IL_0094: Unknown result type (might be due to invalid IL or missing references)
					//IL_017f: Unknown result type (might be due to invalid IL or missing references)
					//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
					//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
					//IL_0200: Unknown result type (might be due to invalid IL or missing references)
					TooltipContent val18 = orig.Invoke(ref entry, b, c);
					AchievementDef val19 = (AchievementDef)entry.extraData;
					UnlockableDef unlockable = UnlockableCatalog.GetUnlockableDef(val19.unlockableRewardIdentifier);
					if (!string.IsNullOrWhiteSpace(val18.overrideBodyText))
					{
						val18.overrideBodyText += "\n\n";
					}
					string text9 = "";
					string text10 = "";
					if (PrintID.Value)
					{
						text9 = text9 + "AchievementDef Name: " + val19.identifier + "\n";
						text9 += $"AchievementIndex: {val19.index}\n";
					}
					if (PrintTokens.Value)
					{
						text9 = text9 + "AchievementDef NameToken: " + val19.nameToken + "\n";
						text9 = text9 + "AchievementDef DescriptionToken: " + val19.descriptionToken + "\n";
					}
					if (PrintGraphics.Value)
					{
						text9 = text9 + "AchievementDef Icon: " + val19.iconPath + "\n";
						string text11 = text9;
						Sprite achievedIcon = val19.achievedIcon;
						text9 = text11 + "AchievementDef IconName: " + ((achievedIcon != null) ? ((Object)achievedIcon).name : null) + "\n";
					}
					if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)unlockable))
					{
						text9 = text9 + "UnlockableDef Name: " + unlockable.cachedName + "\n";
						text9 += $"UnlockableIndex: {unlockable.index}\n";
					}
					int num4 = contentPacks.FindIndex((ContentPack x) => Object.op_Implicit((Object)(object)unlockable) && x.unlockableDefs.Contains(unlockable));
					if (num4 != -1)
					{
						text10 += GetModName(contentPacks[num4].identifier);
					}
					val18.overrideBodyText += FormatInternal(text9, text10, LogbookZoom.Value);
					return val18;
				};
				<>c.<>9__25_11 = val11;
				obj11 = (object)val11;
			}
			LogBookController.GetAchievementTooltipContent += (hook_GetAchievementTooltipContent)obj11;
			if (EnableLobbyTooltips.Value)
			{
				object obj12 = <>c.<>9__25_12;
				if (obj12 == null)
				{
					hook_Start val12 = delegate(orig_Start orig, PreGameController self)
					{
						//IL_009d: Unknown result type (might be due to invalid IL or missing references)
						//IL_0236: Unknown result type (might be due to invalid IL or missing references)
						//IL_023b: Unknown result type (might be due to invalid IL or missing references)
						//IL_023f: Unknown result type (might be due to invalid IL or missing references)
						//IL_057b: Unknown result type (might be due to invalid IL or missing references)
						//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
						//IL_0605: Unknown result type (might be due to invalid IL or missing references)
						//IL_0722: Unknown result type (might be due to invalid IL or missing references)
						//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
						//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
						//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
						//IL_09eb: Unknown result type (might be due to invalid IL or missing references)
						//IL_0843: Unknown result type (might be due to invalid IL or missing references)
						//IL_0ae2: Unknown result type (might be due to invalid IL or missing references)
						orig.Invoke(self);
						foreach (DifficultyDef diff in DifficultyAPI.difficultyDefinitions.Values)
						{
							string text = "";
							string text2 = "";
							string text3 = (string.IsNullOrWhiteSpace(Language.GetString(diff.descriptionToken)) ? "" : "\n\n");
							if (PrintID.Value)
							{
								text += $"DifficultyIndex: {DifficultyAPI.difficultyDefinitions.First((KeyValuePair<DifficultyIndex, DifficultyDef> x) => x.Value == diff).Key}\n";
							}
							if (PrintTokens.Value)
							{
								text = text + "DifficultyDef NameToken: " + diff.nameToken + "\n";
								text = text + "DifficultyDef DescriptionToken: " + diff.descriptionToken + "\n";
							}
							if (PrintID.Value)
							{
								text = text + "DifficultyDef ServerTag: " + diff.serverTag + "\n";
							}
							if (PrintGraphics.Value)
							{
								text = text + "DifficultyDef Icon: " + diff.iconPath + "\n";
								string text4 = text;
								Sprite iconSprite = diff.iconSprite;
								text = text4 + "DifficultyDef IconName: " + ((iconSprite != null) ? ((Object)iconSprite).name : null) + "\n";
							}
							text2 = ((!TryGetGUID(diff, out var guid)) ? "Vanilla" : GetModName(guid));
							string temp5 = text3 + FormatInternal(text, text2, LobbyZoom.Value);
							DescTokenToExtraData[diff.descriptionToken] = (string orig) => orig + temp5;
						}
						foreach (SkillFamily allSkillFamily in SkillCatalog.allSkillFamilies)
						{
							for (int i = 0; i < allSkillFamily.variants.Length; i++)
							{
								Variant val16 = allSkillFamily.variants[i];
								SkillDef skill = val16.skillDef;
								string text = "";
								string text2 = "";
								string text3 = (string.IsNullOrWhiteSpace(Language.GetString(skill.skillDescriptionToken)) ? "" : "\n\n");
								if (PrintID.Value)
								{
									text = text + "SkillFamily Name: " + allSkillFamily.name + "\n";
									text += $"SkillFamily CatalogIndex: {allSkillFamily.catalogIndex}\n";
									text += $"Variant Number: {i}\n";
								}
								if (PrintTokens.Value)
								{
									text = text + "SkillDef NameToken: " + skill.skillNameToken + "\n";
									text = text + "SkillDef DescriptionToken: " + skill.skillDescriptionToken + "\n";
									if (skill.keywordTokens != null)
									{
										text = text + "SkillDef KeywordTokens: " + string.Join(", ", skill.keywordTokens) + "\n";
									}
								}
								if (PrintGraphics.Value)
								{
									string text5 = text;
									Sprite icon = skill.icon;
									text = text5 + "SkillDef IconName: " + ((icon != null) ? ((Object)icon).name : null) + "\n";
								}
								if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)val16.unlockableDef))
								{
									text = text + "UnlockableDef Name: " + val16.unlockableDef.cachedName + "\n";
									text += $"UnlockableIndex: {val16.unlockableDef.index}\n";
								}
								if (TryGetGUID(skill, out var guid2))
								{
									text2 = GetModName(guid2);
								}
								else
								{
									int num = contentPacks.FindIndex((ContentPack x) => Object.op_Implicit((Object)(object)skill) && x.skillDefs.Contains(skill));
									if (num != -1)
									{
										if (contentPacks[num].identifier == "RoR2.Junk" && DescTokenToExtraData.ContainsKey(skill.skillDescriptionToken))
										{
											continue;
										}
										text2 = GetModName(contentPacks[num].identifier);
									}
								}
								string temp4 = text3 + FormatInternal(text, text2, LobbyZoom.Value);
								DescTokenToExtraData[skill.skillDescriptionToken] = delegate(string orig)
								{
									LoadoutPanelController obj15 = Object.FindObjectOfType<LoadoutPanelController>();
									bool? obj16;
									if (obj15 == null)
									{
										obj16 = null;
									}
									else
									{
										GameObject gameObject = ((Component)obj15).gameObject;
										obj16 = ((gameObject != null) ? new bool?(gameObject.activeSelf) : null);
									}
									bool? flag = obj16;
									return orig + (flag.GetValueOrDefault() ? temp4 : "");
								};
							}
						}
						SkinDef[] allSkinDefs = SkinCatalog.allSkinDefs;
						foreach (SkinDef val17 in allSkinDefs)
						{
							string text = "";
							string text2 = "";
							string text3 = "";
							if (PrintID.Value)
							{
								text = text + "SkinDef Name: " + ((Object)val17).name + "\n";
								text += $"SkinIndex: {val17.skinIndex}\n";
							}
							if (PrintTokens.Value)
							{
								text = text + "SkinDef NameToken: " + val17.nameToken + "\n";
							}
							if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)val17.unlockableDef))
							{
								text = text + "UnlockableDef Name: " + val17.unlockableDef.cachedName + "\n";
								text += $"UnlockableIndex: {val17.unlockableDef.index}\n";
							}
							if (TryGetGUID(val17, out var guid3))
							{
								text2 = GetModName(guid3);
							}
							string temp3 = text3 + FormatInternal(text, text2, LobbyZoom.Value);
							DescTokenToExtraData[val17.nameToken + "_DESC"] = (string _) => temp3;
						}
						ArtifactDef[] artifactDefs = ArtifactCatalog.artifactDefs;
						foreach (ArtifactDef artifact in artifactDefs)
						{
							string text = "";
							string text2 = "";
							string text3 = (string.IsNullOrWhiteSpace(Language.GetString(artifact.descriptionToken)) ? "" : "\n\n");
							if (PrintID.Value)
							{
								text = text + "ArtifactDef Name: " + artifact.cachedName + "\n";
								text += $"ArtifactIndex: {artifact.artifactIndex}\n";
							}
							if (PrintTokens.Value)
							{
								text = text + "ArtifactDef NameToken: " + artifact.nameToken + "\n";
								text = text + "ArtifactDef DescriptionToken: " + artifact.descriptionToken + "\n";
							}
							if (PrintGraphics.Value)
							{
								string text6 = text;
								GameObject pickupModelPrefab = artifact.pickupModelPrefab;
								text = text6 + "ArtifactDef Pickup Name: " + ((pickupModelPrefab != null) ? ((Object)pickupModelPrefab).name : null) + "\n";
								string text7 = text;
								Sprite smallIconSelectedSprite = artifact.smallIconSelectedSprite;
								text = text7 + "ArtifactDef IconName: " + ((smallIconSelectedSprite != null) ? ((Object)smallIconSelectedSprite).name : null) + "\n";
							}
							if (PrintUnlocks.Value && Object.op_Implicit((Object)(object)artifact.unlockableDef))
							{
								text = text + "UnlockableDef Name: " + artifact.unlockableDef.cachedName + "\n";
								text += $"UnlockableIndex: {artifact.unlockableDef.index}\n";
							}
							if (TryGetGUID(artifact, out var guid4))
							{
								text2 = GetModName(guid4);
							}
							else
							{
								int num2 = contentPacks.FindIndex((ContentPack x) => Object.op_Implicit((Object)(object)artifact) && x.artifactDefs.Contains(artifact));
								if (num2 != -1)
								{
									if (contentPacks[num2].identifier == "RoR2.Junk" && DescTokenToExtraData.ContainsKey(artifact.descriptionToken))
									{
										continue;
									}
									text2 += GetModName(contentPacks[num2].identifier);
								}
							}
							string temp2 = text3 + FormatInternal(text, text2, LobbyZoom.Value);
							DescTokenToExtraData[artifact.descriptionToken] = (string orig) => orig + temp2;
						}
						ExpansionDef[] expansionDefs = ContentManager.expansionDefs;
						foreach (ExpansionDef exp in expansionDefs)
						{
							string text = "";
							string text2 = "";
							string text3 = (string.IsNullOrWhiteSpace(Language.GetString(exp.descriptionToken)) ? "" : "\n\n");
							if (PrintID.Value)
							{
								text = text + "ExpansionDef Name: " + ((Object)exp).name + "\n";
								text += $"ExpansionIndex: {exp.expansionIndex}\n";
							}
							if (PrintTokens.Value)
							{
								text = text + "ExpansionDef NameToken: " + exp.nameToken + "\n";
								text = text + "ExpansionDef DescriptionToken: " + exp.descriptionToken + "\n";
							}
							if (PrintGraphics.Value)
							{
								string text8 = text;
								Sprite iconSprite2 = exp.iconSprite;
								text = text8 + "ExpansionDef IconName: " + ((iconSprite2 != null) ? ((Object)iconSprite2).name : null) + "\n";
							}
							if (PrintUnlocks.Value && (Object)(object)exp.requiredEntitlement != (Object)null)
							{
								text = text + "ExpansionDef Required EntitlementDef Name: " + ((Object)exp.requiredEntitlement).name + "\n";
								text += $"ExpansionDef Required EntitlementIndex: {exp.requiredEntitlement.entitlementIndex}\n";
								text = text + "ExpansionDef Required EntitlementDef NameToken: " + exp.requiredEntitlement.nameToken + "\n";
							}
							if (TryGetGUID(exp, out var guid5))
							{
								text2 = GetModName(guid5);
							}
							else
							{
								int num3 = contentPacks.FindIndex((ContentPack x) => Object.op_Implicit((Object)(object)exp) && x.expansionDefs.Contains(exp));
								if (num3 != -1)
								{
									if (contentPacks[num3].identifier == "RoR2.Junk" && DescTokenToExtraData.ContainsKey(exp.descriptionToken))
									{
										continue;
									}
									text2 = GetModName(contentPacks[num3].identifier);
								}
							}
							string temp = text3 + FormatInternal(text, text2, LobbyZoom.Value);
							DescTokenToExtraData[exp.descriptionToken] = (string orig) => orig + temp;
						}
						DescTokenToExtraData.Remove("");
					};
					<>c.<>9__25_12 = val12;
					obj12 = (object)val12;
				}
				PreGameController.Start += (hook_Start)obj12;
			}
			if (EnableLobbyTooltips.Value)
			{
				object obj13 = <>c.<>9__25_13;
				if (obj13 == null)
				{
					hook_RebuildHeaders val13 = delegate(orig_RebuildHeaders orig, HGHeaderNavigationController self)
					{
						//IL_0009: Unknown result type (might be due to invalid IL or missing references)
						//IL_000e: Unknown result type (might be due to invalid IL or missing references)
						orig.Invoke(self);
						Scene activeScene = SceneManager.GetActiveScene();
						if (!(((Scene)(ref activeScene)).name != "lobby"))
						{
							Object.FindObjectOfType<CharacterSelectController>().RebuildLocal(false);
						}
					};
					<>c.<>9__25_13 = val13;
					obj13 = (object)val13;
				}
				HGHeaderNavigationController.RebuildHeaders += (hook_RebuildHeaders)obj13;
			}
			if (!EnableLobbyTooltips.Value)
			{
				return;
			}
			object obj14 = <>c.<>9__25_14;
			if (obj14 == null)
			{
				Manipulator val14 = delegate(ILContext il)
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					//IL_000e: Expected O, but got Unknown
					//IL_0077: Unknown result type (might be due to invalid IL or missing references)
					//IL_0083: Unknown result type (might be due to invalid IL or missing references)
					ILCursor val15 = new ILCursor(il);
					int skin = -1;
					val15.GotoNext((MoveType)2, new Func<Instruction, bool>[3]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref skin),
						(Instruction x) => ILPatternMatchingExt.MatchLdfld<SkinDef>(x, "nameToken"),
						(Instruction x) => ILPatternMatchingExt.MatchLdsfld<string>(x, "Empty")
					});
					val15.Emit(OpCodes.Pop);
					val15.Emit(OpCodes.Ldloc, skin);
					val15.EmitDelegate<Func<SkinDef, string>>((Func<SkinDef, string>)((SkinDef def) => def.nameToken + "_DESC"));
				};
				<>c.<>9__25_14 = val14;
				obj14 = (object)val14;
			}
			Row.FromSkin += (Manipulator)obj14;
		}

		public static string GetModName(string id)
		{
			if (packIdentifierToGUID.ContainsKey(id))
			{
				id = packIdentifierToGUID[id];
			}
			if (Chainloader.PluginInfos.TryGetValue(id, out var value))
			{
				id = value.Metadata.Name + " (GUID: " + value.Metadata.GUID + ")";
			}
			else
			{
				PluginInfo val = ((IEnumerable<PluginInfo>)Chainloader.PluginInfos.Values).FirstOrDefault((Func<PluginInfo, bool>)((PluginInfo x) => x.Metadata.Name == id));
				if (val != null)
				{
					id = val.Metadata.Name + " (GUID: " + val.Metadata.GUID + ")";
				}
			}
			return id;
		}

		public static string[] GetAssembliesFromStackTrace()
		{
			return (from frame in new StackTrace().GetFrames()
				select frame.GetMethod().DeclaringType.Assembly.FullName).ToArray();
		}

		public static bool TryGetGUID(object o, out string guid)
		{
			guid = "";
			if (!stuffDefToAssemblies.ContainsKey(o))
			{
				return false;
			}
			string[] array = stuffDefToAssemblies[o];
			foreach (string a in array)
			{
				PluginInfo val = ((IEnumerable<PluginInfo>)Chainloader.PluginInfos.Values).FirstOrDefault((Func<PluginInfo, bool>)((PluginInfo x) => ((object)x.Instance)?.GetType()?.Assembly.FullName == a));
				if (val != null && !ForbiddenGUIDs.Any(val.Metadata.GUID.Contains))
				{
					guid = val.Metadata.GUID;
					return true;
				}
			}
			return false;
		}

		public static string FormatInternal(string internals, string sourcemod, float zoom)
		{
			if (!PrintSourceMod.Value)
			{
				sourcemod = "";
			}
			string text = $"<size={zoom}%><style=cStack>";
			if (!string.IsNullOrWhiteSpace(internals))
			{
				text = text + "Internal Data\n\n" + internals;
			}
			if (!string.IsNullOrWhiteSpace(sourcemod))
			{
				text = text + "\nSource Mod: " + sourcemod;
			}
			return text + "</style></size>";
		}
	}
	[BepInPlugin("000.prodzpod.ModpackDebugger.MSUCompat", "ModpackDebugger.MSUCompat", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class MSUCompat : BaseUnityPlugin
	{
		public const string PluginGUID = "000.prodzpod.ModpackDebugger.MSUCompat";

		public const string PluginAuthor = "000.prodzpod";

		public const string PluginName = "ModpackDebugger.MSUCompat";

		public const string PluginVersion = "1.0.0";

		public void Awake()
		{
			if (Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm.MSU"))
			{
				Main.Harmony.PatchAll(typeof(Main.MSUFallBack));
			}
		}
	}
	[BepInPlugin("zzzzzz.prodzpod.ModpackDebugger.PostLoad", "ModpackDebugger.PostLoad", "1.0.0")]
	public class Post : BaseUnityPlugin
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_GetLocalizedStringByToken <>9__4_0;

			internal string <Awake>b__4_0(orig_GetLocalizedStringByToken orig, Language self, string token)
			{
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				string text = orig.Invoke(self, token);
				Scene activeScene = SceneManager.GetActiveScene();
				if (((Scene)(ref activeScene)).name == "lobby" && Main.DescTokenToExtraData.TryGetValue(token, out var value))
				{
					text = value(text);
				}
				return text;
			}
		}

		public const string PluginGUID = "zzzzzz.prodzpod.ModpackDebugger.PostLoad";

		public const string PluginAuthor = "zzzzzz.prodzpod";

		public const string PluginName = "ModpackDebugger.PostLoad";

		public const string PluginVersion = "1.0.0";

		public void Awake()
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			if (!Main.EnableLobbyTooltips.Value)
			{
				return;
			}
			object obj = <>c.<>9__4_0;
			if (obj == null)
			{
				hook_GetLocalizedStringByToken val = delegate(orig_GetLocalizedStringByToken orig, Language self, string token)
				{
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					//IL_000f: Unknown result type (might be due to invalid IL or missing references)
					string text = orig.Invoke(self, token);
					Scene activeScene = SceneManager.GetActiveScene();
					if (((Scene)(ref activeScene)).name == "lobby" && Main.DescTokenToExtraData.TryGetValue(token, out var value))
					{
						text = value(text);
					}
					return text;
				};
				<>c.<>9__4_0 = val;
				obj = (object)val;
			}
			Language.GetLocalizedStringByToken += (hook_GetLocalizedStringByToken)obj;
		}
	}
}