Decompiled source of IndexFinger v3.0.2

BONELAB/IndexFingers.dll

Decompiled a month ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BoneLib;
using BoneLib.BoneMenu;
using HarmonyLib;
using Il2CppSLZ.Marrow;
using Il2CppSLZ.Marrow.Interaction;
using IndexFingers;
using MelonLoader;
using MelonLoader.Preferences;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("IndexFingers")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany(null)]
[assembly: AssemblyProduct("IndexFingers")]
[assembly: AssemblyCopyright("Created by EvroDev")]
[assembly: AssemblyTrademark(null)]
[assembly: ComVisible(false)]
[assembly: AssemblyFileVersion("2.2.0")]
[assembly: NeutralResourcesLanguage("en")]
[assembly: MelonInfo(typeof(global::IndexFingers.IndexFingers), "IndexFingers", "2.2.0", "EvroDev", null)]
[assembly: MelonGame(null, null)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("2.2.0.0")]
namespace IndexFingers;

public static class BuildInfo
{
	public const string Name = "IndexFingers";

	public const string Author = "EvroDev";

	public const string Company = null;

	public const string Version = "2.2.0";

	public const string DownloadLink = null;
}
public class IndexFingers : MelonMod
{
	[HarmonyPatch(typeof(OpenController), "OnUpdate")]
	public static class ControllerPatch
	{
		public static Vector2 previousValues;

		public static Vector2 ringsMax = Vector2.one;

		public static Vector2 pinkysMax = Vector2.one;

		public static Vector2 middleFingerUsage;

		public static Vector2 buttonPressLengths;

		public static void Postfix(OpenController __instance)
		{
			//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_0010: 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_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_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_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: 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_0105: 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_0111: 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_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: 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)
			Handedness handedness = ((BaseController)__instance).handedness;
			if (((BaseController)__instance)._bButtonDown && !IsHoldingObject(handedness))
			{
				ToggleMiddle(handedness);
			}
			else if (IsHoldingObject(handedness) && IsMiddleToggled(handedness))
			{
				DisableMiddle(handedness);
			}
			if (((BaseController)__instance)._bButton)
			{
				buttonPressLengths.SetFromHandedness(handedness, buttonPressLengths.FromHandedness(handedness) + Time.deltaTime);
				if (buttonPressLengths.FromHandedness(handedness) >= 1f)
				{
					DisableMiddle(handedness);
				}
			}
			else if (buttonPressLengths.FromHandedness(handedness) != 0f)
			{
				buttonPressLengths.SetFromHandedness(handedness, 0f);
			}
			if (HandsWereOpen(handedness) && ((BaseController)__instance)._processedMiddle == 1f)
			{
				RandomizeFingerLimits(handedness);
			}
			previousValues.SetFromHandedness(handedness, ((BaseController)__instance)._processedMiddle);
			float num = ringsMax.FromHandedness(handedness);
			float num2 = pinkysMax.FromHandedness(handedness);
			float num3 = ((middleFingerUsage.FromHandedness(handedness) != 1f) ? 1f : (middleEnabled ? defaultMinimum : 1f));
			((BaseController)__instance)._processedMiddle = (movingFingersEnabled ? Mathf.Clamp(Mathf.Sqrt(((BaseController)__instance)._processedMiddle), defaultMinimum, num3) : Mathf.Clamp(((BaseController)__instance)._processedMiddle, defaultMinimum, num3));
			((BaseController)__instance)._processedIndex = Mathf.Clamp(((BaseController)__instance)._processedIndex, defaultMinimum, 1f);
			((BaseController)__instance)._processedRing = Mathf.Clamp(((BaseController)__instance)._processedRing, defaultMinimum, num);
			((BaseController)__instance)._processedPinky = (movingFingersEnabled ? Mathf.Clamp(Mathf.Pow(((BaseController)__instance)._processedPinky, 2f), defaultMinimum, num2) : Mathf.Clamp(((BaseController)__instance)._processedPinky, defaultMinimum, num2));
		}

		public static void EnableMiddle(Handedness handedness)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			middleFingerUsage.SetFromHandedness(handedness, 1f);
		}

