Decompiled source of AcidDrop v1.1.3

aciddrop.dll

Decompiled a day ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using MapStation.Common.Gameplay;
using MapStation.Plugin.Gameplay;
using Microsoft.CodeAnalysis;
using Reptile;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: AssemblyCompany("aciddrop")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Acid Drop for Bomb Rush Cyberfunk")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("aciddrop")]
[assembly: AssemblyTitle("aciddrop")]
[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 aciddrop
{
	[BepInPlugin("info.mariobluegloves.aciddrop2", "Acid Drop", "1.0.0")]
	[BepInProcess("Bomb Rush Cyberfunk.exe")]
	public class AcidDrop : BaseUnityPlugin
	{
		private static AcidDrop _instance;

		private bool sceneLoaded = false;

		private Player p;

		private bool canAcidDrop = true;

		public bool hasMapStationVerted = false;

		public bool mapStationVertingDown = false;

		public bool hasMeteored = false;

		public bool meteor = false;

		public bool isStoringSpeed = false;

		public bool hasHitMsVert = false;

		public bool hasVerted = false;

		public bool vertingDown = false;

		public Vector3 lastSpeed = Vector3.zero;

		public Vector3 curSpeed = Vector3.zero;

		public float funnySpeed = 0f;

		public bool updatingBoostHeld = false;

		public bool hasUpdatedBoostHeld = false;

		public bool hasStoppedUpdatingBoostHeld = false;

		public float timeSpentBoostHeld = 0f;

		public bool updatingSlideHeld = false;

		public bool hasUpdatedSlideHeld = false;

		public bool hasStoppedUpdatingSlideHeld = false;

		public float timeSpentSlideHeld = 0f;

		public float timeSpentExitingMsVert = 0f;

		public float maxFallSpeed = 0f;

		public bool grabbingFallSpeed = false;

		public float previousTime = 0f;

		public float currentTime = 0f;

		public float deltaTime = 0f;

		public static AcidDrop Instance
		{
			get
			{
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0036: Expected O, but got Unknown
				if ((Object)(object)_instance == (Object)null)
				{
					_instance = Object.FindObjectOfType<AcidDrop>();
					if ((Object)(object)_instance == (Object)null)
					{
						GameObject val = new GameObject("AcidDrop");
						_instance = val.AddComponent<AcidDrop>();
					}
				}
				return _instance;
			}
		}

		private void Awake()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Expected O, but got Unknown
			SceneManager.sceneLoaded += OnSceneLoaded;
			Harmony val = new Harmony("info.mariobluegloves.aciddrop2");
			val.PatchAll(typeof(GriTAPatchAD));
		}

		private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
		{
			sceneLoaded = true;
			grabbingFallSpeed = true;
		}

		private void Update()
		{
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			//IL_0291: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			if (!sceneLoaded)
			{
				return;
			}
			currentTime = Time.time;
			deltaTime = currentTime - previousTime;
			previousTime = currentTime;
			GameObject val = GameObject.Find("Player_HUMAN0");
			if (!((Object)(object)val != (Object)null))
			{
				return;
			}
			p = val.GetComponent<Player>();
			if (!((Object)(object)p != (Object)null))
			{
				return;
			}
			if (grabbingFallSpeed)
			{
				MovementMotor component = ((Component)p).GetComponent<MovementMotor>();
				maxFallSpeed = component.maxFallSpeed;
				grabbingFallSpeed = false;
			}
			Ability ability = p.ability;
			if (ability != null && ability == p.wallrunAbility)
			{
				canAcidDrop = true;
			}
			DropCheck();
			if (p.OnAnyGround())
			{
				StopMapstationVerting();
				StopVerting();
				StopMeteor();
				if (!vertingDown && hasVerted)
				{
					hasVerted = false;
				}
				if (!meteor && hasMeteored)
				{
					hasMeteored = false;
				}
				if (!mapStationVertingDown && hasMapStationVerted)
				{
					p.userInputEnabled = true;
					hasMapStationVerted = false;
				}
				canAcidDrop = true;
				if (hasHitMsVert)
				{
					timeSpentExitingMsVert += deltaTime;
					if (timeSpentExitingMsVert > 0.06f)
					{
						GiveMsStorage();
					}
				}
				return;
			}
			if (p.boostButtonHeld)
			{
				timeSpentBoostHeld += Core.dt;
				if (timeSpentBoostHeld > 0.51f)
				{
					timeSpentBoostHeld = 0.51f;
				}
				UpdateBoostHeld();
			}
			else
			{
				StopUpdatingBoostHeld();
			}
			if (p.slideButtonHeld)
			{
				timeSpentSlideHeld += Core.dt;
				if (timeSpentSlideHeld > 0.51f)
				{
					timeSpentSlideHeld = 0.51f;
				}
				UpdateSlideHeld();
			}
			else
			{
				StopUpdatingSlideHeld();
			}
			if (isStoringSpeed)
			{
				Rigidbody component2 = ((Component)p).GetComponent<Rigidbody>();
				lastSpeed = curSpeed;
				curSpeed = component2.velocity;
			}
			if (mapStationVertingDown && p.boostAbility != null)
			{
				((Ability)p.boostAbility).p.StopCurrentAbility();
			}
		}

		public void DropCheck()
		{
			if ((Object)(object)p != (Object)null && p.usingEquippedMovestyle && (p.slideButtonHeld || p.slideButtonNew) && (p.boostButtonHeld || p.boostButtonNew) && timeSpentBoostHeld < 0.5f && timeSpentSlideHeld < 0.5f && !p.IsGrinding())
			{
				MovementMotor component = ((Component)p).GetComponent<MovementMotor>();
				component.maxFallSpeed = float.PositiveInfinity;
				CheckObjectDirectlyUnderneathPlayer();
			}
			if ((Object)(object)p != (Object)null && (p.slideButtonHeld || p.slideButtonNew) && timeSpentBoostHeld < 0.5f && timeSpentSlideHeld < 0.5f && p.trick2ButtonHeld && p.trick3ButtonHeld && !p.IsGrinding())
			{
				MovementMotor component2 = ((Component)p).GetComponent<MovementMotor>();
				component2.maxFallSpeed = float.PositiveInfinity;
				MeteorDrop();
			}
		}

		private void CheckObjectDirectlyUnderneathPlayer()
		{
			//IL_0024: 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_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: 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)
			//IL_0080: 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_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)p == (Object)null)
			{
				return;
			}
			Vector3 position = ((Component)p).transform.position;
			Vector3 down = Vector3.down;
			RaycastHit[] array = Physics.RaycastAll(position, down);
			Array.Sort(array, (RaycastHit a, RaycastHit b) => ((RaycastHit)(ref a)).distance.CompareTo(((RaycastHit)(ref b)).distance));
			bool flag = false;
			RaycastHit hit = default(RaycastHit);
			GameObject val = null;
			bool flag2 = false;
			RaycastHit[] array2 = array;
			for (int i = 0; i < array2.Length; i++)
			{
				RaycastHit val2 = array2[i];
				GameObject gameObject = ((Component)((RaycastHit)(ref val2)).collider).gameObject;
				if ((Object)(object)gameObject.GetComponent<VertShape>() != (Object)null || (Object)(object)gameObject.GetComponent<MapStationVert>() != (Object)null)
				{
					if (!flag2)
					{
						hit = val2;
						val = gameObject;
						flag = true;
						break;
					}
				}
				else
				{
					flag2 = true;
				}
			}
			if (!flag || !((Object)(object)val != (Object)null))
			{
				return;
			}
			VertShape component = val.GetComponent<VertShape>();
			if ((Object)(object)component != (Object)null)
			{
				ProcessVertShape(val, hit);
				return;
			}
			MapStationVert component2 = val.GetComponent<MapStationVert>();
			if ((Object)(object)component2 != (Object)null)
			{
				ProcessMapStationVert(val, hit);
			}
		}

		private void ProcessVertShape(GameObject obj, RaycastHit hit)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: 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_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: 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_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: 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_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			VertShape component = obj.GetComponent<VertShape>();
			Vector3 bottomLeft = component.bottomLeft;
			Vector3 topLeft = component.topLeft;
			Vector3 topRight = component.topRight;
			Transform transform = ((Component)component).transform;
			Vector3 val = transform.TransformPoint(bottomLeft);
			Vector3 val2 = transform.TransformPoint(topLeft);
			Vector3 val3 = transform.TransformPoint(topRight);
			Vector3 val4 = val3 - val2;
			Vector3 normalized = ((Vector3)(ref val4)).normalized;
			if (!p.IsGrounded() && canAcidDrop)
			{
				p.ActivateAbility((Ability)(object)p.vertAbility);
				Vector3 val5 = ((Component)p).transform.position - val3;
				float num = Vector3.Dot(val5, normalized) / Vector3.Dot(normalized, normalized);
				Vector3 val6 = num * normalized;
				Vector3 val7 = val3 + val6;
				Vector3 position = default(Vector3);
				((Vector3)(ref position))..ctor(val7.x, ((Component)p).transform.position.y, val7.z);
				((Component)p).transform.position = position;
				Vector3 val8 = val - val2;
				Vector3 normalized2 = ((Vector3)(ref val8)).normalized;
				((Component)p).transform.rotation = Quaternion.LookRotation(normalized2, Vector3.up);
				((Component)p).transform.Translate(Vector3.forward * 0.5f, (Space)1);
				StartVerting();
				p.ringParticles.Emit(1);
				p.audioManager.PlayVoice(ref p.currentVoicePriority, p.character, (AudioClipID)489, p.playerGameplayVoicesAudioSource, (VoicePriority)0);
				p.DoTrick((TrickType)22, "Acid Drop", 0);
				float totalSpeed = p.GetTotalSpeed();
				Vector3 velocity = (0f - totalSpeed) * Vector3.up;
				Rigidbody component2 = ((Component)p).GetComponent<Rigidbody>();
				component2.velocity = velocity;
				canAcidDrop = false;
			}
		}

		private void ProcessMapStationVert(GameObject obj, RaycastHit hit)
		{
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//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)
			//IL_0069: 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)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: 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)
			//IL_007d: 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_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			if (p.IsGrounded() || !canAcidDrop)
			{
				return;
			}
			MapStationPlayer component = ((Component)p).GetComponent<MapStationPlayer>();
			MeshCollider component2 = obj.GetComponent<MeshCollider>();
			if (!((Object)(object)component2 == (Object)null))
			{
				Vector3 val = ((Collider)component2).ClosestPointOnBounds(((Component)p).transform.position);
				Vector3 val2 = ((Component)this).transform.TransformPoint(val);
				Vector3 normal = ((RaycastHit)(ref hit)).normal;
				float num = Vector3.Dot(normal, Vector3.up);
				bool flag = num < Mathf.Cos((float)Math.PI / 4f);
				bool flag2 = num > Mathf.Cos(1.2217305f);
				if (flag && flag2)
				{
					Vector3 velocity = (0f - (funnySpeed = p.GetTotalSpeed())) * Vector3.up;
					Rigidbody component3 = ((Component)p).GetComponent<Rigidbody>();
					component3.velocity = velocity;
					Vector3 val3 = default(Vector3);
					((Vector3)(ref val3))..ctor(val2.x, ((Component)p).transform.position.y, val2.z);
					((Component)p).transform.position = val3;
					Vector3 normalized = ((Vector3)(ref normal)).normalized;
					normalized.y = 0f;
					Quaternion rotation = Quaternion.LookRotation(normalized, Vector3.up);
					p.SetRotation(rotation);
					Vector3 position = val3 + ((Vector3)(ref normal)).normalized * 0.6f;
					((Component)p).transform.position = position;
					component.GroundVertVector = normal;
					component.AirVertBegin();
					component.OnVertAir = true;
					StartMapstationVerting();
					p.ringParticles.Emit(1);
					p.audioManager.PlayVoice(ref p.currentVoicePriority, p.character, (AudioClipID)489, p.playerGameplayVoicesAudioSource, (VoicePriority)0);
					p.DoTrick((TrickType)22, "Acid Drop", 0);
					p.userInputEnabled = false;
					canAcidDrop = false;
				}
			}
		}

		private void MeteorDrop()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)p == (Object)null)
			{
				return;
			}
			Collider[] array = Physics.OverlapSphere(((Component)p).transform.position, 0.5f);
			bool flag = false;
			Collider[] array2 = array;
			foreach (Collider val in array2)
			{
				if ((Object)(object)((Component)val).gameObject != (Object)(object)p && !val.isTrigger && ((Object)((Component)val).gameObject).name != "interactionCapsule" && ((Object)((Component)val).gameObject).name != "grindDetectionBottom" && ((Object)((Component)val).gameObject).name != "Player_HUMAN0")
				{
					flag = true;
				}
			}
			if (!flag && !p.IsGrounded() && canAcidDrop)
			{
				MapStationPlayer component = ((Component)p).GetComponent<MapStationPlayer>();
				StartMeteor();
				p.ringParticles.Emit(1);
				p.audioManager.PlayVoice(ref p.currentVoicePriority, p.character, (AudioClipID)489, p.playerGameplayVoicesAudioSource, (VoicePriority)0);
				p.DoTrick((TrickType)22, "Meteor Drop", 0);
				float totalSpeed = p.GetTotalSpeed();
				Vector3 velocity = (0f - totalSpeed) * Vector3.up;
				Rigidbody component2 = ((Component)p).GetComponent<Rigidbody>();
				component2.velocity = velocity;
				canAcidDrop = false;
			}
		}

		private void StartMapstationVerting()
		{
			mapStationVertingDown = true;
			if (!hasMapStationVerted)
			{
				hasMapStationVerted = true;
				isStoringSpeed = true;
			}
		}

		private void StopMapstationVerting()
		{
			if (mapStationVertingDown)
			{
				MovementMotor component = ((Component)p).GetComponent<MovementMotor>();
				mapStationVertingDown = false;
				isStoringSpeed = false;
				hasHitMsVert = true;
				timeSpentExitingMsVert = 0f;
				component.maxFallSpeed = maxFallSpeed;
			}
		}

		private void StartMeteor()
		{
			meteor = true;
			if (!hasMeteored)
			{
				hasMeteored = true;
			}
		}

		private void StopMeteor()
		{
			MovementMotor component = ((Component)p).GetComponent<MovementMotor>();
			if (meteor)
			{
				meteor = false;
				component.maxFallSpeed = maxFallSpeed;
			}
		}

		private void GiveMsStorage()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			Rigidbody component = ((Component)p).GetComponent<Rigidbody>();
			component.velocity = lastSpeed;
			hasHitMsVert = false;
			timeSpentExitingMsVert = 0f;
		}

		private void StartVerting()
		{
			vertingDown = true;
			if (!hasVerted)
			{
				hasVerted = true;
			}
		}

		private void StopVerting()
		{
			MovementMotor component = ((Component)p).GetComponent<MovementMotor>();
			vertingDown = false;
			component.maxFallSpeed = maxFallSpeed;
		}

		private void UpdateBoostHeld()
		{
			updatingBoostHeld = true;
			if (!hasUpdatedBoostHeld)
			{
				timeSpentBoostHeld = 0f;
				hasUpdatedBoostHeld = true;
				hasStoppedUpdatingBoostHeld = false;
			}
		}

		private void UpdateSlideHeld()
		{
			updatingSlideHeld = true;
			if (!hasUpdatedSlideHeld)
			{
				timeSpentSlideHeld = 0f;
				hasUpdatedSlideHeld = true;
				hasStoppedUpdatingSlideHeld = false;
			}
		}

		private void StopUpdatingBoostHeld()
		{
			if (!hasStoppedUpdatingBoostHeld)
			{
				updatingBoostHeld = false;
				hasUpdatedBoostHeld = false;
				hasStoppedUpdatingBoostHeld = true;
				timeSpentBoostHeld = 0f;
			}
		}

		private void StopUpdatingSlideHeld()
		{
			if (!hasStoppedUpdatingSlideHeld)
			{
				updatingSlideHeld = false;
				hasUpdatedSlideHeld = false;
				hasStoppedUpdatingSlideHeld = true;
				timeSpentSlideHeld = 0f;
			}
		}
	}
	public class GriTAPatchAD
	{
		[HarmonyPatch(typeof(GrindAbility), "CanSetToLine")]
		[HarmonyPrefix]
		private static bool GriTAPatchPreFixAD(GrindLine line)
		{
			if (((Object)(object)AcidDrop.Instance != (Object)null && AcidDrop.Instance.vertingDown) || ((Object)(object)AcidDrop.Instance != (Object)null && AcidDrop.Instance.mapStationVertingDown))
			{
				return false;
			}
			return true;
		}
	}
	[BepInPlugin("info.mariobluegloves.aciddrop", "Acid Drop", "1.0.0")]
	[BepInProcess("Bomb Rush Cyberfunk.exe")]
	public class VertAbilityPatches : BaseUnityPlugin
	{
		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Drop it like it's hot");
		}
	}
}