Decompiled source of MuseumWeaponsCheat v1.0.0

MuseumWeaponsCheat.dll

Decompiled 4 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using NicerSceneNames;
using PluginConfig.API;
using PluginConfig.API.Decorators;
using PluginConfig.API.Fields;
using ULTRAKILL.Cheats;
using UnityEngine;
using UnityEngine.AddressableAssets;
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("MuseumWeaponsCheat")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Museum Weapons Cheat")]
[assembly: AssemblyTitle("MuseumWeaponsCheat")]
[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 MuseumWeaponsCheat
{
	internal class BlackHoleCannonNoCooldownHandler : MonoBehaviour
	{
		internal List<GameObject> blackHoles = new List<GameObject>();

		private void Update()
		{
			if (!ConfigSettings.blackHoleNWC)
			{
				return;
			}
			BlackHoleCannon component = ((Component)this).gameObject.GetComponent<BlackHoleCannon>();
			if (NoWeaponCooldown.NoCooldown)
			{
				if (Object.op_Implicit((Object)(object)component.currentbh))
				{
					blackHoles.Add(component.currentbh);
					component.currentbh = null;
				}
			}
			else if (!Object.op_Implicit((Object)(object)component.currentbh) && blackHoles.Count > 0)
			{
				component.currentbh = blackHoles[0];
				blackHoles.RemoveAt(0);
			}
			if (!MonoSingleton<InputManager>.Instance.InputSource.Fire2.WasPerformedThisFrame || blackHoles.Count <= 0)
			{
				return;
			}
			BlackHoleProjectile val = default(BlackHoleProjectile);
			foreach (GameObject blackHole in blackHoles)
			{
				if (blackHole.TryGetComponent<BlackHoleProjectile>(ref val))
				{
					val.Activate();
				}
			}
			blackHoles.Clear();
			if (NoWeaponCooldown.NoCooldown && ConfigSettings.rumbleEnabled && MonoSingleton<GunControl>.Instance.activated)
			{
				MonoSingleton<RumbleManager>.Instance.SetVibration(MiscChanges.RumbleBlackHoleCannonActivate);
			}
		}
	}
	[Harmony]
	internal class BugFixes
	{
		[HarmonyPatch(typeof(Beamgun), "Update")]
		[HarmonyPostfix]
		private static void RemoveDualWieldDrones(Beamgun __instance)
		{
			if (MonoSingleton<InputManager>.Instance.InputSource.Fire2.WasPerformedThisFrame && ConfigSettings.bugfixesEnabled && ConfigSettings.beamDroneDupe && ((Component)__instance).GetComponentInParent<WeaponIdentifier>().duplicate && Object.op_Implicit((Object)(object)__instance.currentBeamDrone))
			{
				Object.Destroy((Object)(object)__instance.currentBeamDrone);
			}
		}

		private static void BlackHoleCannonExplodePart1(EnemyIdentifierIdentifier enemyIdentifierIdentifier, BlackHoleProjectile instance)
		{
			if (!ConfigSettings.bugfixesEnabled || !ConfigSettings.blackHoleStyleAndFreshness)
			{
				enemyIdentifierIdentifier.eid.hitter = "secret";
				return;
			}
			GameObject weaponKey = Plugin.GetWeaponKey("Black Hole Cannon");
			enemyIdentifierIdentifier.eid.hitter = "blackhole";
			enemyIdentifierIdentifier.eid.hitterWeapons.AddIfNotContains("blackholegun");
			if ((Object)(object)instance.scalc == (Object)null)
			{
				instance.scalc = MonoSingleton<StyleCalculator>.Instance;
			}
			instance.scalc.shud.AddPoints(2, "syla.blackholeguntick", weaponKey, (EnemyIdentifier)null, -1, "", "");
		}

		private static void BlackHoleCannonExplodePart2(BlackHoleProjectile instance)
		{
			if (!ConfigSettings.bugfixesEnabled || !ConfigSettings.blackHoleStyleAndFreshness)
			{
				instance.scalc.shud.AddPoints(50 - instance.killAmount * 10, "ultrakill.compressed", (GameObject)null, (EnemyIdentifier)null, -1, "", "");
				instance.scalc.HitCalculator("", "", "", true, (EnemyIdentifier)null, (GameObject)null);
			}
			else
			{
				GameObject weaponKey = Plugin.GetWeaponKey("Black Hole Cannon");
				instance.scalc.shud.AddPoints(50 - instance.killAmount * 10, "ultrakill.compressed", weaponKey, (EnemyIdentifier)null, -1, "", "");
				instance.scalc.AddToMultiKill(weaponKey);
			}
		}

		[HarmonyPatch(typeof(BlackHoleProjectile), "Explode")]
		[HarmonyTranspiler]
		private static IEnumerable<CodeInstruction> OverrideBlackHoleCannonExplode(IEnumerable<CodeInstruction> instructions)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Expected O, but got Unknown
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Expected O, but got Unknown
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Expected O, but got Unknown
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Expected O, but got Unknown
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Expected O, but got Unknown
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Expected O, but got Unknown
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Expected O, but got Unknown
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Expected O, but got Unknown
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Expected O, but got Unknown
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Expected O, but got Unknown
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Expected O, but got Unknown
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Expected O, but got Unknown
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Expected O, but got Unknown
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Expected O, but got Unknown
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Expected O, but got Unknown
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Expected O, but got Unknown
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Expected O, but got Unknown
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Expected O, but got Unknown
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: Expected O, but got Unknown
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Expected O, but got Unknown
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Expected O, but got Unknown
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Expected O, but got Unknown
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Expected O, but got Unknown
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Expected O, but got Unknown
			//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b2: Expected O, but got Unknown
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c7: Expected O, but got Unknown
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e2: Expected O, but got Unknown
			//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
			val.Start();
			val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[3]
			{
				new CodeMatch((OpCode?)OpCodes.Ldloc_2, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"secret", (string)null)
			});
			val.Advance(1);
			val.RemoveInstructions(4);
			val.Insert((CodeInstruction[])(object)new CodeInstruction[2]
			{
				new CodeInstruction(OpCodes.Ldarg_0, (object)null),
				new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(BugFixes), "BlackHoleCannonExplodePart1", (Type[])null, (Type[])null))
			});
			val.MatchForwardAndRemove(Plugin.Logger, (LogLevel)4, "", new CodeMatch((OpCode?)OpCodes.Ldarg_0, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldc_I4_S, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldarg_0, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldc_I4_S, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Mul, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Sub, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"ultrakill.compressed", (string)null), new CodeMatch((OpCode?)OpCodes.Ldnull, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldnull, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldc_I4_M1, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldstr, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldstr, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Callvirt, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldarg_0, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldfld, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldstr, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldstr, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldstr, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldc_I4_1, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldnull, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldnull, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Callvirt, (object)null, (string)null));
			val.Insert((CodeInstruction[])(object)new CodeInstruction[2]
			{
				new CodeInstruction(OpCodes.Ldarg_0, (object)null),
				new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(BugFixes), "BlackHoleCannonExplodePart2", (Type[])null, (Type[])null))
			});
			return val.Instructions();
		}

		private static void BlackHoleCannonTargetLightning(BlackHoleProjectile instance, EnemyIdentifier shoot, List<EnemyIdentifier> list)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Invalid comparison between Unknown and I4
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Invalid comparison between Unknown and I4
			if (!ConfigSettings.bugfixesEnabled || !ConfigSettings.blackHoleStyleAndFreshness)
			{
				shoot.DeliverDamage(((Component)shoot).gameObject, Vector3.zero, ((Component)shoot).transform.position, 1f, false, 0f, (GameObject)null, false, false);
				if (!shoot.dead)
				{
					return;
				}
				list.Add(shoot);
				if (!ConfigSettings.blackHoleIgnoresMaurice || (int)shoot.enemyType != 4)
				{
					Rigidbody[] componentsInChildren = ((Component)shoot).GetComponentsInChildren<Rigidbody>();
					foreach (Rigidbody item in componentsInChildren)
					{
						instance.caughtList.Add(item);
					}
				}
				return;
			}
			shoot.hitter = "blackholetick";
			GameObject weaponKey = Plugin.GetWeaponKey("Black Hole Cannon");
			if ((Object)(object)instance.scalc == (Object)null)
			{
				instance.scalc = MonoSingleton<StyleCalculator>.Instance;
			}
			instance.scalc.shud.AddPoints(2, "syla.blackholeguntick", weaponKey, (EnemyIdentifier)null, -1, "", "");
			shoot.DeliverDamage(((Component)shoot).gameObject, Vector3.zero, ((Component)shoot).transform.position, 1f, false, 0f, weaponKey, false, false);
			if (!shoot.dead)
			{
				return;
			}
			list.Add(shoot);
			if (!ConfigSettings.blackHoleIgnoresMaurice || (int)shoot.enemyType != 4)
			{
				Rigidbody[] componentsInChildren2 = ((Component)shoot).GetComponentsInChildren<Rigidbody>();
				Rigidbody[] array = componentsInChildren2;
				foreach (Rigidbody item2 in array)
				{
					instance.caughtList.Add(item2);
				}
			}
		}

		[HarmonyPatch(typeof(BlackHoleProjectile), "ShootTargetLightning")]
		[HarmonyTranspiler]
		private static IEnumerable<CodeInstruction> OverrideBlackHoleCannonShootTargetLightning(IEnumerable<CodeInstruction> instructions)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Expected O, but got Unknown
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Expected O, but got Unknown
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Expected O, but got Unknown
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Expected O, but got Unknown
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Expected O, but got Unknown
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null);
			val.Start();
			val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"secret", (string)null)
			});
			val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Constrained, (object)null, (string)null)
			});
			val.Advance(-5);
			Plugin.Logger.LogInfo((object)val.IsValid);
			Label label = default(Label);
			val.Instruction.labels.Add(label);
			val.MatchBack(false, (CodeMatch[])(object)new CodeMatch[1]
			{
				new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"secret", (string)null)
			});
			val.Advance(2);
			val.Operand = label;
			val.Insert((CodeInstruction[])(object)new CodeInstruction[4]
			{
				new CodeInstruction(OpCodes.Ldarg_0, (object)null),
				new CodeInstruction(OpCodes.Ldloc_2, (object)null),
				new CodeInstruction(OpCodes.Ldloc_0, (object)null),
				new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(BugFixes), "BlackHoleCannonTargetLightning", (Type[])null, (Type[])null))
			});
			return val.Instructions();
		}

		[HarmonyPatch(typeof(StyleHUD), "Start")]
		[HarmonyPostfix]
		public static void SetupStyleBonuses(StyleHUD __instance)
		{
			__instance.freshnessDecayMultiplierDict.Add("syla.beamgun", ConfigSettings.beamgunStyleMult);
			__instance.freshnessDecayMultiplierDict.Add("syla.blackholeguntick", ConfigSettings.blackHoleStyleMult2);
			__instance.freshnessDecayMultiplierDict.Add("blackholetick", ConfigSettings.blackHoleStyleMult);
			__instance.freshnessDecayMultiplierDict.Add("syla.doublebeamdeath", ConfigSettings.beamgunDicedStyleMult);
			__instance.freshnessDecayMultiplierDict.Add("syla.singlebeamdeath", ConfigSettings.beamgunSlicedStyleMult);
			__instance.idNameDict.Add("syla.beamgun", string.Empty);
			__instance.idNameDict.Add("syla.blackholeguntick", string.Empty);
			__instance.idNameDict.Add("syla.doublebeamdeath", "DICED");
			__instance.idNameDict.Add("syla.singlebeamdeath", "SLICED");
		}

		[HarmonyPatch(typeof(StyleCalculator), "HitCalculator")]
		[HarmonyPostfix]
		public static void CalcHitsForNewStyleBonuses(StyleCalculator __instance, string hitter, string enemyType, string hitLimb, bool dead, EnemyIdentifier eid = null, GameObject sourceWeapon = null)
		{
			if (!(hitter == "beamgunbeam") && !(hitter == "beamgunbeam2"))
			{
				return;
			}
			__instance.enemiesShot = true;
			if (dead)
			{
				DicedStyleTracker dicedStyleTracker = ((!Object.op_Implicit((Object)(object)eid)) ? null : ((Component)eid).gameObject.GetComponent<DicedStyleTracker>());
				if (ConfigSettings.beamDicedStyle && Object.op_Implicit((Object)(object)eid) && Object.op_Implicit((Object)(object)dicedStyleTracker) && dicedStyleTracker.UpdateHitter(hitter) && dicedStyleTracker.primaryTimeLeft > 0f && dicedStyleTracker.secondaryTimeLeft > 0f)
				{
					__instance.AddPoints(90, "syla.doublebeamdeath", eid, sourceWeapon);
				}
				else if (ConfigSettings.beamSlicedStyle && hitter == "beamgunbeam2")
				{
					__instance.AddPoints(60, "syla.singlebeamdeath", eid, sourceWeapon);
				}
				else if (enemyType == "spider")
				{
					__instance.AddPoints(100, "ultrakill.bigkill", eid, sourceWeapon);
				}
				else
				{
					__instance.AddPoints(45, "ultrakill.kill", eid, sourceWeapon);
				}
				__instance.gc.AddKill();
			}
			else
			{
				__instance.AddPoints(4, "syla.beamgun", eid, sourceWeapon);
			}
		}

		[HarmonyPatch(typeof(Beamgun), "Update")]
		[HarmonyPrefix]
		private static bool FixPauseBug(Beamgun __instance)
		{
			if (MonoSingleton<OptionsManager>.Instance.paused && ConfigSettings.bugfixesEnabled && ConfigSettings.beamPauseBug)
			{
				return false;
			}
			return true;
		}

		[HarmonyPatch(typeof(BeamgunBeam), "FixedUpdate")]
		[HarmonyPrefix]
		private static bool BeamgunDamageStyleFreshnessFixes(BeamgunBeam __instance)
		{
			if (ConfigSettings.bugfixesEnabled)
			{
				if (__instance.beamCheckTime > 0f)
				{
					__instance.beamCheckTime = Mathf.MoveTowards(__instance.beamCheckTime, 0f, Time.deltaTime * __instance.beamCheckSpeed * 15f);
				}
				if (__instance.beamCheckTime <= 0f)
				{
					__instance.beamCheckTime = 1f;
					if (Object.op_Implicit((Object)(object)__instance.hitTarget))
					{
						GameObject weaponKey = Plugin.GetWeaponKey("Beamcutter Blue");
						if (ConfigSettings.beamStyleAndFreshness)
						{
							__instance.hitTarget.eid.hitter = (__instance.canHitPlayer ? "beamgunbeam2" : "beamgunbeam");
							__instance.hitTarget.eid.hitterWeapons.AddIfNotContains("beamgun");
						}
						DoBeamgunDamage(__instance, weaponKey);
					}
				}
				return false;
			}
			return true;
		}

		private static void DoBeamgunDamage(BeamgunBeam beam, GameObject weapon)
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: 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: Unknown result type (might be due to invalid IL or missing references)
			int num = ((!beam.canHitPlayer) ? 1 : (1 + MonoSingleton<GunControl>.Instance.dualWieldCount));
			if (!ConfigSettings.beamDroneDupe)
			{
				num = 1;
			}
			for (int i = 0; i < num; i++)
			{
				EnemyIdentifier eid = beam.hitTarget.eid;
				GameObject gameObject = ((Component)((Component)beam.hitTarget).transform).gameObject;
				Vector3 val = beam.hitPosition - ((Component)beam).transform.position;
				eid.DeliverDamage(gameObject, ((Vector3)(ref val)).normalized * 10f, beam.hitPosition, 0.15f, false, 0.5f, weapon, false, false);
			}
		}
	}
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	internal struct ConfigSettings
	{
		internal static bool glowEnabled = true;

		internal static bool glowEnabled2 = true;

		internal static IconEnums.BeamgunIcons beamgunIcon = IconEnums.BeamgunIcons.beamgun;

		internal static IconEnums.BlackHoleIcons blackholegunIcon = IconEnums.BlackHoleIcons.blackHole;

		internal static WeaponVariant beamgunColor = (WeaponVariant)0;

		internal static WeaponVariant blackholegunColor = (WeaponVariant)2;

		internal static bool bugfixesEnabled = true;

		internal static bool beamStyleAndFreshness = true;

		internal static bool beamSlicedStyle = true;

		internal static bool beamDicedStyle = true;

		internal static bool beamPauseBug = true;

		internal static bool beamDroneDupe = true;

		internal static bool blackHoleStyleAndFreshness = true;

		internal static bool blackHoleDualWield = true;

		internal static bool blackHoleIgnoresMaurice = true;

		internal static bool beamLight = true;

		internal static bool beamSFX = true;

		internal static bool droneDespawn = true;

		internal static bool blackHoleNWC = true;

		internal static float beamgunStyleMult = 0.05f;

		internal static float beamgunSlicedStyleMult = 0.3f;

		internal static float beamgunDicedStyleMult = 0.3f;

		internal static float blackHoleStyleMult = 1f;

		internal static float blackHoleStyleMult2 = 0.1f;

		internal static bool rumbleEnabled = true;

		internal static float beamRumble = 0.125f;

		internal static float beamRumbleMult = 1.08f;

		internal static float beamDroneRumble = 0.1f;

		internal static float beamDroneRumbleDur = 0.1f;

		internal static float blackHoleRumble = 0.8f;

		internal static float blackHoleRumbleDur = 0.4f;

		internal static float blackHoleRumbleActivate = 0.65f;

		internal static float blackHoleRumbleActivateDur = 0.2f;

		internal static float blackHoleRumbleClick = 0.1f;

		internal static float blackHoleRumbleClickDur = 0.1f;
	}
	[Harmony]
	internal class DicedStyleTracker : MonoBehaviour
	{
		internal const float MAX_TIME = 1f;

		internal float primaryTimeLeft = 0f;

		internal float secondaryTimeLeft = 0f;

		[HarmonyPatch(typeof(EnemyIdentifier), "Start")]
		[HarmonyPrefix]
		private static void EnemyIdentifierStart(EnemyIdentifier __instance)
		{
			DicedStyleTracker dicedStyleTracker = default(DicedStyleTracker);
			if (!((Component)__instance).TryGetComponent<DicedStyleTracker>(ref dicedStyleTracker))
			{
				((Component)__instance).gameObject.AddComponent<DicedStyleTracker>();
			}
		}

		[HarmonyPatch(typeof(EnemyIdentifier), "DeliverDamage")]
		[HarmonyPrefix]
		private static void EnemyIdentifierDeliverDamage(EnemyIdentifier __instance)
		{
			DicedStyleTracker component = ((Component)__instance).gameObject.GetComponent<DicedStyleTracker>();
			component.UpdateHitter(__instance.hitter);
		}

		private void Update()
		{
			if (primaryTimeLeft > 0f)
			{
				primaryTimeLeft -= Time.deltaTime;
			}
			if (secondaryTimeLeft > 0f)
			{
				secondaryTimeLeft -= Time.deltaTime;
			}
		}

		internal bool UpdateHitter(string hitter)
		{
			if (hitter == "beamgunbeam")
			{
				primaryTimeLeft = 1f;
				return true;
			}
			if (hitter == "beamgunbeam2")
			{
				secondaryTimeLeft = 1f;
				return true;
			}
			return false;
		}
	}
	internal static class Extensions
	{
		public static void AddIfNotContains<T>(this List<T> list, T item)
		{
			if (!list.Contains(item))
			{
				list.Add(item);
			}
		}

		public static void AddIfNotContains<T, V>(this Dictionary<T, V> dict, T key, V value)
		{
			if (!dict.ContainsKey(key))
			{
				dict.Add(key, value);
			}
		}

		public static GameObject GetChildByName(this GameObject obj, string name)
		{
			if ((Object)(object)obj.transform.Find(name) == (Object)null || (Object)(object)((Component)obj.transform.Find(name)).gameObject == (Object)null)
			{
				return null;
			}
			return ((Component)obj.transform.Find(name)).gameObject;
		}

		internal static CodeMatcher MatchForwardAndRemove(this CodeMatcher matcher, ManualLogSource logger, LogLevel level = 4, string msg = "", params CodeMatch[] matches)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			matcher.MatchForward(false, matches);
			if (!matcher.IsValid)
			{
				if (logger != null)
				{
					logger.Log(level, (object)("CodeMatcher position is not valid. The code being searched for does not exist, or may have already been edited. " + msg));
				}
				return matcher;
			}
			matcher.RemoveInstructions(matches.Length);
			return matcher;
		}
	}
	internal static class IconController
	{
		public static List<IconSet> beamgunIcons = new List<IconSet>();

		public static List<IconSet> blackHoleIcons = new List<IconSet>();

		public static void SetIcons(this WeaponIcon icon, int idx, List<IconSet> list, WeaponVariant variant, bool glow)
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			icon.weaponDescriptor.icon = list[idx].icon;
			icon.weaponDescriptor.glowIcon = (glow ? list[idx].glow : list[idx].icon);
			icon.weaponDescriptor.variationColor = variant;
		}
	}
	public static class IconEnums
	{
		internal enum BeamgunIcons
		{
			vanilla,
			beamgun,
			beamgunVar,
			beamgunCannon,
			beamgunRevolver,
			beamgunSlabRevolver
		}

		internal enum BlackHoleIcons
		{
			vanilla,
			blackHole,
			blackHoleVar,
			blackHoleBeamgun,
			blackHoleShotgun,
			blackHoleHammer
		}

		internal static void IconStrings(EnumField<BeamgunIcons> field)
		{
			field.SetEnumDisplayName(BeamgunIcons.vanilla, "Question Mark (vanilla)");
			field.SetEnumDisplayName(BeamgunIcons.beamgun, "Beamcutter");
			field.SetEnumDisplayName(BeamgunIcons.beamgunVar, "Beamcutter w/ Variant");
			field.SetEnumDisplayName(BeamgunIcons.beamgunCannon, "Black Hole Cannon Variant");
			field.SetEnumDisplayName(BeamgunIcons.beamgunRevolver, "Revolver Variant");
			field.SetEnumDisplayName(BeamgunIcons.beamgunSlabRevolver, "Slab Revolver Variant");
		}

		internal static void IconStrings(EnumField<BlackHoleIcons> field)
		{
			field.SetEnumDisplayName(BlackHoleIcons.vanilla, "Question Mark (vanilla)");
			field.SetEnumDisplayName(BlackHoleIcons.blackHole, "Black Hole Cannon");
			field.SetEnumDisplayName(BlackHoleIcons.blackHoleVar, "Black Hole Cannon w/ Variant");
			field.SetEnumDisplayName(BlackHoleIcons.blackHoleBeamgun, "Beamcutter Variant");
			field.SetEnumDisplayName(BlackHoleIcons.blackHoleShotgun, "Shotgun Variant");
			field.SetEnumDisplayName(BlackHoleIcons.blackHoleHammer, "Impact Hammer Variant");
		}
	}
	internal class IconSet
	{
		public Sprite icon;

		public Sprite glow;

		public IconSet(string fn, bool vanilla = false)
		{
			if (vanilla)
			{
				icon = LoadAsset("Assets/Textures/UI/questionMark.png");
			}
			else
			{
				icon = LoadImage(fn + ".png");
			}
			glow = LoadImage(fn + "_glow.png");
		}

		private Sprite LoadImage(string fn)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MuseumWeaponsCheat.Resources." + fn);
			byte[] array = new byte[manifestResourceStream.Length];
			manifestResourceStream.Read(array, 0, array.Length);
			Texture2D val = new Texture2D(1, 1, (TextureFormat)4, false);
			ImageConversion.LoadImage(val, array, true);
			return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f));
		}

		private Sprite LoadAsset(string fn)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: 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_0038: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = Addressables.LoadAssetAsync<Texture2D>((object)fn).WaitForCompletion();
			return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f));
		}
	}
	internal static class KeyStrings
	{
		public const string beamgunDamageType = "syla.beamgun";

		public const string beamgunWeaponName = "beamgun";

		public const string beamgunHitter = "beamgunbeam";

		public const string beamgunAltHitter = "beamgunbeam2";

		public const string blackHoleDamageType = "syla.blackholeguntick";

		public const string blackHoleWeaponName = "blackholegun";

		public const string blackHoleHitter = "blackhole";

		public const string blackHoleTickHitter = "blackholetick";

		public const string beamSingleStyleType = "syla.singlebeamdeath";

		public const string beamSingleStyleName = "SLICED";

		public const string beamDoubleStyleType = "syla.doublebeamdeath";

		public const string beamDoubleStyleName = "DICED";
	}
	[Harmony]
	internal class MiscChanges
	{
		internal const float minIntensity = 0.85f;

		internal const float maxIntensity = 1f;

		internal static AudioClip aud_beam = null;

		internal static AudioClip aud_drone = null;

		internal static AudioClip aud_beamSpark = null;

		private static float minSparkSFXDist = 10f;

		private static float maxSparkSFXDist = 15f;

		internal static readonly RumbleKey RumbleBeamgunFire = new RumbleKey("rumble.beamgun.fire");

		internal static readonly RumbleKey RumbleBeamgunDrone = new RumbleKey("rumble.beamgun.drone");

		internal static readonly RumbleKey RumbleBlackHoleCannonFire = new RumbleKey("rumble.blackholecannon.fire");

		internal static readonly RumbleKey RumbleBlackHoleCannonActivate = new RumbleKey("rumble.blackholecannon.activate");

		internal static readonly RumbleKey RumbleBlackHoleCannonClick = new RumbleKey("rumble.blackholecannon.click");

		[HarmonyPatch(typeof(BeamgunBeam), "Start")]
		[HarmonyPostfix]
		public static void BeamgunSetupLight(BeamgunBeam __instance)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("BeamLight");
			Light val2 = val.AddComponent<Light>();
			((Behaviour)val2).enabled = true;
			val2.range = 15f;
			val2.color = Color.white;
			val2.intensity = 0.85f;
			val2.type = (LightType)2;
			val.transform.SetParent(((Component)__instance.hitParticle).transform, true);
		}

		[HarmonyPatch(typeof(BeamgunBeam), "Update")]
		[HarmonyPostfix]
		public static void BeamgunPositionLight(BeamgunBeam __instance)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			GameObject childByName = ((Component)__instance.hitParticle).gameObject.GetChildByName("BeamLight");
			LayerMask val = LayerMaskDefaults.Get((LMD)3);
			if (__instance.canHitPlayer && __instance.playerDamageCooldown <= 0f)
			{
				val = LayerMaskDefaults.Get((LMD)6);
			}
			if (!((Object)((Component)__instance).transform.parent).name.Contains("BeamgunDrone"))
			{
				Light component = childByName.GetComponent<Light>();
				Vector3 velocity = MonoSingleton<NewMovement>.Instance.rb.velocity;
				component.intensity = (Mathf.Clamp(((Vector3)(ref velocity)).magnitude / 5f, 0.1f, 0.25f) * 10f - 1f) * 0.14999998f / 1.5f + 0.85f;
			}
			RaycastHit val2 = default(RaycastHit);
			if (Physics.Raycast(((Component)__instance).transform.position, ((Component)__instance).transform.forward, ref val2, float.PositiveInfinity, LayerMask.op_Implicit(val), (QueryTriggerInteraction)1))
			{
				childByName.transform.position = ((Component)__instance.hitParticle).transform.position + ((RaycastHit)(ref val2)).normal * 2f;
			}
			((Behaviour)childByName.GetComponent<Light>()).enabled = ConfigSettings.beamLight;
		}

		[HarmonyPatch(typeof(CheckPoint), "OnRespawn")]
		[HarmonyPrefix]
		private static void OnRespawn(CheckPoint __instance)
		{
			if (ConfigSettings.droneDespawn)
			{
				Beamgun val2 = default(Beamgun);
				GameObject[] array = MonoSingleton<GunControl>.Instance.allWeapons.Where((GameObject obj) => obj.TryGetComponent<Beamgun>(ref val2)).ToArray();
				GameObject[] array2 = array;
				foreach (GameObject val in array2)
				{
					Beamgun component = val.GetComponent<Beamgun>();
					Object.Destroy((Object)(object)component.currentBeamDrone);
					component.currentBeamDrone = null;
				}
			}
		}

		[HarmonyPatch(typeof(Beamgun), "Start")]
		[HarmonyPrefix]
		private static void SetupBeamgunAudio(Beamgun __instance)
		{
			SetupBeamAudio(((Component)__instance).gameObject.GetChildByName("BeamCutter_WIP").GetChildByName("Shootpoint"), isBeamgun: true);
			SetupBeamAudio(__instance.beamDrone);
		}

		[HarmonyPatch(typeof(BeamgunBeam), "Start")]
		[HarmonyPrefix]
		private static void SetupBeamgunBeamAudio(BeamgunBeam __instance)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			GameObject val = new GameObject("BeamSFX");
			SetupBeamEndAudio(val);
			val.transform.SetParent(((Component)__instance.hitParticle).transform, false);
		}

		private static void SetupBeamAudio(GameObject obj, bool isBeamgun = false)
		{
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Expected O, but got Unknown
			if ((Object)(object)aud_beam == (Object)null)
			{
				aud_beam = AssetHelper.LoadPrefab("Assets/Prefabs/Weapons/Alternative Revolver Pierce.prefab").GetChildByName("Revolver_Rerigged_Alternate").GetChildByName("Armature")
					.GetChildByName("Upper Arm")
					.GetChildByName("Forearm")
					.GetChildByName("Hand")
					.GetChildByName("Revolver_Bone")
					.GetChildByName("ShootPoint (1)")
					.GetChildByName("ChargeEffect")
					.GetComponent<AudioSource>()
					.clip;
			}
			AudioSource val = obj.AddComponent<AudioSource>();
			val.clip = aud_beam;
			val.pitch = 0.5f;
			val.spatialBlend = 1f;
			val.velocityUpdateMode = (AudioVelocityUpdateMode)1;
			val.loop = true;
			val.playOnAwake = false;
			if (isBeamgun)
			{
				if ((Object)(object)aud_drone == (Object)null)
				{
					aud_drone = ((Component)AssetHelper.LoadPrefab("Assets/Prefabs/Weapons/Alternative Revolver Pierce.prefab").GetComponent<Revolver>().screenMR).gameObject.GetComponent<AudioSource>().clip;
				}
				GameObject val2 = new GameObject("BeamDroneBreakSFX");
				AudioSource val3 = val2.AddComponent<AudioSource>();
				val2.transform.SetParent(obj.transform, false);
				val3.clip = aud_drone;
				val3.spatialBlend = 1f;
				val3.velocityUpdateMode = (AudioVelocityUpdateMode)1;
				val3.playOnAwake = false;
			}
		}

		private static void SetupBeamEndAudio(GameObject obj)
		{
			if ((Object)(object)aud_beamSpark == (Object)null)
			{
				aud_beamSpark = AssetHelper.LoadPrefab("Assets/Prefabs/Weapons/Railcannon Electric.prefab").GetChildByName("Railcannon").GetChildByName("Armature")
					.GetChildByName("Base")
					.GetChildByName("FullCharge")
					.GetComponent<AudioSource>()
					.clip;
			}
			AudioSource val = obj.AddComponent<AudioSource>();
			val.clip = aud_beamSpark;
			val.spatialBlend = 1f;
			val.velocityUpdateMode = (AudioVelocityUpdateMode)1;
			val.loop = true;
			val.rolloffMode = (AudioRolloffMode)1;
			val.maxDistance = 10f;
			val.playOnAwake = false;
		}

		[HarmonyPatch(typeof(Beamgun), "Update")]
		[HarmonyPrefix]
		private static void DoBeamgunAudio(Beamgun __instance)
		{
			if (!ConfigSettings.beamSFX)
			{
				return;
			}
			AudioSource component = ((Component)__instance).gameObject.GetChildByName("BeamCutter_WIP").GetChildByName("Shootpoint").GetComponent<AudioSource>();
			if (((Component)__instance.beam).gameObject.activeSelf)
			{
				if (!component.isPlaying)
				{
					component.Play();
				}
			}
			else
			{
				component.Stop();
			}
			if (Object.op_Implicit((Object)(object)__instance.currentBeamDrone))
			{
				AudioSource component2 = __instance.currentBeamDrone.GetComponent<AudioSource>();
				if (!__instance.currentBeamDrone.GetChildByName("Startup").activeSelf && !component2.isPlaying)
				{
					component2.Play();
				}
			}
			if (MonoSingleton<InputManager>.Instance.InputSource.Fire2.WasPerformedThisFrame && Object.op_Implicit((Object)(object)__instance.currentBeamDrone))
			{
				AudioSource component3 = ((Component)__instance).gameObject.GetChildByName("BeamCutter_WIP").GetChildByName("Shootpoint").GetChildByName("BeamDroneBreakSFX")
					.GetComponent<AudioSource>();
				component3.Play();
			}
		}

		[HarmonyPatch(typeof(BeamgunBeam), "Update")]
		[HarmonyPrefix]
		private static void DoBeamgunBeamAudio(BeamgunBeam __instance)
		{
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			if (ConfigSettings.beamSFX)
			{
				AudioSource component = ((Component)__instance.hitParticle).gameObject.GetChildByName("BeamSFX").GetComponent<AudioSource>();
				if (!component.isPlaying)
				{
					component.Play();
				}
				if (!__instance.canHitPlayer)
				{
					Vector3 velocity = MonoSingleton<NewMovement>.Instance.rb.velocity;
					component.maxDistance = (Mathf.Clamp(((Vector3)(ref velocity)).magnitude / 5f, 0.1f, 0.25f) * 10f - 1f) * (maxSparkSFXDist - minSparkSFXDist) / 1.5f + minSparkSFXDist;
				}
			}
		}

		internal static void SetupRumble(Scene from, Scene to)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			if (!(SceneNamer.GetNiceSceneName(to) == "Main Menu"))
			{
				RumbleManager.rumbleDurations.AddIfNotContains(RumbleBeamgunFire, float.PositiveInfinity);
				RumbleManager.rumbleIntensities.AddIfNotContains(RumbleBeamgunFire, ConfigSettings.beamRumble);
				RumbleManager.rumbleDurations.AddIfNotContains(RumbleBeamgunDrone, ConfigSettings.beamDroneRumbleDur);
				RumbleManager.rumbleIntensities.AddIfNotContains(RumbleBeamgunDrone, ConfigSettings.beamDroneRumble);
				RumbleManager.rumbleDurations.AddIfNotContains(RumbleBlackHoleCannonFire, ConfigSettings.blackHoleRumbleDur);
				RumbleManager.rumbleIntensities.AddIfNotContains(RumbleBlackHoleCannonFire, ConfigSettings.blackHoleRumble);
				RumbleManager.rumbleDurations.AddIfNotContains(RumbleBlackHoleCannonActivate, ConfigSettings.blackHoleRumbleActivateDur);
				RumbleManager.rumbleIntensities.AddIfNotContains(RumbleBlackHoleCannonActivate, ConfigSettings.blackHoleRumbleActivate);
				RumbleManager.rumbleDurations.AddIfNotContains(RumbleBlackHoleCannonClick, ConfigSettings.blackHoleRumbleClickDur);
				RumbleManager.rumbleIntensities.AddIfNotContains(RumbleBlackHoleCannonClick, ConfigSettings.blackHoleRumbleClick);
			}
		}

		[HarmonyPatch(typeof(Beamgun), "Update")]
		[HarmonyPrefix]
		private static void BeamgunRumble(Beamgun __instance)
		{
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			if (ConfigSettings.rumbleEnabled && (!MonoSingleton<OptionsManager>.Instance.paused || !ConfigSettings.bugfixesEnabled))
			{
				if (!MonoSingleton<InputManager>.Instance.PerformingCheatMenuCombo() && MonoSingleton<InputManager>.Instance.InputSource.Fire1.IsPressed)
				{
					PendingVibration obj = MonoSingleton<RumbleManager>.Instance.SetVibrationTracked(RumbleBeamgunFire, ((Component)__instance.beam).gameObject);
					Vector3 velocity = MonoSingleton<NewMovement>.Instance.rb.velocity;
					obj.intensityMultiplier = (Mathf.Clamp(((Vector3)(ref velocity)).magnitude / 5f, 0.1f, 0.25f) * 10f - 1f) * (ConfigSettings.beamRumbleMult - 1f) / 1.5f + 1f;
				}
				if (MonoSingleton<InputManager>.Instance.InputSource.Fire2.WasPerformedThisFrame)
				{
					MonoSingleton<RumbleManager>.Instance.SetVibration(RumbleBeamgunDrone);
				}
			}
		}

		[HarmonyPatch(typeof(BlackHoleCannon), "Update")]
		[HarmonyPrefix]
		private static void BlackHoleCannonRumble(BlackHoleCannon __instance)
		{
			if (!ConfigSettings.rumbleEnabled || !MonoSingleton<GunControl>.Instance.activated)
			{
				return;
			}
			if (!MonoSingleton<InputManager>.Instance.PerformingCheatMenuCombo() && MonoSingleton<InputManager>.Instance.InputSource.Fire1.WasPerformedThisFrame)
			{
				if (!Object.op_Implicit((Object)(object)__instance.currentbh))
				{
					MonoSingleton<RumbleManager>.Instance.SetVibration(RumbleBlackHoleCannonFire);
				}
				else
				{
					MonoSingleton<RumbleManager>.Instance.SetVibration(RumbleBlackHoleCannonClick);
				}
			}
			BlackHoleProjectile val = default(BlackHoleProjectile);
			if ((Object)(object)__instance.currentbh != (Object)null && MonoSingleton<InputManager>.Instance.InputSource.Fire2.WasPerformedThisFrame && __instance.currentbh.TryGetComponent<BlackHoleProjectile>(ref val) && !val.activated)
			{
				MonoSingleton<RumbleManager>.Instance.SetVibration(RumbleBlackHoleCannonActivate);
			}
		}

		[HarmonyPatch(typeof(BlackHoleCannon), "Start")]
		[HarmonyPrefix]
		private static void BlackHoleCannonNWCCompatibility(BlackHoleCannon __instance)
		{
			((Component)__instance).gameObject.AddComponent<BlackHoleCannonNoCooldownHandler>();
		}
	}
	internal class MuseumWeaponsCheat : ICheat
	{
		private bool active;

		private int createdWeaponsCount;

		private GameObject beamCutter;

		private GameObject blackHoleCannon;

		private const string basePath = "Assets/Prefabs/Weapons/Old/";

		private readonly List<GameObject> weapons = new List<GameObject>();

		public static List<GameObject> weaponSlot => MonoSingleton<GunControl>.Instance.slot6;

		public string LongName => "Museum Weapons";

		public string Identifier => "museumweaponscheat.museum-weapons";

		public string ButtonEnabledOverride => "REMOVE";

		public string ButtonDisabledOverride => "EQUIP";

		public string Icon => "ghost";

		public bool DefaultState => false;

		public StatePersistenceMode PersistenceMode => (StatePersistenceMode)1;

		public bool IsActive => active;

		public void Enable(CheatsManager manager)
		{
			if (!MonoSingleton<CheatsManager>.Instance.GetCheatState("ultrakill.clash-mode"))
			{
				if (!active && createdWeaponsCount > 0)
				{
					DeleteAllMuseumWeapons();
				}
				active = true;
				CreateMuseumWeapons();
			}
		}

		public void Disable()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			active = false;
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).isLoaded)
			{
				DeleteAllMuseumWeapons();
			}
		}

		private void CreateMuseumWeapons()
		{
			//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)
			weapons.Add(CreateWeapon("Assets/Prefabs/Weapons/Old/Beamcutter Blue.prefab", ref beamCutter, isBeamgun: true));
			weapons.Add(CreateWeapon("Assets/Prefabs/Weapons/Old/Black Hole Cannon.prefab", ref blackHoleCannon, isBeamgun: false));
			if (ConfigSettings.bugfixesEnabled && ConfigSettings.blackHoleDualWield)
			{
				WeaponIdentifier val = blackHoleCannon.AddComponent<WeaponIdentifier>();
				val.duplicateOffset = Vector3.zero;
				val.duplicate = false;
			}
		}

		private GameObject CreateWeapon(string address, ref GameObject orig, bool isBeamgun)
		{
			if (orig == null)
			{
				orig = AssetHelper.LoadPrefab(address);
			}
			GameObject val = Object.Instantiate<GameObject>(orig, ((Component)MonoSingleton<GunControl>.Instance).transform);
			weaponSlot.Add(val);
			createdWeaponsCount++;
			MonoSingleton<GunControl>.Instance.UpdateWeaponList(false);
			bool flag = (isBeamgun ? ConfigSettings.beamStyleAndFreshness : ConfigSettings.blackHoleStyleAndFreshness);
			if (ConfigSettings.bugfixesEnabled && flag)
			{
				if (MonoSingleton<StyleHUD>.Instance.weaponFreshness.ContainsKey(orig))
				{
					MonoSingleton<StyleHUD>.Instance.weaponFreshness.Remove(orig);
				}
				MonoSingleton<StyleHUD>.Instance.weaponFreshness.Add(orig, 10f);
			}
			return val;
		}

		private void DeleteAllMuseumWeapons()
		{
			Beamgun val = default(Beamgun);
			if (beamCutter.TryGetComponent<Beamgun>(ref val) && Object.op_Implicit((Object)(object)val.currentBeamDrone))
			{
				Object.Destroy((Object)(object)val.currentBeamDrone);
				val.currentBeamDrone = null;
			}
			foreach (GameObject weapon in weapons)
			{
				if (Object.op_Implicit((Object)(object)MonoSingleton<GunControl>.Instance) && weaponSlot.Contains(weapon))
				{
					weaponSlot.Remove(weapon);
				}
				if (Object.op_Implicit((Object)(object)MonoSingleton<StyleHUD>.Instance) && MonoSingleton<StyleHUD>.Instance.weaponFreshness.ContainsKey(weapon))
				{
					MonoSingleton<StyleHUD>.Instance.weaponFreshness.Remove(weapon);
				}
				Object.Destroy((Object)(object)weapon);
			}
			if (Object.op_Implicit((Object)(object)MonoSingleton<GunControl>.Instance))
			{
				MonoSingleton<GunControl>.Instance.UpdateWeaponList(false);
			}
			weapons.Clear();
			createdWeaponsCount = 0;
		}
	}
	[BepInPlugin("MuseumWeaponsCheat", "Museum Weapons Cheat", "1.0.0")]
	[Harmony]
	public class Plugin : BaseUnityPlugin
	{
		internal static ManualLogSource Logger;

		public static string DefaultParentFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? "";

		internal static PluginConfigurator config;

		private void Awake()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			Logger = ((BaseUnityPlugin)this).Logger;
			Harmony val = new Harmony("MuseumWeaponsCheat");
			val.PatchAll();
			IconController.beamgunIcons.Add(new IconSet("questionMark", vanilla: true));
			IconController.beamgunIcons.Add(new IconSet("Beamcutter"));
			IconController.beamgunIcons.Add(new IconSet("BeamcutterAlt"));
			IconController.beamgunIcons.Add(new IconSet("BeamcutterCannon"));
			IconController.beamgunIcons.Add(new IconSet("BeamcutterRevolver"));
			IconController.beamgunIcons.Add(new IconSet("BeamcutterRevolverSlab"));
			IconController.blackHoleIcons.Add(new IconSet("questionMark", vanilla: true));
			IconController.blackHoleIcons.Add(new IconSet("Blackhole"));
			IconController.blackHoleIcons.Add(new IconSet("BlackholeAlt"));
			IconController.blackHoleIcons.Add(new IconSet("BlackholeBeamgun"));
			IconController.blackHoleIcons.Add(new IconSet("BlackholeShotgun"));
			IconController.blackHoleIcons.Add(new IconSet("BlackholeHammer"));
			SceneManager.activeSceneChanged += MiscChanges.SetupRumble;
			config = PluginConfig.CreatePluginConfig();
			Logger.LogInfo((object)"Plugin MuseumWeaponsCheat is loaded!");
		}

		public static GameObject GetWeaponKey(string key)
		{
			foreach (GameObject key2 in MonoSingleton<StyleHUD>.Instance.weaponFreshness.Keys)
			{
				if ((Object)(object)key2 != (Object)null && ((Object)key2).name.Contains(key))
				{
					return key2;
				}
			}
			return null;
		}

		[HarmonyPatch(typeof(CheatsManager), "Start")]
		[HarmonyPostfix]
		public static void RegisterNewCheats()
		{
			MuseumWeaponsCheat museumWeaponsCheat = new MuseumWeaponsCheat();
			MonoSingleton<CheatsManager>.Instance.RegisterCheat((ICheat)(object)museumWeaponsCheat, "weapons");
			Dictionary<string, List<ICheat>> dictionary = new Dictionary<string, List<ICheat>>();
			List<ICheat> value = new List<ICheat>(1) { (ICheat)(object)museumWeaponsCheat };
			dictionary.Add("WEAPONS", value);
			MonoSingleton<CheatBinds>.Instance.RestoreBinds(dictionary);
			MonoSingleton<CheatsManager>.Instance.RebuildMenu();
			Logger.LogInfo((object)"Registered MuseumWeaponsCheat");
		}

		[HarmonyPatch(typeof(WeaponIcon), "UpdateIcon")]
		[HarmonyPrefix]
		private static void ReplaceQuestionMarkIcons(WeaponIcon __instance)
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			if (MonoSingleton<GunControl>.Instance != null && MonoSingleton<GunControl>.Instance.currentWeapon != null && __instance != null)
			{
				if (((Object)__instance).name.Contains("Beamcutter Blue"))
				{
					__instance.SetIcons((int)ConfigSettings.beamgunIcon, IconController.beamgunIcons, ConfigSettings.beamgunColor, ConfigSettings.glowEnabled);
				}
				else if (((Object)__instance).name.Contains("Black Hole Cannon"))
				{
					__instance.SetIcons((int)ConfigSettings.blackholegunIcon, IconController.blackHoleIcons, ConfigSettings.blackholegunColor, ConfigSettings.glowEnabled2);
				}
			}
		}
	}
	internal static class PluginConfig
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static BoolValueChangeEventDelegate <>9__1_0;

			public static EnumValueChangeEventDelegate<IconEnums.BeamgunIcons> <>9__1_1;

			public static EnumValueChangeEventDelegate<WeaponVariant> <>9__1_2;

			public static BoolValueChangeEventDelegate <>9__1_3;

			public static EnumValueChangeEventDelegate<IconEnums.BlackHoleIcons> <>9__1_4;

			public static EnumValueChangeEventDelegate<WeaponVariant> <>9__1_5;

			public static FloatValueChangeEventDelegate <>9__1_8;

			public static BoolValueChangeEventDelegate <>9__1_9;

			public static FloatValueChangeEventDelegate <>9__1_10;

			public static BoolValueChangeEventDelegate <>9__1_11;

			public static FloatValueChangeEventDelegate <>9__1_12;

			public static BoolValueChangeEventDelegate <>9__1_13;

			public static BoolValueChangeEventDelegate <>9__1_14;

			public static BoolValueChangeEventDelegate <>9__1_15;

			public static FloatValueChangeEventDelegate <>9__1_16;

			public static FloatValueChangeEventDelegate <>9__1_17;

			public static BoolValueChangeEventDelegate <>9__1_18;

			public static FloatValueChangeEventDelegate <>9__1_20;

			public static FloatValueChangeEventDelegate <>9__1_21;

			public static FloatValueChangeEventDelegate <>9__1_22;

			public static FloatValueChangeEventDelegate <>9__1_23;

			public static FloatValueChangeEventDelegate <>9__1_24;

			public static FloatValueChangeEventDelegate <>9__1_25;

			public static FloatValueChangeEventDelegate <>9__1_26;

			public static FloatValueChangeEventDelegate <>9__1_27;

			public static FloatValueChangeEventDelegate <>9__1_28;

			public static FloatValueChangeEventDelegate <>9__1_29;

			public static BoolValueChangeEventDelegate <>9__1_30;

			public static BoolValueChangeEventDelegate <>9__1_31;

			public static BoolValueChangeEventDelegate <>9__1_32;

			public static BoolValueChangeEventDelegate <>9__1_33;

			public static BoolValueChangeEventDelegate <>9__1_34;

			internal void <CreatePluginConfig>b__1_0(BoolValueChangeEvent e)
			{
				ConfigSettings.glowEnabled = e.value;
			}

			internal void <CreatePluginConfig>b__1_1(EnumValueChangeEvent<IconEnums.BeamgunIcons> e)
			{
				ConfigSettings.beamgunIcon = e.value;
			}

			internal void <CreatePluginConfig>b__1_2(EnumValueChangeEvent<WeaponVariant> e)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				ConfigSettings.beamgunColor = e.value;
			}

			internal void <CreatePluginConfig>b__1_3(BoolValueChangeEvent e)
			{
				ConfigSettings.glowEnabled2 = e.value;
			}

			internal void <CreatePluginConfig>b__1_4(EnumValueChangeEvent<IconEnums.BlackHoleIcons> e)
			{
				ConfigSettings.blackholegunIcon = e.value;
			}

			internal void <CreatePluginConfig>b__1_5(EnumValueChangeEvent<WeaponVariant> e)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				ConfigSettings.blackholegunColor = e.value;
			}

			internal void <CreatePluginConfig>b__1_8(FloatValueChangeEvent e)
			{
				ConfigSettings.beamgunStyleMult = e.value;
				MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict["syla.beamgun"] = e.value;
			}

			internal void <CreatePluginConfig>b__1_9(BoolValueChangeEvent e)
			{
				ConfigSettings.beamSlicedStyle = e.value;
			}

			internal void <CreatePluginConfig>b__1_10(FloatValueChangeEvent e)
			{
				ConfigSettings.beamgunSlicedStyleMult = e.value;
				MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict["syla.singlebeamdeath"] = e.value;
			}

			internal void <CreatePluginConfig>b__1_11(BoolValueChangeEvent e)
			{
				ConfigSettings.beamDicedStyle = e.value;
			}

			internal void <CreatePluginConfig>b__1_12(FloatValueChangeEvent e)
			{
				ConfigSettings.beamgunDicedStyleMult = e.value;
				MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict["syla.doublebeamdeath"] = e.value;
			}

			internal void <CreatePluginConfig>b__1_13(BoolValueChangeEvent e)
			{
				ConfigSettings.beamPauseBug = e.value;
			}

			internal void <CreatePluginConfig>b__1_14(BoolValueChangeEvent e)
			{
				ConfigSettings.beamDroneDupe = e.value;
			}

			internal void <CreatePluginConfig>b__1_15(BoolValueChangeEvent e)
			{
				ConfigSettings.blackHoleStyleAndFreshness = e.value;
			}

			internal void <CreatePluginConfig>b__1_16(FloatValueChangeEvent e)
			{
				ConfigSettings.blackHoleStyleMult = e.value;
				MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict["syla.blackholeguntick"] = e.value;
			}

			internal void <CreatePluginConfig>b__1_17(FloatValueChangeEvent e)
			{
				ConfigSettings.blackHoleStyleMult2 = e.value;
				MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict["secret"] = e.value;
			}

			internal void <CreatePluginConfig>b__1_18(BoolValueChangeEvent e)
			{
				ConfigSettings.blackHoleDualWield = e.value;
			}

			internal void <CreatePluginConfig>b__1_20(FloatValueChangeEvent e)
			{
				ConfigSettings.beamRumble = e.value;
				RumbleManager.rumbleIntensities[MiscChanges.RumbleBeamgunFire] = e.value;
			}

			internal void <CreatePluginConfig>b__1_21(FloatValueChangeEvent e)
			{
				ConfigSettings.beamRumbleMult = e.value;
			}

			internal void <CreatePluginConfig>b__1_22(FloatValueChangeEvent e)
			{
				ConfigSettings.beamDroneRumble = e.value;
				RumbleManager.rumbleIntensities[MiscChanges.RumbleBeamgunDrone] = e.value;
			}

			internal void <CreatePluginConfig>b__1_23(FloatValueChangeEvent e)
			{
				ConfigSettings.beamDroneRumbleDur = e.value;
				RumbleManager.rumbleDurations[MiscChanges.RumbleBeamgunDrone] = e.value;
			}

			internal void <CreatePluginConfig>b__1_24(FloatValueChangeEvent e)
			{
				ConfigSettings.blackHoleRumble = e.value;
				RumbleManager.rumbleIntensities[MiscChanges.RumbleBlackHoleCannonFire] = e.value;
			}

			internal void <CreatePluginConfig>b__1_25(FloatValueChangeEvent e)
			{
				ConfigSettings.blackHoleRumbleDur = e.value;
				RumbleManager.rumbleDurations[MiscChanges.RumbleBlackHoleCannonFire] = e.value;
			}

			internal void <CreatePluginConfig>b__1_26(FloatValueChangeEvent e)
			{
				ConfigSettings.blackHoleRumbleActivate = e.value;
				RumbleManager.rumbleIntensities[MiscChanges.RumbleBlackHoleCannonActivate] = e.value;
			}

			internal void <CreatePluginConfig>b__1_27(FloatValueChangeEvent e)
			{
				ConfigSettings.blackHoleRumbleActivateDur = e.value;
				RumbleManager.rumbleDurations[MiscChanges.RumbleBlackHoleCannonActivate] = e.value;
			}

			internal void <CreatePluginConfig>b__1_28(FloatValueChangeEvent e)
			{
				ConfigSettings.blackHoleRumbleClick = e.value;
				RumbleManager.rumbleIntensities[MiscChanges.RumbleBlackHoleCannonClick] = e.value;
			}

			internal void <CreatePluginConfig>b__1_29(FloatValueChangeEvent e)
			{
				ConfigSettings.blackHoleRumbleClickDur = e.value;
				RumbleManager.rumbleDurations[MiscChanges.RumbleBlackHoleCannonClick] = e.value;
			}

			internal void <CreatePluginConfig>b__1_30(BoolValueChangeEvent e)
			{
				ConfigSettings.beamLight = e.value;
			}

			internal void <CreatePluginConfig>b__1_31(BoolValueChangeEvent e)
			{
				ConfigSettings.beamSFX = e.value;
			}

			internal void <CreatePluginConfig>b__1_32(BoolValueChangeEvent e)
			{
				ConfigSettings.droneDespawn = e.value;
			}

			internal void <CreatePluginConfig>b__1_33(BoolValueChangeEvent e)
			{
				ConfigSettings.blackHoleNWC = e.value;
			}

			internal void <CreatePluginConfig>b__1_34(BoolValueChangeEvent e)
			{
				ConfigSettings.blackHoleIgnoresMaurice = e.value;
			}
		}

		public static string DefaultParentFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? "";

		public static PluginConfigurator CreatePluginConfig()
		{
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Expected O, but got Unknown
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Expected O, but got Unknown
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Expected O, but got Unknown
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Expected O, but got Unknown
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Expected O, but got Unknown
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Expected O, but got Unknown
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Expected O, but got Unknown
			//IL_029a: Unknown result type (might be due to invalid IL or missing references)
			//IL_029f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: Expected O, but got Unknown
			//IL_02c2: 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_02e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02eb: Expected O, but got Unknown
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fd: Expected O, but got Unknown
			//IL_0306: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Expected O, but got Unknown
			//IL_032a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Expected O, but got Unknown
			//IL_0354: Unknown result type (might be due to invalid IL or missing references)
			//IL_035e: Expected O, but got Unknown
			//IL_0367: Unknown result type (might be due to invalid IL or missing references)
			//IL_0371: Expected O, but got Unknown
			//IL_0393: Unknown result type (might be due to invalid IL or missing references)
			//IL_039a: Expected O, but got Unknown
			//IL_03de: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e5: Expected O, but got Unknown
			//IL_03b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bb: Expected O, but got Unknown
			//IL_042d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0434: Expected O, but got Unknown
			//IL_03fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0400: Unknown result type (might be due to invalid IL or missing references)
			//IL_0406: Expected O, but got Unknown
			//IL_0478: Unknown result type (might be due to invalid IL or missing references)
			//IL_047f: Expected O, but got Unknown
			//IL_044a: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0455: Expected O, but got Unknown
			//IL_04c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ce: Expected O, but got Unknown
			//IL_0495: Unknown result type (might be due to invalid IL or missing references)
			//IL_049a: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Expected O, but got Unknown
			//IL_0512: Unknown result type (might be due to invalid IL or missing references)
			//IL_0519: Expected O, but got Unknown
			//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ef: Expected O, but got Unknown
			//IL_055d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0564: Expected O, but got Unknown
			//IL_052f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0534: Unknown result type (might be due to invalid IL or missing references)
			//IL_053a: Expected O, but got Unknown
			//IL_05a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c2: Expected O, but got Unknown
			//IL_057a: 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: Expected O, but got Unknown
			//IL_060a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0611: Expected O, but got Unknown
			//IL_05d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e3: Expected O, but got Unknown
			//IL_0659: Unknown result type (might be due to invalid IL or missing references)
			//IL_0660: Expected O, but got Unknown
			//IL_0627: Unknown result type (might be due to invalid IL or missing references)
			//IL_062c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0632: Expected O, but got Unknown
			//IL_06a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ab: Expected O, but got Unknown
			//IL_0676: Unknown result type (might be due to invalid IL or missing references)
			//IL_067b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0681: Expected O, but got Unknown
			//IL_06ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f5: Expected O, but got Unknown
			//IL_06fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_070b: Unknown result type (might be due to invalid IL or missing references)
			//IL_071d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0724: Expected O, but got Unknown
			//IL_072b: Unknown result type (might be due to invalid IL or missing references)
			//IL_073a: Unknown result type (might be due to invalid IL or missing references)
			//IL_074d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0754: Expected O, but got Unknown
			//IL_075c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0766: Expected O, but got Unknown
			//IL_076f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0779: Expected O, but got Unknown
			//IL_0793: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b5: Expected O, but got Unknown
			//IL_06c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cc: Expected O, but got Unknown
			//IL_0815: Unknown result type (might be due to invalid IL or missing references)
			//IL_081c: Expected O, but got Unknown
			//IL_07e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ee: Expected O, but got Unknown
			//IL_0864: Unknown result type (might be due to invalid IL or missing references)
			//IL_086b: Expected O, but got Unknown
			//IL_0832: Unknown result type (might be due to invalid IL or missing references)
			//IL_0837: Unknown result type (might be due to invalid IL or missing references)
			//IL_083d: Expected O, but got Unknown
			//IL_08cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d2: Expected O, but got Unknown
			//IL_0899: Unknown result type (might be due to invalid IL or missing references)
			//IL_089e: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a4: Expected O, but got Unknown
			//IL_092a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0945: Unknown result type (might be due to invalid IL or missing references)
			//IL_094c: Expected O, but got Unknown
			//IL_0900: Unknown result type (might be due to invalid IL or missing references)
			//IL_0905: Unknown result type (might be due to invalid IL or missing references)
			//IL_090b: Expected O, but got Unknown
			//IL_09ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b3: Expected O, but got Unknown
			//IL_097a: Unknown result type (might be due to invalid IL or missing references)
			//IL_097f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0985: Expected O, but got Unknown
			//IL_0a13: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1a: Expected O, but got Unknown
			//IL_09e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ec: Expected O, but got Unknown
			//IL_0a7a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a81: Expected O, but got Unknown
			//IL_0a48: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a53: Expected O, but got Unknown
			//IL_0ae1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae8: Expected O, but got Unknown
			//IL_0aaf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aba: Expected O, but got Unknown
			//IL_0b48: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b4f: Expected O, but got Unknown
			//IL_0b16: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b1b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b21: Expected O, but got Unknown
			//IL_0ba3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bbd: Expected O, but got Unknown
			//IL_0b7d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b82: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b88: Expected O, but got Unknown
			//IL_0bfd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c04: Expected O, but got Unknown
			//IL_0bd3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bd8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bde: Expected O, but got Unknown
			//IL_0c44: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c4b: Expected O, but got Unknown
			//IL_0c1a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c1f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c25: Expected O, but got Unknown
			//IL_0c87: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c9a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca1: Expected O, but got Unknown
			//IL_0c61: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c6c: Expected O, but got Unknown
			//IL_0ce1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce8: Expected O, but got Unknown
			//IL_0cb7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cc2: Expected O, but got Unknown
			//IL_0cfe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d03: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d09: Expected O, but got Unknown
			PluginConfigurator val = PluginConfigurator.Create("Museum Weapons Config", "MuseumWeaponsConfig");
			val.SetIconWithURL(Path.Combine(DefaultParentFolder, "icon.png") ?? "");
			val.TryAddPreset("built-in-vanilla", "Vanilla", Path.Combine(DefaultParentFolder, "vanilla.config"));
			val.TryAddPreset("built-in-recommended", "Recommended", Path.Combine(DefaultParentFolder, "recommended.config"));
			new ConfigSpace(val.rootPanel, 5f);
			ConfigPanel val2 = new ConfigPanel(val.rootPanel, "Icons Config", "iconsPanel");
			new ConfigSpace(val2, 5f);
			new ConfigHeader(val2, "Beamcutter", 24);
			BoolField val3 = new BoolField(val2, "Icon Glow Enabled", "glowEnabled", true);
			ConfigDivision val4 = new ConfigDivision(val2, "iconsDiv");
			object obj = <>c.<>9__1_0;
			if (obj == null)
			{
				BoolValueChangeEventDelegate val5 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.glowEnabled = e.value;
				};
				<>c.<>9__1_0 = val5;
				obj = (object)val5;
			}
			val3.onValueChange += (BoolValueChangeEventDelegate)obj;
			ConfigSettings.glowEnabled = val3.value;
			EnumField<IconEnums.BeamgunIcons> val6 = new EnumField<IconEnums.BeamgunIcons>((ConfigPanel)(object)val4, "Icon", "beamgunIcon", IconEnums.BeamgunIcons.beamgun);
			IconEnums.IconStrings(val6);
			val6.onValueChange += delegate(EnumValueChangeEvent<IconEnums.BeamgunIcons> e)
			{
				ConfigSettings.beamgunIcon = e.value;
			};
			ConfigSettings.beamgunIcon = val6.value;
			EnumField<WeaponVariant> val7 = new EnumField<WeaponVariant>((ConfigPanel)(object)val4, "Icon Color", "beamgunColor", (WeaponVariant)0);
			SetWeaponVariantDisplayNames(val7);
			val7.onValueChange += delegate(EnumValueChangeEvent<WeaponVariant> e)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				ConfigSettings.beamgunColor = e.value;
			};
			ConfigSettings.beamgunColor = val7.value;
			new ConfigHeader(val2, "Black Hole Cannon", 24);
			BoolField val8 = new BoolField(val2, "Icon Glow Enabled", "glowEnabled2", true);
			ConfigDivision val9 = new ConfigDivision(val2, "iconsDiv");
			object obj2 = <>c.<>9__1_3;
			if (obj2 == null)
			{
				BoolValueChangeEventDelegate val10 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.glowEnabled2 = e.value;
				};
				<>c.<>9__1_3 = val10;
				obj2 = (object)val10;
			}
			val8.onValueChange += (BoolValueChangeEventDelegate)obj2;
			ConfigSettings.glowEnabled2 = val8.value;
			EnumField<IconEnums.BlackHoleIcons> val11 = new EnumField<IconEnums.BlackHoleIcons>((ConfigPanel)(object)val9, "Icon", "blackholegunIcon", IconEnums.BlackHoleIcons.blackHole);
			IconEnums.IconStrings(val11);
			val11.onValueChange += delegate(EnumValueChangeEvent<IconEnums.BlackHoleIcons> e)
			{
				ConfigSettings.blackholegunIcon = e.value;
			};
			ConfigSettings.blackholegunIcon = val11.value;
			EnumField<WeaponVariant> val12 = new EnumField<WeaponVariant>((ConfigPanel)(object)val9, "Icon Color", "blackholegunColor", (WeaponVariant)2);
			SetWeaponVariantDisplayNames(val12);
			val12.onValueChange += delegate(EnumValueChangeEvent<WeaponVariant> e)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				ConfigSettings.blackholegunColor = e.value;
			};
			ConfigSettings.blackholegunColor = val12.value;
			ConfigPanel val13 = new ConfigPanel(val.rootPanel, "Bugfixes Config", "bugfixPanel");
			new ConfigSpace(val13, 5f);
			new ConfigHeader(val13, "General", 24);
			BoolField val14 = new BoolField(val13, "Bugfixes Enabled", "bugfixesEnabled", true);
			ConfigDivision bugfixDiv = new ConfigDivision(val13, "bugfixesDiv");
			val14.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e)
			{
				ConfigSettings.bugfixesEnabled = e.value;
				((ConfigField)bugfixDiv).interactable = e.value;
			};
			ConfigSettings.bugfixesEnabled = val14.value;
			new ConfigHeader((ConfigPanel)(object)bugfixDiv, "Beamcutter", 24);
			BoolField val15 = new BoolField((ConfigPanel)(object)bugfixDiv, "Fix Style/Freshness", "beamStyleAndFreshness", true);
			ConfigDivision beamSVDiv = new ConfigDivision((ConfigPanel)(object)bugfixDiv, "beamSVDiv");
			val15.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e)
			{
				ConfigSettings.beamStyleAndFreshness = e.value;
				((ConfigField)beamSVDiv).interactable = e.value;
			};
			ConfigSettings.beamStyleAndFreshness = val15.value;
			FloatField val16 = new FloatField((ConfigPanel)(object)beamSVDiv, "Tick Freshness Multiplier", "beamStyleMult", 0.05f);
			object obj3 = <>c.<>9__1_8;
			if (obj3 == null)
			{
				FloatValueChangeEventDelegate val17 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.beamgunStyleMult = e.value;
					MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict["syla.beamgun"] = e.value;
				};
				<>c.<>9__1_8 = val17;
				obj3 = (object)val17;
			}
			val16.onValueChange += (FloatValueChangeEventDelegate)obj3;
			ConfigSettings.beamgunStyleMult = val16.value;
			BoolField val18 = new BoolField((ConfigPanel)(object)beamSVDiv, "+SLICED Style Bonus", "beamSlicedStyle", true);
			object obj4 = <>c.<>9__1_9;
			if (obj4 == null)
			{
				BoolValueChangeEventDelegate val19 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.beamSlicedStyle = e.value;
				};
				<>c.<>9__1_9 = val19;
				obj4 = (object)val19;
			}
			val18.onValueChange += (BoolValueChangeEventDelegate)obj4;
			ConfigSettings.beamSlicedStyle = val18.value;
			FloatField val20 = new FloatField((ConfigPanel)(object)beamSVDiv, "+SLICED Freshness Multiplier", "beamSlicedStyleMult", 0.3f);
			object obj5 = <>c.<>9__1_10;
			if (obj5 == null)
			{
				FloatValueChangeEventDelegate val21 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.beamgunSlicedStyleMult = e.value;
					MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict["syla.singlebeamdeath"] = e.value;
				};
				<>c.<>9__1_10 = val21;
				obj5 = (object)val21;
			}
			val20.onValueChange += (FloatValueChangeEventDelegate)obj5;
			ConfigSettings.beamgunSlicedStyleMult = val20.value;
			BoolField val22 = new BoolField((ConfigPanel)(object)beamSVDiv, "+DICED Style Bonus", "beamDicedStyle", true);
			object obj6 = <>c.<>9__1_11;
			if (obj6 == null)
			{
				BoolValueChangeEventDelegate val23 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.beamDicedStyle = e.value;
				};
				<>c.<>9__1_11 = val23;
				obj6 = (object)val23;
			}
			val22.onValueChange += (BoolValueChangeEventDelegate)obj6;
			ConfigSettings.beamDicedStyle = val22.value;
			FloatField val24 = new FloatField((ConfigPanel)(object)beamSVDiv, "+DICED Freshness Multiplier", "beamDicedStyleMult", 0.3f);
			object obj7 = <>c.<>9__1_12;
			if (obj7 == null)
			{
				FloatValueChangeEventDelegate val25 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.beamgunDicedStyleMult = e.value;
					MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict["syla.doublebeamdeath"] = e.value;
				};
				<>c.<>9__1_12 = val25;
				obj7 = (object)val25;
			}
			val24.onValueChange += (FloatValueChangeEventDelegate)obj7;
			ConfigSettings.beamgunDicedStyleMult = val24.value;
			BoolField val26 = new BoolField((ConfigPanel)(object)bugfixDiv, "Fix Primary Fire while Paused", "beamFixPauseBug", true);
			object obj8 = <>c.<>9__1_13;
			if (obj8 == null)
			{
				BoolValueChangeEventDelegate val27 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.beamPauseBug = e.value;
				};
				<>c.<>9__1_13 = val27;
				obj8 = (object)val27;
			}
			val26.onValueChange += (BoolValueChangeEventDelegate)obj8;
			ConfigSettings.beamPauseBug = val26.value;
			BoolField val28 = new BoolField((ConfigPanel)(object)bugfixDiv, "Fix Dual Wield Drone Dupe", "beamFixDroneDupe", true);
			object obj9 = <>c.<>9__1_14;
			if (obj9 == null)
			{
				BoolValueChangeEventDelegate val29 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.beamDroneDupe = e.value;
				};
				<>c.<>9__1_14 = val29;
				obj9 = (object)val29;
			}
			val28.onValueChange += (BoolValueChangeEventDelegate)obj9;
			ConfigSettings.beamDroneDupe = val28.value;
			new ConfigHeader((ConfigPanel)(object)bugfixDiv, "Black Hole Cannon", 24);
			BoolField val30 = new BoolField((ConfigPanel)(object)bugfixDiv, "Fix Style/Freshness", "blackHoleEnableStyleAndFreshnessField", true);
			object obj10 = <>c.<>9__1_15;
			if (obj10 == null)
			{
				BoolValueChangeEventDelegate val31 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.blackHoleStyleAndFreshness = e.value;
				};
				<>c.<>9__1_15 = val31;
				obj10 = (object)val31;
			}
			val30.onValueChange += (BoolValueChangeEventDelegate)obj10;
			ConfigSettings.blackHoleStyleAndFreshness = val30.value;
			FloatField val32 = new FloatField((ConfigPanel)(object)bugfixDiv, "Compressed Freshness Mult.", "holeStyleMult2", 1f);
			object obj11 = <>c.<>9__1_16;
			if (obj11 == null)
			{
				FloatValueChangeEventDelegate val33 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.blackHoleStyleMult = e.value;
					MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict["syla.blackholeguntick"] = e.value;
				};
				<>c.<>9__1_16 = val33;
				obj11 = (object)val33;
			}
			val32.onValueChange += (FloatValueChangeEventDelegate)obj11;
			ConfigSettings.blackHoleStyleMult = val32.value;
			FloatField val34 = new FloatField((ConfigPanel)(object)bugfixDiv, "Tick Freshness Multiplier", "holeStyleMult", 0.1f);
			object obj12 = <>c.<>9__1_17;
			if (obj12 == null)
			{
				FloatValueChangeEventDelegate val35 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.blackHoleStyleMult2 = e.value;
					MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict["secret"] = e.value;
				};
				<>c.<>9__1_17 = val35;
				obj12 = (object)val35;
			}
			val34.onValueChange += (FloatValueChangeEventDelegate)obj12;
			ConfigSettings.blackHoleStyleMult2 = val34.value;
			BoolField val36 = new BoolField((ConfigPanel)(object)bugfixDiv, "Fix Inability to Dual Wield", "blackHoleFixDualWield", true);
			object obj13 = <>c.<>9__1_18;
			if (obj13 == null)
			{
				BoolValueChangeEventDelegate val37 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.blackHoleDualWield = e.value;
				};
				<>c.<>9__1_18 = val37;
				obj13 = (object)val37;
			}
			val36.onValueChange += (BoolValueChangeEventDelegate)obj13;
			ConfigSettings.blackHoleDualWield = val36.value;
			ConfigPanel val38 = new ConfigPanel(val.rootPanel, "Misc Config", "miscPanel");
			new ConfigSpace(val38, 5f);
			new ConfigHeader(val38, "General", 24);
			ConfigPanel val39 = new ConfigPanel(val38, "Rumble Config", "rumblePanel");
			new ConfigSpace(val39, 5f);
			new ConfigHeader(val39, "General", 24);
			BoolField val40 = new BoolField(val39, "Rumble Enabled", "rumbleEnabled", true);
			ConfigDivision rumbleDiv = new ConfigDivision(val39, "rumbleDiv");
			val40.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e)
			{
				ConfigSettings.rumbleEnabled = e.value;
				((ConfigField)rumbleDiv).interactable = e.value;
			};
			ConfigSettings.rumbleEnabled = val40.value;
			new ConfigHeader((ConfigPanel)(object)rumbleDiv, "Beamcutter", 24);
			FloatField val41 = new FloatField((ConfigPanel)(object)rumbleDiv, "Fire Intensity", "beamRumbleFireInt", 0.1f);
			val41.minimumValue = 0f;
			val41.maximumValue = 1f;
			object obj14 = <>c.<>9__1_20;
			if (obj14 == null)
			{
				FloatValueChangeEventDelegate val42 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.beamRumble = e.value;
					RumbleManager.rumbleIntensities[MiscChanges.RumbleBeamgunFire] = e.value;
				};
				<>c.<>9__1_20 = val42;
				obj14 = (object)val42;
			}
			val41.onValueChange += (FloatValueChangeEventDelegate)obj14;
			ConfigSettings.beamRumble = val41.value;
			FloatField val43 = new FloatField((ConfigPanel)(object)rumbleDiv, "Fire Speed Multiplier", "beamRumbleFireMult", 1.5f);
			object obj15 = <>c.<>9__1_21;
			if (obj15 == null)
			{
				FloatValueChangeEventDelegate val44 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.beamRumbleMult = e.value;
				};
				<>c.<>9__1_21 = val44;
				obj15 = (object)val44;
			}
			val43.onValueChange += (FloatValueChangeEventDelegate)obj15;
			ConfigSettings.beamRumbleMult = val43.value;
			FloatField val45 = new FloatField((ConfigPanel)(object)rumbleDiv, "Drone Deploy Intensity", "beamDroneRumbleFireInt", 0.1f);
			val45.minimumValue = 0f;
			val45.maximumValue = 1f;
			object obj16 = <>c.<>9__1_22;
			if (obj16 == null)
			{
				FloatValueChangeEventDelegate val46 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.beamDroneRumble = e.value;
					RumbleManager.rumbleIntensities[MiscChanges.RumbleBeamgunDrone] = e.value;
				};
				<>c.<>9__1_22 = val46;
				obj16 = (object)val46;
			}
			val45.onValueChange += (FloatValueChangeEventDelegate)obj16;
			ConfigSettings.beamDroneRumble = val45.value;
			FloatField val47 = new FloatField((ConfigPanel)(object)rumbleDiv, "Drone Deploy Duration", "beamDroneRumbleFireDur", 0.1f);
			val47.minimumValue = 0f;
			val47.maximumValue = 4f;
			object obj17 = <>c.<>9__1_23;
			if (obj17 == null)
			{
				FloatValueChangeEventDelegate val48 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.beamDroneRumbleDur = e.value;
					RumbleManager.rumbleDurations[MiscChanges.RumbleBeamgunDrone] = e.value;
				};
				<>c.<>9__1_23 = val48;
				obj17 = (object)val48;
			}
			val47.onValueChange += (FloatValueChangeEventDelegate)obj17;
			ConfigSettings.beamDroneRumbleDur = val47.value;
			new ConfigHeader((ConfigPanel)(object)rumbleDiv, "Black Hole Cannon", 24);
			FloatField val49 = new FloatField((ConfigPanel)(object)rumbleDiv, "Fire Intensity", "blackHoleRumbleFireInt", 0.8f);
			val49.minimumValue = 0f;
			val49.maximumValue = 1f;
			object obj18 = <>c.<>9__1_24;
			if (obj18 == null)
			{
				FloatValueChangeEventDelegate val50 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.blackHoleRumble = e.value;
					RumbleManager.rumbleIntensities[MiscChanges.RumbleBlackHoleCannonFire] = e.value;
				};
				<>c.<>9__1_24 = val50;
				obj18 = (object)val50;
			}
			val49.onValueChange += (FloatValueChangeEventDelegate)obj18;
			ConfigSettings.blackHoleRumble = val49.value;
			FloatField val51 = new FloatField((ConfigPanel)(object)rumbleDiv, "Fire Duration", "blackHoleRumbleFireDur", 0.4f);
			val51.minimumValue = 0f;
			val51.maximumValue = 4f;
			object obj19 = <>c.<>9__1_25;
			if (obj19 == null)
			{
				FloatValueChangeEventDelegate val52 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.blackHoleRumbleDur = e.value;
					RumbleManager.rumbleDurations[MiscChanges.RumbleBlackHoleCannonFire] = e.value;
				};
				<>c.<>9__1_25 = val52;
				obj19 = (object)val52;
			}
			val51.onValueChange += (FloatValueChangeEventDelegate)obj19;
			ConfigSettings.blackHoleRumbleDur = val51.value;
			FloatField val53 = new FloatField((ConfigPanel)(object)rumbleDiv, "Activate Intensity", "blackHoleRumbleActInt", 0.65f);
			val53.minimumValue = 0f;
			val53.maximumValue = 1f;
			object obj20 = <>c.<>9__1_26;
			if (obj20 == null)
			{
				FloatValueChangeEventDelegate val54 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.blackHoleRumbleActivate = e.value;
					RumbleManager.rumbleIntensities[MiscChanges.RumbleBlackHoleCannonActivate] = e.value;
				};
				<>c.<>9__1_26 = val54;
				obj20 = (object)val54;
			}
			val53.onValueChange += (FloatValueChangeEventDelegate)obj20;
			ConfigSettings.blackHoleRumbleActivate = val53.value;
			FloatField val55 = new FloatField((ConfigPanel)(object)rumbleDiv, "Activate Duration", "blackHoleRumbleActDur", 0.2f);
			val55.minimumValue = 0f;
			val55.maximumValue = 4f;
			object obj21 = <>c.<>9__1_27;
			if (obj21 == null)
			{
				FloatValueChangeEventDelegate val56 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.blackHoleRumbleActivateDur = e.value;
					RumbleManager.rumbleDurations[MiscChanges.RumbleBlackHoleCannonActivate] = e.value;
				};
				<>c.<>9__1_27 = val56;
				obj21 = (object)val56;
			}
			val55.onValueChange += (FloatValueChangeEventDelegate)obj21;
			ConfigSettings.blackHoleRumbleActivateDur = val55.value;
			FloatField val57 = new FloatField((ConfigPanel)(object)rumbleDiv, "Click Intensity", "blackHoleRumbleClickInt", 0.1f);
			val57.minimumValue = 0f;
			val57.maximumValue = 1f;
			object obj22 = <>c.<>9__1_28;
			if (obj22 == null)
			{
				FloatValueChangeEventDelegate val58 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.blackHoleRumbleClick = e.value;
					RumbleManager.rumbleIntensities[MiscChanges.RumbleBlackHoleCannonClick] = e.value;
				};
				<>c.<>9__1_28 = val58;
				obj22 = (object)val58;
			}
			val57.onValueChange += (FloatValueChangeEventDelegate)obj22;
			ConfigSettings.blackHoleRumbleClick = val57.value;
			FloatField val59 = new FloatField((ConfigPanel)(object)rumbleDiv, "Click Duration", "blackHoleRumbleClickDur", 0.1f);
			val59.minimumValue = 0f;
			val59.maximumValue = 4f;
			object obj23 = <>c.<>9__1_29;
			if (obj23 == null)
			{
				FloatValueChangeEventDelegate val60 = delegate(FloatValueChangeEvent e)
				{
					ConfigSettings.blackHoleRumbleClickDur = e.value;
					RumbleManager.rumbleDurations[MiscChanges.RumbleBlackHoleCannonClick] = e.value;
				};
				<>c.<>9__1_29 = val60;
				obj23 = (object)val60;
			}
			val59.onValueChange += (FloatValueChangeEventDelegate)obj23;
			ConfigSettings.blackHoleRumbleClickDur = val59.value;
			new ConfigHeader(val38, "Beamcutter", 24);
			BoolField val61 = new BoolField(val38, "Beam Light", "beamLight", true);
			object obj24 = <>c.<>9__1_30;
			if (obj24 == null)
			{
				BoolValueChangeEventDelegate val62 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.beamLight = e.value;
				};
				<>c.<>9__1_30 = val62;
				obj24 = (object)val62;
			}
			val61.onValueChange += (BoolValueChangeEventDelegate)obj24;
			ConfigSettings.beamLight = val61.value;
			BoolField val63 = new BoolField(val38, "Beamcutter SFX", "beamSFX", true);
			object obj25 = <>c.<>9__1_31;
			if (obj25 == null)
			{
				BoolValueChangeEventDelegate val64 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.beamSFX = e.value;
				};
				<>c.<>9__1_31 = val64;
				obj25 = (object)val64;
			}
			val63.onValueChange += (BoolValueChangeEventDelegate)obj25;
			ConfigSettings.beamSFX = val63.value;
			BoolField val65 = new BoolField(val38, "Respawning Despawns Drones", "droneDespawn", true);
			object obj26 = <>c.<>9__1_32;
			if (obj26 == null)
			{
				BoolValueChangeEventDelegate val66 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.droneDespawn = e.value;
				};
				<>c.<>9__1_32 = val66;
				obj26 = (object)val66;
			}
			val65.onValueChange += (BoolValueChangeEventDelegate)obj26;
			ConfigSettings.droneDespawn = val65.value;
			new ConfigHeader(val38, "Black Hole Cannon", 24);
			BoolField val67 = new BoolField(val38, "No Weapon Cooldown Compatability", "blackHoleNWC", true);
			object obj27 = <>c.<>9__1_33;
			if (obj27 == null)
			{
				BoolValueChangeEventDelegate val68 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.blackHoleNWC = e.value;
				};
				<>c.<>9__1_33 = val68;
				obj27 = (object)val68;
			}
			val67.onValueChange += (BoolValueChangeEventDelegate)obj27;
			ConfigSettings.blackHoleNWC = val67.value;
			BoolField val69 = new BoolField(val38, "Block absorbing Maurices", "blackHoleIgnoresMauriceField", true);
			object obj28 = <>c.<>9__1_34;
			if (obj28 == null)
			{
				BoolValueChangeEventDelegate val70 = delegate(BoolValueChangeEvent e)
				{
					ConfigSettings.blackHoleIgnoresMaurice = e.value;
				};
				<>c.<>9__1_34 = val70;
				obj28 = (object)val70;
			}
			val69.onValueChange += (BoolValueChangeEventDelegate)obj28;
			ConfigSettings.blackHoleIgnoresMaurice = val69.value;
			return val;
		}

		private static void SetWeaponVariantDisplayNames(EnumField<WeaponVariant> field)
		{
			field.SetEnumDisplayName((WeaponVariant)0, "Blue");
			field.SetEnumDisplayName((WeaponVariant)1, "Green");
			field.SetEnumDisplayName((WeaponVariant)2, "Red");
			field.SetEnumDisplayName((WeaponVariant)3, "Gold");
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "MuseumWeaponsCheat";

		public const string PLUGIN_NAME = "Museum Weapons Cheat";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}