		public static void DisableMiddle(Handedness handedness)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			middleFingerUsage.SetFromHandedness(handedness, 0f);
		}

		public static void ToggleMiddle(Handedness handedness)
		{
			//IL_0001: 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_000c: Unknown result type (might be due to invalid IL or missing references)
			if (IsMiddleToggled(handedness))
			{
				DisableMiddle(handedness);
			}
			else
			{
				EnableMiddle(handedness);
			}
		}

		public static void RandomizeFingerLimits(Handedness handedness)
		{
			//IL_001c: 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_000e: Unknown result type (might be due to invalid IL or missing references)
			if (!closedHandFingerEnabled)
			{
				ResetFingerLimits(handedness);
				return;
			}
			ringsMax.SetFromHandedness(handedness, Random.Range(0.9f, 1f));
			pinkysMax.SetFromHandedness(handedness, Random.Range(0.8f, 1f));
		}

		public static void ResetFingerLimits(Handedness handedness)
		{
			//IL_0006: 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)
			ringsMax.SetFromHandedness(handedness, 1f);
			pinkysMax.SetFromHandedness(handedness, 1f);
		}

		public static bool HandsWereOpen(Handedness handedness)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			return previousValues.FromHandedness(handedness) != 1f;
		}

		public static bool IsMiddleToggled(Handedness handedness)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			return middleFingerUsage.FromHandedness(handedness) == 1f;
		}

		public static bool IsHoldingObject(Handedness handedness)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Invalid comparison between Unknown and I4
			if ((int)handedness == 1)
			{
				return (Object)(object)Player.GetObjectInHand(Player.LeftHand) != (Object)null;
			}
			return (Object)(object)Player.GetObjectInHand(Player.RightHand) != (Object)null;
		}
	}

	public static bool middleEnabled = true;

	public static bool closedHandFingerEnabled = true;

	public static bool movingFingersEnabled = true;

	public static float defaultMinimum = 0.1f;

	public override void OnInitializeMelon()
	{
		//IL_0096: 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_00e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_0166: Unknown result type (might be due to invalid IL or missing references)
		MelonPreferences.CreateCategory("IndexFingers");
		middleEnabled = MelonPreferences.CreateEntry<bool>("IndexFingers", "MidToggle", true, (string)null, (string)null, false, false, (ValueValidator)null).Value;
		movingFingersEnabled = MelonPreferences.CreateEntry<bool>("IndexFingers", "MovingOffset", true, (string)null, (string)null, false, false, (ValueValidator)null).Value;
		closedHandFingerEnabled = MelonPreferences.CreateEntry<bool>("IndexFingers", "GrabbedOffset", true, (string)null, (string)null, false, false, (ValueValidator)null).Value;
		defaultMinimum = MelonPreferences.CreateEntry<float>("IndexFingers", "DefaultCurl", 0.1f, (string)null, (string)null, false, false, (ValueValidator)null).Value;
		Page val = Page.Root.CreatePage("IndexFingers", Color.white, 0, true);
		val.CreateBool("Middle Finger Toggling", Color.white, MelonPreferences.GetEntryValue<bool>("IndexFingers", "MidToggle"), (Action<bool>)delegate(bool b)
		{
			middleEnabled = b;
		});
		val.CreateBool("Moving Finger Offset", Color.white, MelonPreferences.GetEntryValue<bool>("IndexFingers", "MovingOffset"), (Action<bool>)delegate(bool b)
		{
			movingFingersEnabled = b;
		});
		val.CreateBool("Grabbed Finger Offset", Color.white, MelonPreferences.GetEntryValue<bool>("IndexFingers", "GrabbedOffset"), (Action<bool>)delegate(bool b)
		{
			closedHandFingerEnabled = b;
		});
		val.CreateFloat("Default Curl Amount", Color.white, MelonPreferences.GetEntryValue<float>("IndexFingers", "DefaultCurl"), 0.01f, 0f, 1f, (Action<float>)delegate(float f)
		{
			defaultMinimum = f;
		});
	}

	public override void OnApplicationQuit()
	{
		MelonPreferences.SetEntryValue<bool>("IndexFingers", "MidToggle", middleEnabled);
		MelonPreferences.SetEntryValue<bool>("IndexFingers", "MovingOffset", movingFingersEnabled);
		MelonPreferences.SetEntryValue<bool>("IndexFingers", "GrabbedOffset", closedHandFingerEnabled);
		MelonPreferences.SetEntryValue<float>("IndexFingers", "DefaultCurl", defaultMinimum);
	}
}
public static class StupidExtensionsForVeryBreifSimplificationKinda
{
	public static float FromHandedness(this Vector2 vector, Handedness handedness)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Invalid comparison between Unknown and I4
		//IL_0014: 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)
		if ((int)handedness == 1)
		{
			return vector.x;
		}
		return vector.y;
	}

	public static void SetFromHandedness(this ref Vector2 vector, Handedness handedness, float value)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Invalid comparison between Unknown and I4
		if ((int)handedness == 1)
		{
			vector.x = value;
		}
		else
		{
			vector.y = value;
		}
	}
}

