Decompiled source of Bioshock Drill v0.1.0

Bioshock_Drill.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using FistVR;
using HarmonyLib;
using OtherLoader;
using UnityEngine;

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Alloy
{
	public static class EnumExtension
	{
		public static bool HasFlag(this Enum keys, Enum flag)
		{
			int num = Convert.ToInt32(keys);
			int num2 = Convert.ToInt32(flag);
			return (num & num2) == num2;
		}
	}
}
public class Dash : MonoBehaviour
{
	public enum DashInput
	{
		None,
		AX,
		BY,
		GripButton,
		TouchpadUp,
		TouchpadDown,
		TouchpadLeft,
		TouchpadRight,
		TouchpadPress
	}

	[Serializable]
	public class DashInputConfig
	{
		public DashInput DashButton;

		public List<MovementMode> StreamlinedMovementModes = new List<MovementMode>();

		public List<MovementMode> ClassicMovementModes = new List<MovementMode>();
	}

	[Header("v0.0.29")]
	public Transform PointingDirection;

	[Header("=== DASH SETTINGS ===")]
	public List<DashInputConfig> InputConfigurations = new List<DashInputConfig>();

	[Header("Blast Motion (In-Air / Angled)")]
	public float BlastDashDuration = 0.2f;

	public float GroundedBlastVelocity = 15f;

	public float AerialBlastVelocity = 25f;

	public bool DampenInAir = true;

	public float BlastActivationAngle = 30f;

	[Header("Ground Dash")]
	public float GroundDashDuration = 0.5f;

	public float GroundDashSpeed = 10f;

	public float StickToGroundForce = 5f;

	[Header("Cooldowns")]
	public float DashCooldown = 2f;

	public float ActivationDelay = 0.3f;

	private bool isDashing;

	private Coroutine activationCoroutine;

	private float lastDashEndTime;

	private FVRViveHand _hand;

	private FVRInteractiveObject _interactiveObject;

	private TransformVelocity _dashDelegate;

	private void Awake()
	{
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Expected O, but got Unknown
		_interactiveObject = ((Component)this).GetComponentInParent<FVRInteractiveObject>();
		if ((Object)(object)_interactiveObject != (Object)null)
		{
			_hand = _interactiveObject.m_hand;
		}
		_dashDelegate = new TransformVelocity(DashTransformVelocity);
	}

	private void Update()
	{
		if ((Object)(object)_interactiveObject != (Object)null && _interactiveObject.IsHeld)
		{
			_hand = _interactiveObject.m_hand;
		}
		else
		{
			_hand = null;
		}
		if ((Object)(object)_hand == (Object)null || (Object)(object)PointingDirection == (Object)null || isDashing)
		{
			return;
		}
		if (_hand.Input.TriggerPressed && IsDashButtonPressed())
		{
			if (activationCoroutine == null && Time.time >= lastDashEndTime + DashCooldown)
			{
				activationCoroutine = ((MonoBehaviour)this).StartCoroutine(ActivationRoutine());
			}
		}
		else if (activationCoroutine != null)
		{
			((MonoBehaviour)this).StopCoroutine(activationCoroutine);
			activationCoroutine = null;
		}
	}

