Decompiled source of Pinball Purgatory v1.0.0

BepInEx/plugins/PinballPurgatory.dll

Decompiled 6 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("PinballPurgatory")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("PinballPurgatory")]
[assembly: AssemblyTitle("PinballPurgatory")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace PinballPurgatory
{
	[HarmonyPatch(typeof(Item), "RequestPickup")]
	internal static class DenyLitFlarePickup
	{
		internal static bool Prefix(Item __instance, PhotonView characterView)
		{
			if (__instance.itemID == 32 && __instance.GetData<BoolItemData>((DataEntryKey)3).Value)
			{
				Character component = ((Component)characterView).GetComponent<Character>();
				__instance.view.RPC("DenyPickupRPC", ((MonoBehaviourPun)component.player).photonView.Owner, Array.Empty<object>());
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(Flare), "Awake")]
	internal static class MagneticFlares
	{
		internal static void Prefix(Flare __instance)
		{
			if (Plugin.FlareMagnet.Value)
			{
				((Component)__instance).gameObject.AddComponent<FlareHandler>().flar = __instance;
			}
		}
	}
	[HarmonyPatch(typeof(BugleSFX), "RPC_StartToot")]
	internal static class BugleDash
	{
		internal static void Prefix(BugleSFX __instance)
		{
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			PinballHandler component = ((Component)__instance.item.holderCharacter).GetComponent<PinballHandler>();
			if (!((Object)(object)component == (Object)null) && !(component.bugleDashCooldown > 0f) && Plugin.BugleDaesh.Value)
			{
				component.ignoreMySlowdown = true;
				component.gracePeriod = 0f;
				PinballFunctions.AddForceNetworkedCharacter(component.owner.data.lookDirection, component.owner, (component.owner.IsLocal ? Plugin.BugleDaeshMult.Value : (Plugin.BugleDaeshMult.Value * Plugin.BugleDaeshMultOth.Value)) * 200f);
				component.bugleDashCooldown = Plugin.BugleDaeshCooldown.Value;
			}
		}
	}
	[HarmonyPatch(typeof(CharacterItems), "Awake")]
	internal static class GiveItems
	{
		internal static void Postfix(CharacterItems __instance)
		{
			PinballHandler component = ((Component)__instance).GetComponent<PinballHandler>();
			((MonoBehaviour)component).StartCoroutine((IEnumerator)component.GimmeMyItems());
		}
	}
	[HarmonyPatch(typeof(Character), "RPCA_Revive")]
	internal static class GiveItemsDos
	{
		internal static void Postfix(CharacterItems __instance)
		{
			PinballHandler component = ((Component)__instance).GetComponent<PinballHandler>();
			((MonoBehaviour)component).StartCoroutine((IEnumerator)component.GimmeMyItems());
			component.gracePeriod = 45f;
		}
	}
	[HarmonyPatch(typeof(Action_ShowBinocularOverlay), "ToggleUseRPC")]
	internal static class BinoDash
	{
		internal static void Prefix(Action_ShowBinocularOverlay __instance, bool open)
		{
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			PinballHandler component = ((Component)((ItemActionBase)__instance).item.holderCharacter).GetComponent<PinballHandler>();
			if (!((Object)(object)component == (Object)null) && open && !(component.binoDashCooldown > 0f) && Plugin.BinoSuperDash.Value)
			{
				component.ignoreMySlowdown = true;
				component.gracePeriod = 0f;
				PinballFunctions.AddForceNetworkedCharacter(component.owner.data.lookDirection * ((((Vector3)(ref component.owner.data.avarageVelocity)).magnitude > 10f) ? ((Vector3)(ref component.owner.data.avarageVelocity)).magnitude : 10f), component.owner, Plugin.BinoSuperDashMult.Value * 200f);
				component.owner.Fall(1f, 0f);
				component.binoDashCooldown = Plugin.BinoSuperDashCooldown.Value;
			}
		}
	}
	[HarmonyPatch(typeof(CharacterRagdoll), "Awake")]
	internal static class AddPinballHandlerChar
	{
		internal static void Postfix(CharacterRagdoll __instance)
		{
			if (Plugin.enabled.Value)
			{
				PinballHandler pinballHandler = ((Component)__instance.character).gameObject.AddComponent<PinballHandler>();
				pinballHandler.owner = __instance.character;
			}
		}
	}
	[HarmonyPatch(typeof(CharacterMovement), "OnCollision")]
	internal static class CollisionListener
	{
		public static void Prefix(CharacterMovement __instance, Collision collision, bool collisionEnter, Bodypart bodypart)
		{
			PinballHandler component = ((Component)__instance).GetComponent<PinballHandler>();
			if (!((Object)(object)((Component)collision.collider).GetComponentInParent<Item>() != (Object)null) && Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<PinballHandler>()))
			{
				component.CallForBoingBoing(collision, bodypart.Rig);
			}
		}
	}
	internal class FlareHandler : MonoBehaviour
	{
		public Flare flar;

		public Dictionary<Character, PinballHandler> CharacterCache = new Dictionary<Character, PinballHandler>();

		public float checkClock = 0.5f;

		public float timeLeft = 160f;

		private void FixedUpdate()
		{
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			if (!((ItemComponent)flar).GetData<BoolItemData>((DataEntryKey)3).Value)
			{
				return;
			}
			checkClock += Time.fixedDeltaTime;
			timeLeft -= Time.fixedDeltaTime;
			if (checkClock > 0.5f && timeLeft > 0f)
			{
				foreach (Character allCharacter in Character.AllCharacters)
				{
					if (!(Vector3.Distance(((ItemComponent)flar).item.Center(), allCharacter.Center) < Plugin.FlareRange.Value))
					{
						continue;
					}
					CharacterCache.TryGetValue(allCharacter, out PinballHandler value);
					if ((Object)(object)value == (Object)null)
					{
						CharacterCache.Add(allCharacter, ((Component)allCharacter).gameObject.GetComponent<PinballHandler>());
						continue;
					}
					value.gracePeriod = 5f;
					if (value.owner.data.fallSeconds > 0f)
					{
						Vector3 val = ((ItemComponent)flar).item.Center() - value.owner.Center;
						PinballFunctions.AddForceNetworkedCharacter(((Vector3)(ref val)).normalized, value.owner, Plugin.FlareMagnetMult.Value * 10f);
					}
				}
			}
			if (timeLeft < 0f)
			{
				((ItemComponent)flar).GetData<BoolItemData>((DataEntryKey)3).Value = false;
				Object.Destroy((Object)(object)this);
			}
		}
	}
	internal static class PinballFunctions
	{
		public static void AddForceNetworkedCharacter(Vector3 force, Character chara, float multiplier)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			while (((Vector3)(ref force)).magnitude > Plugin.VelocityCap.Value)
			{
				force *= 0.5f;
			}
			chara.AddForceAtPosition(force * multiplier, chara.Center, 1f);
		}

		public static void TryGiveItem(Item item, Character owner)
		{
			bool flag = false;
			ItemSlot[] itemSlots = owner.player.itemSlots;
			foreach (ItemSlot val in itemSlots)
			{
				if (val.itemSlotID < 3 && val.IsEmpty())
				{
					flag = true;
				}
			}
			if (flag)
			{
				item.view.RPC("RequestPickup", (RpcTarget)2, new object[1] { owner.view });
			}
		}
	}
	internal class PinballHandler : MonoBehaviour
	{
		public Character owner;

		public Vector3 prevFrameVel;

		public bool ignoreMySlowdown = false;

		public float gracePeriod = 30f;

		public float bugleDashCooldown;

		public float binoDashCooldown;

		public bool holdingGuibebook;

		public IEnumerator<WaitForSeconds> GimmeMyItems()
		{
			yield return new WaitForSeconds(5f);
			if (Plugin.startWithBook.Value)
			{
				Item book3 = PhotonNetwork.Instantiate("0_items/Guidebook", owner.Center + Vector3.up * 3f, Quaternion.identity, (byte)0, (object[])null).GetComponent<Item>();
				PinballFunctions.TryGiveItem(book3, owner);
			}
			if (Plugin.startWithBugle.Value)
			{
				Item book2 = PhotonNetwork.Instantiate("0_items/Bugle", owner.Center + Vector3.up * 3f, Quaternion.identity, (byte)0, (object[])null).GetComponent<Item>();
				PinballFunctions.TryGiveItem(book2, owner);
			}
			if (Plugin.startWithBino.Value)
			{
				Item book = PhotonNetwork.Instantiate("0_items/Binoculars", owner.Center + Vector3.up * 3f, Quaternion.identity, (byte)0, (object[])null).GetComponent<Item>();
				PinballFunctions.TryGiveItem(book, owner);
			}
		}

		private void FixedUpdate()
		{
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0291: Invalid comparison between Unknown and I4
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			gracePeriod -= Time.fixedDeltaTime;
			bugleDashCooldown -= Time.fixedDeltaTime;
			binoDashCooldown -= Time.fixedDeltaTime;
			if (!((Object)(object)owner != (Object)null))
			{
				return;
			}
			if (gracePeriod < 0f && !owner.data.isClimbingAnything && !owner.data.isCarried)
			{
				if (owner.data.dead)
				{
					gracePeriod = 30f;
				}
				holdingGuibebook = false;
				if ((Object)(object)owner.data.currentItem != (Object)null && Plugin.GuidebookStop.Value)
				{
					Guidebook component = ((Component)owner.data.currentItem).GetComponent<Guidebook>();
					if ((Object)(object)component != (Object)null && component.isOpen)
					{
						float[] array = new float[CharacterAfflictions.NumStatusTypes];
						array[6] = -0.01f * Time.fixedDeltaTime;
						((MonoBehaviourPun)owner.refs.afflictions).photonView.RPC("RPC_ApplyStatusesFromFloatArray", (RpcTarget)0, new object[1] { array });
						holdingGuibebook = true;
						OnEarlyReturn();
						return;
					}
				}
				if (((Vector3)(ref owner.data.avarageVelocity)).magnitude < ((Vector3)(ref prevFrameVel)).magnitude && Plugin.FrictionlessChars.Value && (Plugin.FrictionlessWhileUnrag.Value || owner.data.fallSeconds > 0f) && !ignoreMySlowdown)
				{
					PinballFunctions.AddForceNetworkedCharacter(Vector3Extensions.Flat(prevFrameVel - owner.data.avarageVelocity), owner, (owner.data.fallSeconds > 0f) ? ((owner.IsLocal ? Plugin.FrictionlessPowerRag.Value : Plugin.FrictionlessPowerRagOth.Value) * 59f) : ((owner.IsLocal ? Plugin.FrictionlessPowerUnrag.Value : Plugin.FrictionlessPowerUnragOth.Value) * 61f));
				}
				prevFrameVel = owner.data.avarageVelocity;
				ignoreMySlowdown = false;
				if ((int)Plugin.ReplaceInjuryWith.Value > 0)
				{
					ConvertInjuryToDrowsy();
				}
			}
			else
			{
				OnEarlyReturn();
			}
		}

		public void OnEarlyReturn()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			ConvertInjuryToDrowsy();
			prevFrameVel = owner.data.avarageVelocity;
		}

		public void ConvertInjuryToDrowsy()
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			float currentStatus = owner.refs.afflictions.GetCurrentStatus((STATUSTYPE)0);
			if (currentStatus > 0f)
			{
				float[] array = new float[CharacterAfflictions.NumStatusTypes];
				array[0] = -2f;
				array[Plugin.ReplaceInjuryWith.Value] = currentStatus * Plugin.InjuryMult.Value;
				((MonoBehaviourPun)owner.refs.afflictions).photonView.RPC("RPC_ApplyStatusesFromFloatArray", (RpcTarget)0, new object[1] { array });
			}
		}

		public void CallForBoingBoing(Collision collision, Rigidbody bodypart)
		{
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)owner != (Object)null) || !(gracePeriod < 0f) || holdingGuibebook || !Plugin.BouncyChars.Value)
			{
				return;
			}
			Vector3 val;
			if (!(owner.data.fallSeconds > 0f))
			{
				if (!Plugin.BounceWhileUnrag.Value)
				{
					return;
				}
				val = collision.relativeVelocity;
				if (!(((Vector3)(ref val)).magnitude > 10f))
				{
					return;
				}
			}
			ContactPoint val2 = collision.contacts[0];
			ContactPoint[] contacts = collision.contacts;
			for (int i = 0; i < contacts.Length; i++)
			{
				ContactPoint val3 = contacts[i];
				if (Vector3.Distance(owner.Center, ((ContactPoint)(ref val3)).point) > Vector3.Distance(owner.Center, ((ContactPoint)(ref val2)).point))
				{
					val2 = val3;
				}
			}
			val = owner.Center - ((ContactPoint)(ref val2)).point;
			Vector3 normalized = ((Vector3)(ref val)).normalized;
			val = bodypart.linearVelocity;
			PinballFunctions.AddForceNetworkedCharacter(normalized * ((Vector3)(ref val)).magnitude, owner, (owner.data.fallSeconds > 0f) ? Plugin.CharBouncePowerRag.Value : Plugin.CharBouncePowerUnrag.Value);
		}
	}
	[BepInPlugin("pinballpurgatory", "PinballPurgatory", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		internal static ConfigEntry<bool> enabled;

		internal static ConfigEntry<bool> FrictionlessChars;

		internal static ConfigEntry<bool> BouncyChars;

		internal static ConfigEntry<bool> BounceWhileUnrag;

		internal static ConfigEntry<bool> FrictionlessWhileUnrag;

		internal static ConfigEntry<float> CharBouncePowerUnrag;

		internal static ConfigEntry<float> CharBouncePowerRag;

		internal static ConfigEntry<float> FrictionlessPowerUnrag;

		internal static ConfigEntry<float> FrictionlessPowerRag;

		internal static ConfigEntry<float> FrictionlessPowerUnragOth;

		internal static ConfigEntry<float> FrictionlessPowerRagOth;

		internal static ConfigEntry<float> VelocityCap;

		internal static ConfigEntry<bool> BinoSuperDash;

		internal static ConfigEntry<float> BinoSuperDashMult;

		internal static ConfigEntry<float> BinoSuperDashCooldown;

		internal static ConfigEntry<bool> BugleDaesh;

		internal static ConfigEntry<float> BugleDaeshMult;

		internal static ConfigEntry<float> BugleDaeshMultOth;

		internal static ConfigEntry<float> BugleDaeshCooldown;

		internal static ConfigEntry<bool> GuidebookStop;

		internal static ConfigEntry<bool> FlareMagnet;

		internal static ConfigEntry<float> FlareMagnetMult;

		internal static ConfigEntry<float> FlareRange;

		internal static ConfigEntry<STATUSTYPE> ReplaceInjuryWith;

		internal static ConfigEntry<float> InjuryMult;

		internal static ConfigEntry<bool> startWithBino;

		internal static ConfigEntry<bool> startWithBugle;

		internal static ConfigEntry<bool> startWithBook;

		internal static ManualLogSource Log { get; private set; }

		private void Awake()
		{
			//IL_036e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0374: Expected O, but got Unknown
			enabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Enabled", true, (ConfigDescription)null);
			FrictionlessChars = ((BaseUnityPlugin)this).Config.Bind<bool>("Characters", "Frictionless Characters", true, (ConfigDescription)null);
			BouncyChars = ((BaseUnityPlugin)this).Config.Bind<bool>("Characters", "Bouncy Characters", true, (ConfigDescription)null);
			BounceWhileUnrag = ((BaseUnityPlugin)this).Config.Bind<bool>("Characters", "Bounce Whilst Unragdolled", false, (ConfigDescription)null);
			FrictionlessWhileUnrag = ((BaseUnityPlugin)this).Config.Bind<bool>("Characters", "Frictionless Whilst Unragdolled", true, (ConfigDescription)null);
			CharBouncePowerUnrag = ((BaseUnityPlugin)this).Config.Bind<float>("Characters", "Bounce Power Unragdolled", 2f, (ConfigDescription)null);
			CharBouncePowerRag = ((BaseUnityPlugin)this).Config.Bind<float>("Characters", "Bounce Power Ragdolled", 1f, (ConfigDescription)null);
			FrictionlessPowerUnrag = ((BaseUnityPlugin)this).Config.Bind<float>("Characters", "Frictionless Power Unragdolled", 1.03f, (ConfigDescription)null);
			FrictionlessPowerUnragOth = ((BaseUnityPlugin)this).Config.Bind<float>("Characters", "Frictionless Power Unragdolled For Others", 0.8f, (ConfigDescription)null);
			FrictionlessPowerRag = ((BaseUnityPlugin)this).Config.Bind<float>("Characters", "Frictionless Power Ragdolled", 1f, (ConfigDescription)null);
			FrictionlessPowerRagOth = ((BaseUnityPlugin)this).Config.Bind<float>("Characters", "Frictionless Power Ragdolled For Others", 0.85f, (ConfigDescription)null);
			VelocityCap = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Velocity Application Cap", 300f, (ConfigDescription)null);
			ReplaceInjuryWith = ((BaseUnityPlugin)this).Config.Bind<STATUSTYPE>("Statuses", "Replace Injury With", (STATUSTYPE)6, (ConfigDescription)null);
			InjuryMult = ((BaseUnityPlugin)this).Config.Bind<float>("Statuses", "Injury Multiplier", 0.5f, (ConfigDescription)null);
			BinoSuperDash = ((BaseUnityPlugin)this).Config.Bind<bool>("Movement", "Binocular Super Dash", true, (ConfigDescription)null);
			BinoSuperDashMult = ((BaseUnityPlugin)this).Config.Bind<float>("Movement", "Binocular Super Dash Mult", 0.9f, (ConfigDescription)null);
			BinoSuperDashCooldown = ((BaseUnityPlugin)this).Config.Bind<float>("Movement", "Binocular Super Dash Cooldown", 50f, (ConfigDescription)null);
			BugleDaesh = ((BaseUnityPlugin)this).Config.Bind<bool>("Movement", "Bugle Dash", true, (ConfigDescription)null);
			BugleDaeshMult = ((BaseUnityPlugin)this).Config.Bind<float>("Movement", "Bugle Dash Mult", 4f, (ConfigDescription)null);
			BugleDaeshMultOth = ((BaseUnityPlugin)this).Config.Bind<float>("Movement", "Additional Bugle Dash Mult For Others", 3f, (ConfigDescription)null);
			BugleDaeshCooldown = ((BaseUnityPlugin)this).Config.Bind<float>("Movement", "Bugle Dash Cooldown", 8f, (ConfigDescription)null);
			GuidebookStop = ((BaseUnityPlugin)this).Config.Bind<bool>("Movement", "Guidebook Brake", true, (ConfigDescription)null);
			FlareMagnet = ((BaseUnityPlugin)this).Config.Bind<bool>("Movement", "Flare Magnet", true, (ConfigDescription)null);
			FlareMagnetMult = ((BaseUnityPlugin)this).Config.Bind<float>("Movement", "Flare Magnet Mult", 3f, (ConfigDescription)null);
			FlareRange = ((BaseUnityPlugin)this).Config.Bind<float>("Movement", "Flare Range", 35f, (ConfigDescription)null);
			startWithBook = ((BaseUnityPlugin)this).Config.Bind<bool>("Starter Kit", "Start With Guidebook (Slot 1)", true, (ConfigDescription)null);
			startWithBugle = ((BaseUnityPlugin)this).Config.Bind<bool>("Starter Kit", "Start With Bugle (Slot 2)", true, (ConfigDescription)null);
			startWithBino = ((BaseUnityPlugin)this).Config.Bind<bool>("Starter Kit", "Start With Binoculars (Slot 3)", true, (ConfigDescription)null);
			Log = ((BaseUnityPlugin)this).Logger;
			Log.LogInfo((object)"Plugin Pinball Purgatory is loaded!");
			Harmony val = new Harmony("pinballpurgatory");
			val.PatchAll();
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}