BONEWORKS/IndexFingersBW.dll

Decompiled a month ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using HarmonyLib;
using IndexFingersBW;
using MelonLoader;
using MelonLoader.Preferences;
using ModThatIsNotMod;
using ModThatIsNotMod.BoneMenu;
using StressLevelZero;
using StressLevelZero.Rig;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("IndexFingersBW")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany(null)]
[assembly: AssemblyProduct("IndexFingersBW")]
[assembly: AssemblyCopyright("Created by ")]
[assembly: AssemblyTrademark(null)]
[assembly: ComVisible(false)]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: NeutralResourcesLanguage("en")]
[assembly: MelonInfo(typeof(global::IndexFingersBW.IndexFingersBW), "IndexFingersBW", "1.0.0", null, null)]
[assembly: MelonGame(null, null)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace IndexFingersBW;

public static class BuildInfo
{
	public const string Name = "IndexFingersBW";

	public const string Author = null;

	public const string Company = null;

	public const string Version = "1.0.0";

	public const string DownloadLink = null;
}
public class IndexFingersBW : MelonMod
{
	[HarmonyPatch(typeof(Controller), "OnUpdate")]
	public static class ControllerPatch
	{
		public static Vector2 previousValues;

		public static Vector2 ringsMax = Vector2.one;

		public static Vector2 pinkysMax = Vector2.one;

		public static Vector2 middleFingerUsage;

		public static Vector2 buttonPressLengths;

		public static void Postfix(Controller __instance)
		{
			//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_0010: 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_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_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_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: 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_0105: 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_0111: 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_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: 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)
			Handedness handedness = ((BaseController)__instance).handedness;
			if (__instance._bButtonDown && !IsHoldingObject(handedness))
			{
				ToggleMiddle(handedness);
			}
			else if (IsHoldingObject(handedness) && IsMiddleToggled(handedness))
			{
				DisableMiddle(handedness);
			}
			if (__instance._bButton)
			{
				buttonPressLengths.SetFromHandedness(handedness, buttonPressLengths.FromHandedness(handedness) + Time.deltaTime);
				if (buttonPressLengths.FromHandedness(handedness) >= 1f)
				{
					DisableMiddle(handedness);
				}
			}
			else if (buttonPressLengths.FromHandedness(handedness) != 0f)
			{
				buttonPressLengths.SetFromHandedness(handedness, 0f);
			}
			if (HandsWereOpen(handedness) && __instance._processedMiddle == 1f)
			{
				RandomizeFingerLimits(handedness);
			}
			previousValues.SetFromHandedness(handedness, __instance._processedMiddle);
			float num = ringsMax.FromHandedness(handedness);
			float num2 = pinkysMax.FromHandedness(handedness);
			float num3 = ((middleFingerUsage.FromHandedness(handedness) != 1f) ? 1f : (middleEnabled ? defaultMinimum : 1f));
			__instance._processedMiddle = (movingFingersEnabled ? Mathf.Clamp(Mathf.Sqrt(__instance._processedMiddle), defaultMinimum, num3) : Mathf.Clamp(__instance._processedMiddle, defaultMinimum, num3));
			__instance._processedIndex = Mathf.Clamp(__instance._processedIndex, defaultMinimum, 1f);
			__instance._processedRing = Mathf.Clamp(__instance._processedRing, defaultMinimum, num);
			__instance._processedPinky = (movingFingersEnabled ? Mathf.Clamp(Mathf.Pow(__instance._processedPinky, 2f), defaultMinimum, num2) : Mathf.Clamp(__instance._processedPinky, defaultMinimum, num2));
		}

		public static void EnableMiddle(Handedness handedness)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			middleFingerUsage.SetFromHandedness(handedness, 1f);
		}

		public static void DisableMiddle(Handedness handedness)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			middleFingerUsage.SetFromHandedness(handedness, 0f);
		}

		public static void ToggleMiddle(Handedness handedness)
		{
			//IL_0001: 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_000c: Unknown result type (might be due to invalid IL or missing references)
			if (IsMiddleToggled(handedness))
			{
				DisableMiddle(handedness);
			}
			else
			{
				EnableMiddle(handedness);
			}
		}

		public static void RandomizeFingerLimits(Handedness handedness)
		{
			//IL_001c: 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_000e: Unknown result type (might be due to invalid IL or missing references)
			if (!closedHandFingerEnabled)
			{
				ResetFingerLimits(handedness);
				return;
			}
			ringsMax.SetFromHandedness(handedness, Random.Range(0.9f, 1f));
			pinkysMax.SetFromHandedness(handedness, Random.Range(0.8f, 1f));
		}

		public static void ResetFingerLimits(Handedness handedness)
		{
			//IL_0006: 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)
			ringsMax.SetFromHandedness(handedness, 1f);
			pinkysMax.SetFromHandedness(handedness, 1f);
		}

		public static bool HandsWereOpen(Handedness handedness)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			return previousValues.FromHandedness(handedness) != 1f;
		}

		public static bool IsMiddleToggled(Handedness handedness)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			return middleFingerUsage.FromHandedness(handedness) == 1f;
		}

		public static bool IsHoldingObject(Handedness handedness)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Invalid comparison between Unknown and I4
			if ((int)handedness == 1)
			{
				return (Object)(object)Player.GetObjectInHand(Player.leftHand) != (Object)null;
			}
			return (Object)(object)Player.GetObjectInHand(Player.rightHand) != (Object)null;
		}
	}

	public static bool middleEnabled = true;

	public static bool closedHandFingerEnabled = true;

	public static bool movingFingersEnabled = true;

	public static float defaultMinimum = 0.1f;

	public override void OnInitializeMelon()
	{
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bd: 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_013b: Unknown result type (might be due to invalid IL or missing references)
		MelonPreferences.CreateCategory("IndexFingersBW");
		MelonPreferences.CreateEntry<bool>("IndexFingersBW", "MidToggle", true, (string)null, (string)null, false, false, (ValueValidator)null);
		MelonPreferences.CreateEntry<bool>("IndexFingersBW", "MovingOffset", true, (string)null, (string)null, false, false, (ValueValidator)null);
		MelonPreferences.CreateEntry<bool>("IndexFingersBW", "GrabbedOffset", true, (string)null, (string)null, false, false, (ValueValidator)null);
		MelonPreferences.CreateEntry<float>("IndexFingersBW", "DefaultCurl", 0.1f, (string)null, (string)null, false, false, (ValueValidator)null);
		MenuCategory val = MenuManager.CreateCategory("IndexFingers", Color.white);
		val.CreateBoolElement("Middle Finger Toggling", Color.white, MelonPreferences.GetEntryValue<bool>("IndexFingersBW", "MidToggle"), (Action<bool>)delegate(bool b)
		{
			middleEnabled = b;
		});
		val.CreateBoolElement("Moving Finger Offset", Color.white, MelonPreferences.GetEntryValue<bool>("IndexFingersBW", "MovingOffset"), (Action<bool>)delegate(bool b)
		{
			movingFingersEnabled = b;
		});
		val.CreateBoolElement("Grabbed Finger Offset", Color.white, MelonPreferences.GetEntryValue<bool>("IndexFingersBW", "GrabbedOffset"), (Action<bool>)delegate(bool b)
		{
			closedHandFingerEnabled = b;
		});
		val.CreateFloatElement("Default Curl Amount", Color.white, MelonPreferences.GetEntryValue<float>("IndexFingersBW", "DefaultCurl"), (Action<float>)delegate(float f)
		{
			defaultMinimum = f;
		}, 0.01f, 0f, 1f, false);
	}

	public override void OnApplicationQuit()
	{
		MelonPreferences.SetEntryValue<bool>("IndexFingersBW", "MidToggle", middleEnabled);
		MelonPreferences.SetEntryValue<bool>("IndexFingersBW", "MovingOffset", movingFingersEnabled);
		MelonPreferences.SetEntryValue<bool>("IndexFingersBW", "GrabbedOffset", closedHandFingerEnabled);
		MelonPreferences.SetEntryValue<float>("IndexFingersBW", "DefaultCurl", defaultMinimum);
	}
}
public static class StupidExtensionsForVeryBreifSimplificationKinda
{
	public static float FromHandedness(this Vector2 vector, Handedness handedness)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Invalid comparison between Unknown and I4
		//IL_0014: 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)
		if ((int)handedness == 1)
		{
			return vector.x;
		}
		return vector.y;
	}

	public static void SetFromHandedness(this ref Vector2 vector, Handedness handedness, float value)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Invalid comparison between Unknown and I4
		if ((int)handedness == 1)
		{
			vector.x = value;
		}
		else
		{
			vector.y = value;
		}
	}
}