	private bool IsDashButtonPressed()
	{
		//IL_000b: 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_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_0149: Unknown result type (might be due to invalid IL or missing references)
		//IL_0184: Unknown result type (might be due to invalid IL or missing references)
		//IL_0189: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
		MovementMode currentMovementMode = GM.Options.MovementOptions.CurrentMovementMode;
		bool isInStreamlinedMode = _hand.IsInStreamlinedMode;
		foreach (DashInputConfig inputConfiguration in InputConfigurations)
		{
			List<MovementMode> list = ((!isInStreamlinedMode) ? inputConfiguration.ClassicMovementModes : inputConfiguration.StreamlinedMovementModes);
			if (list.Contains(currentMovementMode))
			{
				switch (inputConfiguration.DashButton)
				{
				case DashInput.None:
					return false;
				case DashInput.AX:
					return _hand.Input.AXButtonPressed;
				case DashInput.BY:
					return _hand.Input.BYButtonPressed;
				case DashInput.GripButton:
					return _hand.Input.GripPressed;
				case DashInput.TouchpadUp:
					return _hand.Input.TouchpadPressed && Vector2.Angle(_hand.Input.TouchpadAxes, Vector2.up) < 45f;
				case DashInput.TouchpadDown:
					return _hand.Input.TouchpadPressed && Vector2.Angle(_hand.Input.TouchpadAxes, Vector2.down) < 45f;
				case DashInput.TouchpadLeft:
					return _hand.Input.TouchpadPressed && Vector2.Angle(_hand.Input.TouchpadAxes, Vector2.left) < 45f;
				case DashInput.TouchpadRight:
					return _hand.Input.TouchpadPressed && Vector2.Angle(_hand.Input.TouchpadAxes, Vector2.right) < 45f;
				case DashInput.TouchpadPress:
					return _hand.Input.TouchpadPressed;
				}
			}
		}
		return false;
	}

	private IEnumerator ActivationRoutine()
	{
		yield return (object)new WaitForSeconds(ActivationDelay);
		StartDash();
		activationCoroutine = null;
	}

	private void StartDash()
	{
		//IL_000b: 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_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: 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_006f: 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_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		bool flag = Physics.Raycast(((Component)GM.CurrentPlayerBody).transform.position + Vector3.up * 0.1f, Vector3.down, 0.3f);
		float num = Vector3.Angle(PointingDirection.forward, Vector3.up);
		if (!flag || (flag && num < 90f - BlastActivationAngle))
		{
			Vector3 forward = PointingDirection.forward;
			Vector3 normalized = ((Vector3)(ref forward)).normalized;
			float num2 = ((!flag) ? AerialBlastVelocity : GroundedBlastVelocity);
			GM.CurrentMovementManager.Blast(normalized, num2, DampenInAir);
			((MonoBehaviour)this).StartCoroutine(BlastDashStateRoutine());
		}
		else
		{
			((MonoBehaviour)this).StartCoroutine(GroundDashDelegateRoutine());
		}
	}

	private IEnumerator BlastDashStateRoutine()
	{
		isDashing = true;
		yield return (object)new WaitForSeconds(BlastDashDuration);
		isDashing = false;
		lastDashEndTime = Time.time;
		GM.CurrentMovementManager.BlastLerpAbsolute(Vector3.zero, 0.1f);
	}

	private void DashTransformVelocity(ref Vector3 vel, ref bool isGrounded, ref bool didChange)
	{
		//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_0023: 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_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_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: 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)
		isGrounded = true;
		Vector3 forward = PointingDirection.forward;
		forward.y = 0f;
		((Vector3)(ref forward)).Normalize();
		Vector3 val = forward * GroundDashSpeed;
		vel = val;
		vel += Vector3.down * StickToGroundForce;
		didChange = true;
	}

	private IEnumerator GroundDashDelegateRoutine()
	{
		isDashing = true;
		GM.CurrentMovementManager.RegisterSmoothLocoAdder(_dashDelegate);
		float elapsed = 0f;
		while (elapsed < GroundDashDuration && !((Object)(object)_hand == (Object)null) && _interactiveObject.IsHeld)
		{
			elapsed += Time.deltaTime;
			yield return null;
		}
		GM.CurrentMovementManager.DeregisterSmoothLocoAdder(_dashDelegate);
		isDashing = false;
		lastDashEndTime = Time.time;
	}
}
namespace FistVR
{
	public class Drill_custom : Drill
	{
		[Header("=== CUSTOM DRILL SETTINGS ===")]
		[Tooltip("Multiplies ALL damage dealt by the drill (Blunt + Piercing). 1 = default, 2 = double damage, 0.5 = half damage")]
		public float DamageMultiplier = 1f;

		public override void FVRUpdate()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: 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_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Expected O, but got Unknown
			//IL_00e0: 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)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: 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)
			((Drill)this).FVRUpdate();
			if (!(base.TimeSinceDamageDealing <= 0f) || base.DamageablesToDo.Count <= 0)
			{
				return;
			}
			Damage val = new Damage();
			Vector3 velocity = ((FVRPhysicalObject)this).RootRigidbody.velocity;
			val.Dam_Blunt = 50f * Mathf.Clamp(((Vector3)(ref velocity)).magnitude, 1f, 3f) * DamageMultiplier;
			Vector3 velocity2 = ((FVRPhysicalObject)this).RootRigidbody.velocity;
			val.Dam_Piercing = 250f * Mathf.Clamp(((Vector3)(ref velocity2)).magnitude, 1f, 2f) * DamageMultiplier;
			val.Dam_TotalKinetic = val.Dam_Piercing + val.Dam_Blunt;
			val.Class = (DamageClass)3;
			for (int i = 0; i < base.DamageablesToDo.Count; i++)
			{
				if ((Object)(MonoBehaviour)base.DamageablesToDo[i] != (Object)null)
				{
					val.hitNormal = base.DamageableHitNormals[i];
					val.point = base.DamageableHitPoints[i];
					val.strikeDir = -((Component)this).transform.forward;
					base.DamageablesToDo[i].Damage(val);
				}
			}
			base.DamageablesToDo.Clear();
			base.DamageablesToDoHS.Clear();
			base.DamageableHitPoints.Clear();
			base.DamageableHitNormals.Clear();
			base.TimeSinceDamageDealing = 0.1f;
		}
	}
	public class Rotation_copy : MonoBehaviour
	{
		[Serializable]
		public class Follower
		{
			public Transform Target;

			[Tooltip("1 = same speed, 2 = twice as fast, -1 = opposite direction")]
			public float Speed = 1f;

			public RotationAxis Axis = RotationAxis.Z;
		}

		public enum RotationAxis
		{
			X,
			Y,
			Z
		}

		[Header("=== SOURCE (What to copy from) ===")]
		public Transform Source;

		[Header("=== FOLLOWERS (Objects that will rotate) ===")]
		public List<Follower> Followers = new List<Follower>();

		private void Update()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: 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_00fa: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)Source == (Object)null)
			{
				return;
			}
			Vector3 localEulerAngles = Source.localEulerAngles;
			for (int i = 0; i < Followers.Count; i++)
			{
				Follower follower = Followers[i];
				if (!((Object)(object)follower.Target == (Object)null))
				{
					float num = 0f;
					if (follower.Axis == RotationAxis.X)
					{
						num = localEulerAngles.x;
					}
					else if (follower.Axis == RotationAxis.Y)
					{
						num = localEulerAngles.y;
					}
					else if (follower.Axis == RotationAxis.Z)
					{
						num = localEulerAngles.z;
					}
					num *= follower.Speed;
					Vector3 localEulerAngles2 = follower.Target.localEulerAngles;
					if (follower.Axis == RotationAxis.X)
					{
						localEulerAngles2.x = num;
					}
					else if (follower.Axis == RotationAxis.Y)
					{
						localEulerAngles2.y = num;
					}
					else if (follower.Axis == RotationAxis.Z)
					{
						localEulerAngles2.z = num;
					}
					follower.Target.localEulerAngles = localEulerAngles2;
				}
			}
		}
	}
	[HelpURL("https://h3vr-modding.github.io/docs/api/FistVR.HandCopter.html")]
	public class HandCopter : FVRPhysicalObject
	{
		[Header("Trigger")]
		public Transform Trigger;

		public Axis TriggerAxis;

		public InterpStyle TriggerInterpStyle;

		public Vector2 TriggerVars;

		[NonSerialized]
		public float m_triggerVal;

		public Transform RockerButton;

		public HingeJoint RotorHinge;

		public float MaxSpeed = 1440f;

		public float MaxForce = 200f;

		[NonSerialized]
		public bool m_isTriggerheld;

		[NonSerialized]
		public float m_rockerRot;

		public AudioSource AudSource_Rotor;

		public List<Rigidbody> SpinRBs;

		[NonSerialized]
		public float motorPower;

		[NonSerialized]
		public int targetPower = 2;

		[NonSerialized]
		public TransformVelocity myDel;

		[NonSerialized]
		public bool m_isRegistered;

		public override void Start()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Expected O, but got Unknown
			((FVRInteractiveObject)this).Start();
			myDel = new TransformVelocity(TransformVel);
			for (int i = 0; i < SpinRBs.Count; i++)
			{
				SpinRBs[i].maxAngularVelocity = 50f;
			}
		}

		public override void OnDestroy()
		{
			((FVRPhysicalObject)this).OnDestroy();
			if (myDel != null)
			{
				GM.CurrentMovementManager.DeregisterSmoothLocoRestrictor(myDel);
			}
			myDel = null;
		}

		public override void FVRFixedUpdate()
		{
			//IL_0078: 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_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: 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)
			((FVRPhysicalObject)this).FVRFixedUpdate();
			if (m_isTriggerheld)
			{
				JointMotor motor = RotorHinge.motor;
				((JointMotor)(ref motor)).targetVelocity = MaxSpeed;
				((JointMotor)(ref motor)).force = MaxForce;
				RotorHinge.motor = motor;
				motorPower = Mathf.Clamp(RotorHinge.velocity / 1500f, 0f, 1f);
			}
			else
			{
				JointMotor motor2 = RotorHinge.motor;
				((JointMotor)(ref motor2)).targetVelocity = 0f;
				((JointMotor)(ref motor2)).force = 0f;
				RotorHinge.motor = motor2;
				motorPower = 0f;
			}
			if (motorPower > 0f)
			{
				if (!AudSource_Rotor.isPlaying)
				{
					AudSource_Rotor.Play();
				}
				float num = 0.8f;
				if (targetPower == 3)
				{
					num = 1.1f;
				}
				else if (targetPower == 1)
				{
					num = 0.6f;
				}
				AudSource_Rotor.pitch = Mathf.Lerp(AudSource_Rotor.pitch, num, Time.deltaTime * 6f);
				if (!m_isRegistered)
				{
					m_isRegistered = true;
					GM.CurrentMovementManager.RegisterSmoothLocoAdder(myDel);
				}
			}
			else
			{
				if (m_isRegistered)
				{
					m_isRegistered = false;
					GM.CurrentMovementManager.DeregisterSmoothLocoAdder(myDel);
				}
				if (AudSource_Rotor.isPlaying)
				{
					AudSource_Rotor.Stop();
				}
				AudSource_Rotor.pitch = 0.8f;
			}
		}

		public void TransformVel(ref Vector3 vel, ref bool isGrounded, ref bool didChange)
		{
			//IL_0022: 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_003e: Expected I4, but got Unknown
			//IL_0075: 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_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: 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_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: 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_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01db: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: 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)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			if (motorPower > 0f)
			{
				float num = 5f;
				GravityMode playerGravityMode = GM.Options.SimulationOptions.PlayerGravityMode;
				switch ((int)playerGravityMode)
				{
				case 0:
					num = 9.81f;
					break;
				case 1:
					num = 5f;
					break;
				case 2:
					num = 1.62f;
					break;
				case 3:
					num = 0.001f;
					break;
				}
				float num2 = Vector3.Angle(((Component)this).transform.up, Vector3.up);
				float num3 = Mathf.InverseLerp(45f, 20f, num2);
				float num4 = Mathf.Max(1f, num * 1.02f);
				if (targetPower == 3)
				{
					num4 += 10f;
				}
				else if (targetPower == 1)
				{
					num4 = Mathf.Max(0.5f, num * 0.9f);
				}
				num4 *= num3;
				float num5 = Mathf.InverseLerp(120f, 160f, num2);
				float num6 = Mathf.Max(1f, num);
				if (targetPower == 3)
				{
					num6 += 5f;
				}
				else if (targetPower == 1)
				{
					num6 = Mathf.Max(0.5f, num * 0.5f);
				}
				num6 *= num5;
				Vector3 val = ((Component)this).transform.up;
				val = Vector3.ProjectOnPlane(val, Vector3.up);
				if (((Vector3)(ref val)).magnitude < 0.1f)
				{
					val = Vector3.zero;
				}
				else
				{
					float num7 = Mathf.Max(1f, num);
					if (targetPower == 3)
					{
						num7 += 5f;
					}
					else if (targetPower == 1)
					{
						num7 = Mathf.Max(0.5f, num * 0.5f);
					}
					val *= num7;
				}
				Vector3 val2 = Vector3.zero;
				if (num4 > 0f)
				{
					val2 += Vector3.up * num4;
				}
				if (num6 > 0f)
				{
					val2 += Vector3.down * num6;
				}
				val2 = ((!isGrounded) ? (val2 + val) : (val2 + val * 0.1f));
				vel = val2;
				didChange = true;
			}
			else
			{
				didChange = false;
			}
		}

		public void UpdateTriggerAnim()
		{
			//IL_002a: 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)
			((FVRPhysicalObject)this).SetAnimatedComponent(Trigger, Mathf.Lerp(TriggerVars.x, TriggerVars.y, m_triggerVal), TriggerInterpStyle, TriggerAxis);
		}

		public override void UpdateInteraction(FVRViveHand hand)
		{
			//IL_00f0: 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_0123: 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_019e: Unknown result type (might be due to invalid IL or missing references)
			((FVRPhysicalObject)this).UpdateInteraction(hand);
			if (((FVRInteractiveObject)this).m_hasTriggeredUpSinceBegin)
			{
				float triggerFloat = hand.Input.TriggerFloat;
				if (m_triggerVal != triggerFloat)
				{
					m_triggerVal = triggerFloat;
					UpdateTriggerAnim();
				}
			}
			if (((FVRInteractiveObject)this).m_hasTriggeredUpSinceBegin)
			{
				if (hand.Input.TriggerPressed)
				{
					m_isTriggerheld = true;
				}
				else
				{
					m_isTriggerheld = false;
				}
			}
			float num;
			if (hand.IsInStreamlinedMode)
			{
				if (hand.Input.BYButtonPressed)
				{
					num = 12f;
					targetPower = 3;
				}
				else if (hand.Input.AXButtonPressed)
				{
					num = -12f;
					targetPower = 1;
				}
				else
				{
					num = 0f;
					targetPower = 2;
				}
			}
			else if (hand.Input.TouchpadPressed)
			{
				if (Vector2.Angle(hand.Input.TouchpadAxes, Vector2.up) < 45f)
				{
					num = 12f;
					targetPower = 3;
				}
				else if (Vector2.Angle(hand.Input.TouchpadAxes, Vector2.down) < 45f)
				{
					num = -12f;
					targetPower = 1;
				}
				else
				{
					num = 0f;
					targetPower = 2;
				}
			}
			else
			{
				targetPower = 2;
				num = 0f;
			}
			if (num != m_rockerRot)
			{
				m_rockerRot = num;
				RockerButton.localEulerAngles = new Vector3(m_rockerRot, 0f, 0f);
			}
		}

		public override void EndInteraction(FVRViveHand hand)
		{
			((FVRPhysicalObject)this).EndInteraction(hand);
			m_triggerVal = 0f;
			m_isTriggerheld = false;
			UpdateTriggerAnim();
		}
	}
}
namespace MeatKit
{
	public class HideInNormalInspectorAttribute : PropertyAttribute
	{
	}
}
namespace F_Fillet.Bioshock_Drill
{
	[BepInPlugin("F_Fillet.Bioshock_Drill", "Bioshock_Drill", "0.1.0")]
	[BepInProcess("h3vr.exe")]
	[Description("Built with MeatKit")]
	[BepInDependency("h3vr.otherloader", "1.3.0")]
	public class Bioshock_DrillPlugin : BaseUnityPlugin
	{
		private static readonly string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

		internal static ManualLogSource Logger;

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			LoadAssets();
		}

		private void LoadAssets()
		{
			Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "F_Fillet.Bioshock_Drill");
			OtherLoader.RegisterDirectLoad(BasePath, "F_Fillet.Bioshock_Drill", "", "", "bs_drill", "");
		}
	}
}