Decompiled source of Toggles v1.3.0

plugins/Toggles/Toggles.dll

Decompiled 10 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using BepInEx.NET.Common;
using BepInExResoniteShim;
using BepisLocaleLoader;
using Elements.Core;
using FrooxEngine;
using FrooxEngine.ProtoFlux;
using FrooxEngine.UIX;
using HarmonyLib;
using Renderite.Shared;
using SkyFrost.Base;
using Toggles;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v10.0", FrameworkDisplayName = ".NET 10.0")]
[assembly: AssemblyCompany("LeCloutPanda, NepuShiro, art0007i, Gyztor")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.3.0.0")]
[assembly: AssemblyInformationalVersion("1.3.0+7be280f40506ac449f542aba1d976c3178cc2b10")]
[assembly: AssemblyProduct("Toggles")]
[assembly: AssemblyTitle("Toggles")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/lecloutpanda/Toggles")]
[assembly: AssemblyVersion("1.3.0.0")]
[module: RefSafetyRules(11)]
[CompilerGenerated]
internal delegate TResult <>f__AnonymousDelegate0<T1, T2, T3, T4, T5, TResult>(T1 arg1, T2 arg2, T3 arg3, out T4 arg4, T5 arg5 = default(T5));
[HarmonyPatch(typeof(ContactItem), "Update", new global::System.Type[]
{
	typeof(Contact),
	typeof(ContactData)
})]
public static class ContactsPagePatch
{
	public static void Postfix(Contact contact, ContactData data, SyncRef<Button> ____joinButton)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Invalid comparison between Unknown and I4
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		if (!Plugin.CONTACT_ASK_TO_JOIN_BUTTON.Value && contact.IsAccepted && (int)contact.ContactStatus == 5 && data != null && data.CurrentSessionInfo == null && (int)data.CurrentStatus.OnlineStatus.GetValueOrDefault() != 0 && ____joinButton != null)
		{
			Button target = ____joinButton.Target;
			if (target != null)
			{
				((Component)target).Slot.ActiveSelf = false;
			}
		}
	}
}
[HarmonyPatch(typeof(HapticHelper))]
public static class ControllerHapticsPatch
{
	[HarmonyPatch("TryVibrateShort")]
	[HarmonyPrefix]
	public static bool TryShortVibratePatch(this Slot slot)
	{
		if (!Plugin.CONTROLLER_HAPTIC_DASH.Value && WorldExtensions.IsUserspace(((Worker)slot).World))
		{
			return false;
		}
		if (!Plugin.CONTROLLER_HAPTIC_WORLD.Value && !WorldExtensions.IsUserspace(((Worker)slot).World))
		{
			return false;
		}
		return true;
	}

	[HarmonyPatch("TryVibrateMedium")]
	[HarmonyPrefix]
	public static bool TryVibrateMediumPatch(this Slot slot)
	{
		if (!Plugin.CONTROLLER_HAPTIC_DASH.Value && WorldExtensions.IsUserspace(((Worker)slot).World))
		{
			return false;
		}
		if (!Plugin.CONTROLLER_HAPTIC_WORLD.Value && !WorldExtensions.IsUserspace(((Worker)slot).World))
		{
			return false;
		}
		return true;
	}

	[HarmonyPatch("TryVibrateLong")]
	[HarmonyPrefix]
	public static bool TryVibrateLongPatch(this Slot slot)
	{
		if (!Plugin.CONTROLLER_HAPTIC_DASH.Value && WorldExtensions.IsUserspace(((Worker)slot).World))
		{
			return false;
		}
		if (!Plugin.CONTROLLER_HAPTIC_WORLD.Value && !WorldExtensions.IsUserspace(((Worker)slot).World))
		{
			return false;
		}
		return true;
	}

	[HarmonyPatch("TryVibrateRelative")]
	[HarmonyPrefix]
	public static bool TryVibrateRelativePatch(this Slot slot)
	{
		if (!Plugin.CONTROLLER_HAPTIC_DASH.Value && WorldExtensions.IsUserspace(((Worker)slot).World))
		{
			return false;
		}
		if (!Plugin.CONTROLLER_HAPTIC_WORLD.Value && !WorldExtensions.IsUserspace(((Worker)slot).World))
		{
			return false;
		}
		return true;
	}
}
[HarmonyPatch]
public static class DevToolPatch
{
	[HarmonyPatch]
	public static class DevToolAddItemPatch
	{
		private static MethodBase TargetMethod()
		{
			return (MethodBase)(object)AccessTools.Method(typeof(ContextMenu), "AddItem", new global::System.Type[4]
			{
				typeof(LocaleString).MakeByRefType(),
				typeof(Uri),
				typeof(colorX?).MakeByRefType(),
				typeof(ButtonEventHandler)
			}, (global::System.Type[])null);
		}

		[HarmonyPostfix]
		private static void Postfix(ContextMenu __instance, in LocaleString label, Uri? icon, in colorX? color, ButtonEventHandler action)
		{
			//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_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Expected O, but got Unknown
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Expected O, but got Unknown
			if (!Plugin.DEVTOOL_GIZMOSNAPPING_BUTTON.Value || WorldExtensions.IsUserspace(((Worker)__instance).World) || __instance == null || !((Component)__instance).Slot.ActiveUser.IsLocalUser || label.content != "Tools.Dev.Scale" || Dynvar == null)
			{
				return;
			}
			LocaleString val = LocaleLoader.T("Settings.dev.lecloutpanda.Toggles.DevTool.GizmoSnapping", "Toggle Gizmo Snapping", true, (Dictionary<string, object>)null);
			Uri val2 = new Uri("resdb:///2cc67da92ecbf3ff611e177f8e53aca5d535dd6339f0779b3dc8d660ed0585c3.png");
			colorX? val3 = (Sync<bool>.op_Implicit(Dynvar.Value) ? colorX.Green : colorX.Red);
			ContextMenuItem item = __instance.AddItem(ref val, val2, ref val3);
			item.Button.LocalPressed += (ButtonEventHandler)delegate
			{
				//IL_002a: 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_0073: Unknown result type (might be due to invalid IL or missing references)
				if (Dynvar != null)
				{
					((SyncField<colorX>)(object)item.Color).Value = (Sync<bool>.op_Implicit(Dynvar.Value) ? colorX.Green : colorX.Red);
					Plugin.DEVTOOL_GIZMOSNAPPING_VALUE.Value = Sync<bool>.op_Implicit(Dynvar.Value);
					DevTool? tool = _tool;
					if (tool != null)
					{
						DynamicVariableHelper.WriteDynamicVariable<bool>(((Component)tool).Slot, "Mod.Toggles/ToggleGizmoSnapping", !Sync<bool>.op_Implicit(Dynvar.Value));
					}
				}
			};
		}
	}

	[Serializable]
	[CompilerGenerated]
	private sealed class <>c
	{
		public static readonly <>c <>9 = new <>c();

		public static Action<ITool> <>9__13_2;

		public static Action<World> <>9__13_1;

		public static EventHandler <>9__13_0;

		public static Predicate<DynamicVariableSpace> <>9__14_1;

		public static Predicate<DynamicValueVariable<bool>> <>9__14_2;

		internal void <InitSubs>b__13_0(object? _, EventArgs _)
		{
			List<World> val = Pool.BorrowList<World>();
			Engine.Current.WorldManager.GetWorlds(val);
			CollectionExtensions.Do<World>((global::System.Collections.Generic.IEnumerable<World>)val, (Action<World>)delegate(World w)
			{
				CollectionExtensions.Do<ITool>(InteractionHandlerExtensions.GetActiveTools(w.LocalUser), (Action<ITool>)delegate(ITool t)
				{
					//IL_0043: Unknown result type (might be due to invalid IL or missing references)
					if (t != null && ((IComponent)t).Slot.ActiveUser.IsLocalUser)
					{
						Slot slot = ((IComponent)t).Slot;
						ToolMultiplexer val2 = (ToolMultiplexer)(object)((t is ToolMultiplexer) ? t : null);
						if (val2 != null)
						{
							slot = ((IComponent)val2.ActiveTool).Slot;
						}
						DynamicVariableHelper.WriteDynamicVariable<bool>(slot, "Mod.Toggles/ToggleGizmoSnapping", Plugin.DEVTOOL_GIZMOSNAPPING_VALUE.Value);
					}
				});
			});
		}

		internal void <InitSubs>b__13_1(World w)
		{
			CollectionExtensions.Do<ITool>(InteractionHandlerExtensions.GetActiveTools(w.LocalUser), (Action<ITool>)delegate(ITool t)
			{
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				if (t != null && ((IComponent)t).Slot.ActiveUser.IsLocalUser)
				{
					Slot slot = ((IComponent)t).Slot;
					ToolMultiplexer val = (ToolMultiplexer)(object)((t is ToolMultiplexer) ? t : null);
					if (val != null)
					{
						slot = ((IComponent)val.ActiveTool).Slot;
					}
					DynamicVariableHelper.WriteDynamicVariable<bool>(slot, "Mod.Toggles/ToggleGizmoSnapping", Plugin.DEVTOOL_GIZMOSNAPPING_VALUE.Value);
				}
			});
		}

		internal void <InitSubs>b__13_2(ITool t)
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			if (t != null && ((IComponent)t).Slot.ActiveUser.IsLocalUser)
			{
				Slot slot = ((IComponent)t).Slot;
				ToolMultiplexer val = (ToolMultiplexer)(object)((t is ToolMultiplexer) ? t : null);
				if (val != null)
				{
					slot = ((IComponent)val.ActiveTool).Slot;
				}
				DynamicVariableHelper.WriteDynamicVariable<bool>(slot, "Mod.Toggles/ToggleGizmoSnapping", Plugin.DEVTOOL_GIZMOSNAPPING_VALUE.Value);
			}
		}

		internal bool <SetupDynvars>b__14_1(DynamicVariableSpace x)
		{
			return ((SyncField<string>)(object)x.SpaceName).Value == "Mod.Toggles";
		}

		internal bool <SetupDynvars>b__14_2(DynamicValueVariable<bool> x)
		{
			return ((SyncField<string>)(object)((DynamicVariableBase<bool>)(object)x).VariableName).Value == "Mod.Toggles/ToggleGizmoSnapping";
		}
	}

	[CompilerGenerated]
	private sealed class <ToggleSnappingTranspiler>d__16 : global::System.Collections.Generic.IEnumerable<CodeInstruction>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<CodeInstruction>, global::System.Collections.IEnumerator, global::System.IDisposable
	{
		private int <>1__state;

		private CodeInstruction <>2__current;

		private int <>l__initialThreadId;

		private global::System.Collections.Generic.IEnumerable<CodeInstruction> codes;

		public global::System.Collections.Generic.IEnumerable<CodeInstruction> <>3__codes;

		private MethodInfo <lookFor>5__2;

		private bool <found>5__3;

		private global::System.Collections.Generic.IEnumerator<CodeInstruction> <>7__wrap3;

		CodeInstruction global::System.Collections.Generic.IEnumerator<CodeInstruction>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object global::System.Collections.IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <ToggleSnappingTranspiler>d__16(int <>1__state)
		{
			this.<>1__state = <>1__state;
			<>l__initialThreadId = Environment.CurrentManagedThreadId;
		}

		[DebuggerHidden]
		void global::System.IDisposable.Dispose()
		{
			int num = <>1__state;
			if (num == -3 || (uint)(num - 1) <= 1u)
			{
				try
				{
				}
				finally
				{
					<>m__Finally1();
				}
			}
			<lookFor>5__2 = null;
			<>7__wrap3 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_008a: 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_00b9: Expected O, but got Unknown
			try
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<lookFor>5__2 = AccessTools.Method(typeof(SnapHelper), "GetBestSnapPoint", (global::System.Type[])null, (global::System.Type[])null);
					<found>5__3 = false;
					<>7__wrap3 = codes.GetEnumerator();
					<>1__state = -3;
					break;
				case 1:
					<>1__state = -3;
					break;
				case 2:
					<>1__state = -3;
					break;
				}
				if (((global::System.Collections.IEnumerator)<>7__wrap3).MoveNext())
				{
					CodeInstruction current = <>7__wrap3.Current;
					if (CodeInstructionExtensions.Calls(current, <lookFor>5__2))
					{
						<found>5__3 = true;
						<>2__current = new CodeInstruction(OpCodes.Call, (object)((global::System.Delegate)new <>f__AnonymousDelegate0<World, float3, float, IPointSnappable, Predicate<IPointSnappable>, float3?>(BestSnapPointDummy)).Method);
						<>1__state = 1;
						return true;
					}
					<>2__current = current;
					<>1__state = 2;
					return true;
				}
				<>m__Finally1();
				<>7__wrap3 = null;
				if (!<found>5__3)
				{
					Plugin.Log.LogError((object)"Failed to patch ToggleSnappingTranspiler");
				}
				return false;
			}
			catch
			{
				//try-fault
				((global::System.IDisposable)this).Dispose();
				throw;
			}
		}

		bool global::System.Collections.IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		private void <>m__Finally1()
		{
			<>1__state = -1;
			if (<>7__wrap3 != null)
			{
				((global::System.IDisposable)<>7__wrap3).Dispose();
			}
		}

		[DebuggerHidden]
		void global::System.Collections.IEnumerator.Reset()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			throw new NotSupportedException();
		}

		[DebuggerHidden]
		global::System.Collections.Generic.IEnumerator<CodeInstruction> global::System.Collections.Generic.IEnumerable<CodeInstruction>.GetEnumerator()
		{
			<ToggleSnappingTranspiler>d__16 <ToggleSnappingTranspiler>d__;
			if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
			{
				<>1__state = 0;
				<ToggleSnappingTranspiler>d__ = this;
			}
			else
			{
				<ToggleSnappingTranspiler>d__ = new <ToggleSnappingTranspiler>d__16(0);
			}
			<ToggleSnappingTranspiler>d__.codes = <>3__codes;
			return <ToggleSnappingTranspiler>d__;
		}

		[DebuggerHidden]
		global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
		{
			return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<CodeInstruction>)this).GetEnumerator();
		}
	}

	private const string DynvarSpaceName = "Mod.Toggles";

	private const string DynvarName = "Mod.Toggles/ToggleGizmoSnapping";

	private static DevTool? _tool;

	[field: CompilerGenerated]
	private static DynamicVariableSpace? DynvarSpace
	{
		[CompilerGenerated]
		get;
		[CompilerGenerated]
		set;
	}

	[field: CompilerGenerated]
	private static DynamicValueVariable<bool>? Dynvar
	{
		[CompilerGenerated]
		get;
		[CompilerGenerated]
		set;
	}

	private static bool ShouldSnap => ((SyncField<bool>)(object)Dynvar?.Value).Value ?? true;

	public static void InitSubs()
	{
		//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_0024: Expected O, but got Unknown
		ConfigEntry<bool> dEVTOOL_GIZMOSNAPPING_VALUE = Plugin.DEVTOOL_GIZMOSNAPPING_VALUE;
		object obj = <>c.<>9__13_0;
		if (obj == null)
		{
			EventHandler val = delegate
			{
				List<World> val2 = Pool.BorrowList<World>();
				Engine.Current.WorldManager.GetWorlds(val2);
				CollectionExtensions.Do<World>((global::System.Collections.Generic.IEnumerable<World>)val2, (Action<World>)delegate(World w)
				{
					CollectionExtensions.Do<ITool>(InteractionHandlerExtensions.GetActiveTools(w.LocalUser), (Action<ITool>)delegate(ITool t)
					{
						//IL_0043: Unknown result type (might be due to invalid IL or missing references)
						if (t != null && ((IComponent)t).Slot.ActiveUser.IsLocalUser)
						{
							Slot slot = ((IComponent)t).Slot;
							ToolMultiplexer val3 = (ToolMultiplexer)(object)((t is ToolMultiplexer) ? t : null);
							if (val3 != null)
							{
								slot = ((IComponent)val3.ActiveTool).Slot;
							}
							DynamicVariableHelper.WriteDynamicVariable<bool>(slot, "Mod.Toggles/ToggleGizmoSnapping", Plugin.DEVTOOL_GIZMOSNAPPING_VALUE.Value);
						}
					});
				});
			};
			<>c.<>9__13_0 = val;
			obj = (object)val;
		}
		dEVTOOL_GIZMOSNAPPING_VALUE.SettingChanged += (EventHandler)obj;
	}

	[HarmonyPatch(typeof(DevTool), "OnEquipped")]
	[HarmonyPostfix]
	private static void SetupDynvars(DevTool __instance)
	{
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Expected O, but got Unknown
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		if (__instance == null || ((Component)__instance).Slot.ActiveUser != ((Worker)__instance).LocalUser || WorldExtensions.IsUserspace(((Worker)__instance).World))
		{
			return;
		}
		_tool = __instance;
		((ComponentBase<Component>)(object)__instance).RunInUpdates(3, (Action)delegate
		{
			DynvarSpace = ((ContainerWorker<Component>)(object)((Component)__instance).Slot).GetComponentOrAttach<DynamicVariableSpace>((Predicate<DynamicVariableSpace>)((DynamicVariableSpace x) => ((SyncField<string>)(object)x.SpaceName).Value == "Mod.Toggles"));
			if (DynvarSpace != null)
			{
				((ComponentBase<Component>)(object)DynvarSpace).Persistent = false;
				((SyncField<string>)(object)DynvarSpace.SpaceName).Value = "Mod.Toggles";
				((SyncField<bool>)(object)DynvarSpace.OnlyDirectBinding).Value = true;
				Dynvar = ((ContainerWorker<Component>)(object)((Component)__instance).Slot).GetComponentOrAttach<DynamicValueVariable<bool>>((Predicate<DynamicValueVariable<bool>>)((DynamicValueVariable<bool> x) => ((SyncField<string>)(object)((DynamicVariableBase<bool>)(object)x).VariableName).Value == "Mod.Toggles/ToggleGizmoSnapping"));
				if (Dynvar != null)
				{
					((ComponentBase<Component>)(object)Dynvar).Persistent = false;
					((SyncField<string>)(object)((DynamicVariableBase<bool>)(object)Dynvar).VariableName).Value = "Mod.Toggles/ToggleGizmoSnapping";
					((SyncField<bool>)(object)Dynvar.Value).Value = Plugin.DEVTOOL_GIZMOSNAPPING_VALUE.Value;
				}
			}
		});
	}

	[IteratorStateMachine(typeof(<ToggleSnappingTranspiler>d__16))]
	[HarmonyPatch(typeof(Gizmo), "UpdatePoint", new global::System.Type[]
	{
		typeof(Component),
		typeof(float3),
		typeof(float3)
	})]
	[HarmonyTranspiler]
	public static global::System.Collections.Generic.IEnumerable<CodeInstruction> ToggleSnappingTranspiler(global::System.Collections.Generic.IEnumerable<CodeInstruction> codes)
	{
		MethodInfo lookFor = AccessTools.Method(typeof(SnapHelper), "GetBestSnapPoint", (global::System.Type[])null, (global::System.Type[])null);
		bool found = false;
		global::System.Collections.Generic.IEnumerator<CodeInstruction> enumerator = codes.GetEnumerator();
		try
		{
			while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
			{
				CodeInstruction current = enumerator.Current;
				if (CodeInstructionExtensions.Calls(current, lookFor))
				{
					found = true;
					yield return new CodeInstruction(OpCodes.Call, (object)((global::System.Delegate)new <>f__AnonymousDelegate0<World, float3, float, IPointSnappable, Predicate<IPointSnappable>, float3?>(BestSnapPointDummy)).Method);
				}
				else
				{
					yield return current;
				}
			}
		}
		finally
		{
			((global::System.IDisposable)enumerator)?.Dispose();
		}
		if (!found)
		{
			Plugin.Log.LogError((object)"Failed to patch ToggleSnappingTranspiler");
		}
	}

	private static float3? BestSnapPointDummy(World world, float3 globalPoint, float checkRadius, out IPointSnappable snappable, Predicate<IPointSnappable> snappableFilter = null)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		if (!ShouldSnap)
		{
			snappable = null;
			return null;
		}
		return SnapHelper.GetBestSnapPoint(world, globalPoint, checkRadius, ref snappable, snappableFilter);
	}
}
[HarmonyPatch]
public static class InspectorPatch
{
	private static Slot ComponentViewTarget;

	private static ButtonEventData EventData;

	[HarmonyPatch(typeof(SceneInspector), "OnAddChildPressed")]
	[HarmonyPrefix]
	public static void AddChildPostfix(IButton button, ButtonEventData eventData, SceneInspector __instance)
	{
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		ComponentViewTarget = __instance.ComponentView.Target;
		EventData = eventData;
	}

	[HarmonyPatch(typeof(Slot), "AddSlot")]
	[HarmonyPostfix]
	public static void AddSlotPostfix(Slot __result)
	{
		if (Plugin.SLOT_TAG_INHERITANCE.Value)
		{
			return;
		}
		try
		{
			if (__result != null && !__result.IsDestroying && !((ContainerWorker<Component>)(object)__result).IsDestroyed && EventData.source != null && EventData.source.IsUnderLocalUser && ComponentViewTarget != null && ((!ComponentViewTarget.IsDestroying && !((ContainerWorker<Component>)(object)ComponentViewTarget).IsDestroyed) || __result.Name.Contains(ComponentViewTarget.Name)) && !(__result.Tag != ComponentViewTarget.Tag) && __result.Parent != null && !__result.Parent.IsDestroying && !((ContainerWorker<Component>)(object)__result.Parent).IsDestroyed && __result.Parent == ComponentViewTarget)
			{
				__result.Tag = null;
				ComponentViewTarget = null;
			}
		}
		catch (global::System.Exception ex)
		{
			Plugin.Log.LogMessage((object)("Failed to remove inherited tag for reason: " + (object)ex));
		}
	}
}
[HarmonyPatch(typeof(InventoryBrowser), "OnItemSelected")]
public static class InventoryBrowserPatch
{
	[HarmonyPostfix]
	public static void Postfix(SyncRef<Button> ____addCurrentAvatar, SyncRef<Button> ____copyLink)
	{
		try
		{
			if (!Plugin.INVENTORY_SAVE_AVATAR_BUTTON.Value)
			{
				Button target = ____addCurrentAvatar.Target;
				if (target != null)
				{
					((Component)target).Slot.ActiveSelf = false;
				}
			}
			if (!Plugin.INVENTORY_GET_URL_BUTTON.Value)
			{
				Button target2 = ____copyLink.Target;
				if (target2 != null)
				{
					((Component)target2).Slot.ActiveSelf = false;
				}
			}
		}
		catch (global::System.Exception ex)
		{
			Plugin.Log.LogError((object)ex);
		}
	}
}
[HarmonyPatch(typeof(DualControllerBindingGenerator), "BindJump")]
internal static class NoJumpPatch
{
	[HarmonyPrefix]
	private static bool BindJumpPrefix(InputGroup group, IDualBindingController left, IDualBindingController right, ref AnyInput __result)
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Expected O, but got Unknown
		AnyInput val = new AnyInput(global::System.Array.Empty<IInputNode<bool>>());
		if (Plugin.MAYBE_JUMP_LEFT.Value && left != null)
		{
			left.BindNodeActions(group, (IInputNode)(object)val, "Jump");
		}
		if (Plugin.MAYBE_JUMP_RIGHT.Value && right != null)
		{
			right.BindNodeActions(group, (IInputNode)(object)val, "Jump");
		}
		__result = val;
		return false;
	}
}
[HarmonyPatch(typeof(ProtoFluxTool), "GenerateMenuItems")]
public static class OverviewModePatch
{
	private static readonly MethodInfo ToggleOverviewMethod = AccessTools.Method(typeof(ProtoFluxTool), "ToggleOverviewMode", (global::System.Type[])null, (global::System.Type[])null);

	[HarmonyTranspiler]
	private static global::System.Collections.Generic.IEnumerable<CodeInstruction> Transpiler(global::System.Collections.Generic.IEnumerable<CodeInstruction> codes, ILGenerator generator)
	{
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Expected O, but got Unknown
		//IL_0072: 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_0084: Expected O, but got Unknown
		//IL_0086: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Expected O, but got Unknown
		//IL_00bc: 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_00ce: Expected O, but got Unknown
		//IL_00d0: 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_00e2: Expected O, but got Unknown
		//IL_0119: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0125: Expected O, but got Unknown
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_012d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Expected O, but got Unknown
		//IL_0135: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0160: Expected O, but got Unknown
		MethodInfo val = AccessTools.Method(typeof(ContextMenu), "AddItem", new global::System.Type[4]
		{
			typeof(LocaleString).MakeByRefType(),
			typeof(Uri),
			typeof(colorX?).MakeByRefType(),
			typeof(ButtonEventHandler)
		}, (global::System.Type[])null);
		List<CodeInstruction> val2 = Enumerable.ToList<CodeInstruction>(codes);
		CodeMatcher val3 = new CodeMatcher((global::System.Collections.Generic.IEnumerable<CodeInstruction>)val2, generator);
		val3.MatchStartForward((CodeMatch[])(object)new CodeMatch[2]
		{
			new CodeMatch((OpCode?)OpCodes.Ldarg_2, (object)null, (string)null),
			new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"Tools.ProtoFlux.Overview", (string)null)
		});
		if (!val3.IsValid)
		{
			return (global::System.Collections.Generic.IEnumerable<CodeInstruction>)val2;
		}
		int pos = val3.Pos;
		val3.MatchEndForward((CodeMatch[])(object)new CodeMatch[2]
		{
			new CodeMatch((OpCode?)OpCodes.Callvirt, (object)val, (string)null),
			new CodeMatch((OpCode?)OpCodes.Pop, (object)null, (string)null)
		});
		if (!val3.IsValid)
		{
			return (global::System.Collections.Generic.IEnumerable<CodeInstruction>)val2;
		}
		int pos2 = val3.Pos;
		val3.Start().Advance(pos).RemoveInstructions(pos2 - pos + 1)
			.Insert((CodeInstruction[])(object)new CodeInstruction[3]
			{
				new CodeInstruction(OpCodes.Ldarg_0, (object)null),
				new CodeInstruction(OpCodes.Ldarg_2, (object)null),
				new CodeInstruction(OpCodes.Call, (object)((global::System.Delegate)(object)new Action<ProtoFluxTool, ContextMenu>(AddItemProxy)).Method)
			});
		return val3.InstructionEnumeration();
	}

	private static void AddItemProxy(ProtoFluxTool tool, ContextMenu menu)
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		try
		{
			if (Plugin.PROTOFLUX_OVERVIEW_BUTTON.Value && menu != null)
			{
				LocaleString val = LocaleHelper.AsLocaleKey("Tools.ProtoFlux.Overview", (string)null, true, (Dictionary<string, object>)null);
				colorX? val2 = new colorX(1f, 1f, 0f, 1f, (ColorProfile)1);
				menu.AddItem(ref val, (Uri)null, ref val2, ToggleOverviewMethod.CreateDelegate<ButtonEventHandler>((object)tool));
			}
		}
		catch (global::System.Exception ex)
		{
			Plugin.Log.LogError((object)ex);
		}
	}
}
[HarmonyPatch]
public static class WikiIntegrationPatch
{
	[CompilerGenerated]
	private sealed class <InspectorTranspiler>d__1 : global::System.Collections.Generic.IEnumerable<CodeInstruction>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<CodeInstruction>, global::System.Collections.IEnumerator, global::System.IDisposable
	{
		private int <>1__state;

		private CodeInstruction <>2__current;

		private int <>l__initialThreadId;

		private global::System.Collections.Generic.IEnumerable<CodeInstruction> codes;

		public global::System.Collections.Generic.IEnumerable<CodeInstruction> <>3__codes;

		private bool <found>5__2;

		private global::System.Collections.Generic.IEnumerator<CodeInstruction> <>7__wrap2;

		CodeInstruction global::System.Collections.Generic.IEnumerator<CodeInstruction>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object global::System.Collections.IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <InspectorTranspiler>d__1(int <>1__state)
		{
			this.<>1__state = <>1__state;
			<>l__initialThreadId = Environment.CurrentManagedThreadId;
		}

		[DebuggerHidden]
		void global::System.IDisposable.Dispose()
		{
			int num = <>1__state;
			if (num == -3 || (uint)(num - 1) <= 1u)
			{
				try
				{
				}
				finally
				{
					<>m__Finally1();
				}
			}
			<>7__wrap2 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Expected O, but got Unknown
			try
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<found>5__2 = false;
					<>7__wrap2 = codes.GetEnumerator();
					<>1__state = -3;
					break;
				case 1:
					<>1__state = -3;
					break;
				case 2:
					<>1__state = -3;
					break;
				}
				if (((global::System.Collections.IEnumerator)<>7__wrap2).MoveNext())
				{
					CodeInstruction current = <>7__wrap2.Current;
					if (CodeInstructionExtensions.Calls(current, wikiFunc))
					{
						<found>5__2 = true;
						<>2__current = new CodeInstruction(OpCodes.Call, (object)((global::System.Delegate)(object)new Func<Slot, global::System.Type, Hyperlink>(FakeWikiFuncInspector)).Method);
						<>1__state = 1;
						return true;
					}
					<>2__current = current;
					<>1__state = 2;
					return true;
				}
				<>m__Finally1();
				<>7__wrap2 = null;
				if (!<found>5__2)
				{
					Plugin.Log.LogError((object)"Failed to patch WikiIntegrationComponentPatch");
				}
				return false;
			}
			catch
			{
				//try-fault
				((global::System.IDisposable)this).Dispose();
				throw;
			}
		}

		bool global::System.Collections.IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		private void <>m__Finally1()
		{
			<>1__state = -1;
			if (<>7__wrap2 != null)
			{
				((global::System.IDisposable)<>7__wrap2).Dispose();
			}
		}

		[DebuggerHidden]
		void global::System.Collections.IEnumerator.Reset()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			throw new NotSupportedException();
		}

		[DebuggerHidden]
		global::System.Collections.Generic.IEnumerator<CodeInstruction> global::System.Collections.Generic.IEnumerable<CodeInstruction>.GetEnumerator()
		{
			<InspectorTranspiler>d__1 <InspectorTranspiler>d__;
			if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
			{
				<>1__state = 0;
				<InspectorTranspiler>d__ = this;
			}
			else
			{
				<InspectorTranspiler>d__ = new <InspectorTranspiler>d__1(0);
			}
			<InspectorTranspiler>d__.codes = <>3__codes;
			return <InspectorTranspiler>d__;
		}

		[DebuggerHidden]
		global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
		{
			return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<CodeInstruction>)this).GetEnumerator();
		}
	}

	[CompilerGenerated]
	private sealed class <ProtofluxToolTranspiler>d__2 : global::System.Collections.Generic.IEnumerable<CodeInstruction>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<CodeInstruction>, global::System.Collections.IEnumerator, global::System.IDisposable
	{
		private int <>1__state;

		private CodeInstruction <>2__current;

		private int <>l__initialThreadId;

		private global::System.Collections.Generic.IEnumerable<CodeInstruction> codes;

		public global::System.Collections.Generic.IEnumerable<CodeInstruction> <>3__codes;

		private bool <found>5__2;

		private global::System.Collections.Generic.IEnumerator<CodeInstruction> <>7__wrap2;

		CodeInstruction global::System.Collections.Generic.IEnumerator<CodeInstruction>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object global::System.Collections.IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <ProtofluxToolTranspiler>d__2(int <>1__state)
		{
			this.<>1__state = <>1__state;
			<>l__initialThreadId = Environment.CurrentManagedThreadId;
		}

		[DebuggerHidden]
		void global::System.IDisposable.Dispose()
		{
			int num = <>1__state;
			if (num == -3 || (uint)(num - 1) <= 1u)
			{
				try
				{
				}
				finally
				{
					<>m__Finally1();
				}
			}
			<>7__wrap2 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Expected O, but got Unknown
			try
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<found>5__2 = false;
					<>7__wrap2 = codes.GetEnumerator();
					<>1__state = -3;
					break;
				case 1:
					<>1__state = -3;
					break;
				case 2:
					<>1__state = -3;
					break;
				}
				if (((global::System.Collections.IEnumerator)<>7__wrap2).MoveNext())
				{
					CodeInstruction current = <>7__wrap2.Current;
					if (CodeInstructionExtensions.Calls(current, wikiFunc))
					{
						<found>5__2 = true;
						<>2__current = new CodeInstruction(OpCodes.Call, (object)((global::System.Delegate)(object)new Func<Slot, global::System.Type, Hyperlink>(FakeWikiFuncProtoflux)).Method);
						<>1__state = 1;
						return true;
					}
					<>2__current = current;
					<>1__state = 2;
					return true;
				}
				<>m__Finally1();
				<>7__wrap2 = null;
				if (!<found>5__2)
				{
					Plugin.Log.LogError((object)"Failed to patch ProtofluxPatch");
				}
				return false;
			}
			catch
			{
				//try-fault
				((global::System.IDisposable)this).Dispose();
				throw;
			}
		}

		bool global::System.Collections.IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		private void <>m__Finally1()
		{
			<>1__state = -1;
			if (<>7__wrap2 != null)
			{
				((global::System.IDisposable)<>7__wrap2).Dispose();
			}
		}

		[DebuggerHidden]
		void global::System.Collections.IEnumerator.Reset()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			throw new NotSupportedException();
		}

		[DebuggerHidden]
		global::System.Collections.Generic.IEnumerator<CodeInstruction> global::System.Collections.Generic.IEnumerable<CodeInstruction>.GetEnumerator()
		{
			<ProtofluxToolTranspiler>d__2 <ProtofluxToolTranspiler>d__;
			if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
			{
				<>1__state = 0;
				<ProtofluxToolTranspiler>d__ = this;
			}
			else
			{
				<ProtofluxToolTranspiler>d__ = new <ProtofluxToolTranspiler>d__2(0);
			}
			<ProtofluxToolTranspiler>d__.codes = <>3__codes;
			return <ProtofluxToolTranspiler>d__;
		}

		[DebuggerHidden]
		global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
		{
			return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<CodeInstruction>)this).GetEnumerator();
		}
	}

	private static MethodInfo wikiFunc = AccessTools.Method(typeof(Hyperlink), "AttachForWikiPage", (global::System.Type[])null, (global::System.Type[])null);

	[IteratorStateMachine(typeof(<InspectorTranspiler>d__1))]
	[HarmonyPatch(typeof(WorkerInspector), "BuildUIForComponent")]
	[HarmonyTranspiler]
	public static global::System.Collections.Generic.IEnumerable<CodeInstruction> InspectorTranspiler(global::System.Collections.Generic.IEnumerable<CodeInstruction> codes)
	{
		bool found = false;
		global::System.Collections.Generic.IEnumerator<CodeInstruction> enumerator = codes.GetEnumerator();
		try
		{
			while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
			{
				CodeInstruction current = enumerator.Current;
				if (CodeInstructionExtensions.Calls(current, wikiFunc))
				{
					found = true;
					yield return new CodeInstruction(OpCodes.Call, (object)((global::System.Delegate)(object)new Func<Slot, global::System.Type, Hyperlink>(FakeWikiFuncInspector)).Method);
				}
				else
				{
					yield return current;
				}
			}
		}
		finally
		{
			((global::System.IDisposable)enumerator)?.Dispose();
		}
		if (!found)
		{
			Plugin.Log.LogError((object)"Failed to patch WikiIntegrationComponentPatch");
		}
	}

	[IteratorStateMachine(typeof(<ProtofluxToolTranspiler>d__2))]
	[HarmonyPatch(typeof(ProtoFluxTool), "GenerateMenuItems")]
	[HarmonyTranspiler]
	public static global::System.Collections.Generic.IEnumerable<CodeInstruction> ProtofluxToolTranspiler(global::System.Collections.Generic.IEnumerable<CodeInstruction> codes)
	{
		bool found = false;
		global::System.Collections.Generic.IEnumerator<CodeInstruction> enumerator = codes.GetEnumerator();
		try
		{
			while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
			{
				CodeInstruction current = enumerator.Current;
				if (CodeInstructionExtensions.Calls(current, wikiFunc))
				{
					found = true;
					yield return new CodeInstruction(OpCodes.Call, (object)((global::System.Delegate)(object)new Func<Slot, global::System.Type, Hyperlink>(FakeWikiFuncProtoflux)).Method);
				}
				else
				{
					yield return current;
				}
			}
		}
		finally
		{
			((global::System.IDisposable)enumerator)?.Dispose();
		}
		if (!found)
		{
			Plugin.Log.LogError((object)"Failed to patch ProtofluxPatch");
		}
	}

	public static Hyperlink? FakeWikiFuncInspector(Slot slot, global::System.Type type)
	{
		if (Plugin.WIKI_INTEGRATION_INSPECTOR.Value)
		{
			return Hyperlink.AttachForWikiPage(slot, type);
		}
		slot.ActiveSelf = false;
		return null;
	}

	public static Hyperlink? FakeWikiFuncProtoflux(Slot slot, global::System.Type type)
	{
		if (Plugin.WIKI_INTEGRATION_PROTOFLUX.Value)
		{
			return Hyperlink.AttachForWikiPage(slot, type);
		}
		slot.ActiveSelf = false;
		return null;
	}
}
namespace Toggles;

[ResonitePlugin("dev.lecloutpanda.Toggles", "Toggles", "1.3.0", "LeCloutPanda, NepuShiro, art0007i, Gyztor", "https://github.com/lecloutpanda/Toggles")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BasePlugin
{
	internal static ManualLogSource Log;

	public static ConfigEntry<bool> INVENTORY_SAVE_AVATAR_BUTTON;

	public static ConfigEntry<bool> INVENTORY_GET_URL_BUTTON;

	public static ConfigEntry<bool> PROTOFLUX_OVERVIEW_BUTTON;

	public static ConfigEntry<bool> DEVTOOL_GIZMOSNAPPING_BUTTON;

	public static ConfigEntry<bool> DEVTOOL_GIZMOSNAPPING_VALUE;

	public static ConfigEntry<bool> CONTACT_ASK_TO_JOIN_BUTTON;

	public static ConfigEntry<bool> WIKI_INTEGRATION_INSPECTOR;

	public static ConfigEntry<bool> WIKI_INTEGRATION_PROTOFLUX;

	public static ConfigEntry<bool> SLOT_TAG_INHERITANCE;

	public static ConfigEntry<bool> MAYBE_JUMP_LEFT;

	public static ConfigEntry<bool> MAYBE_JUMP_RIGHT;

	public static ConfigEntry<bool> CONTROLLER_HAPTIC_DASH;

	public static ConfigEntry<bool> CONTROLLER_HAPTIC_WORLD;

	public override void Load()
	{
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Expected O, but got Unknown
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0097: Expected O, but got Unknown
		//IL_00c5: 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_00da: Expected O, but got Unknown
		//IL_0108: 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_011d: Expected O, but got Unknown
		//IL_014b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0156: Unknown result type (might be due to invalid IL or missing references)
		//IL_0160: Expected O, but got Unknown
		//IL_018e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0199: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a3: Expected O, but got Unknown
		//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e6: Expected O, but got Unknown
		//IL_0214: Unknown result type (might be due to invalid IL or missing references)
		//IL_021f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0229: Expected O, but got Unknown
		//IL_0257: Unknown result type (might be due to invalid IL or missing references)
		//IL_0262: Unknown result type (might be due to invalid IL or missing references)
		//IL_026c: Expected O, but got Unknown
		//IL_029a: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02af: Expected O, but got Unknown
		//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f2: Expected O, but got Unknown
		//IL_0320: Unknown result type (might be due to invalid IL or missing references)
		//IL_032b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0335: Expected O, but got Unknown
		//IL_0363: Unknown result type (might be due to invalid IL or missing references)
		//IL_036e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0378: Expected O, but got Unknown
		Log = ((BasePlugin)this).Log;
		((BasePlugin)this).HarmonyInstance.PatchAll();
		INVENTORY_SAVE_AVATAR_BUTTON = ((BasePlugin)this).Config.Bind<bool>("Inventory", "Inventory Save Avatar Button", true, new ConfigDescription("Toggle generation of 'Save Avatar' button in inventory", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.Inventory.ToggleSaveAvatarButton", "Settings.dev.lecloutpanda.Toggles.Inventory.ToggleSaveAvatarButton.Description") }));
		INVENTORY_GET_URL_BUTTON = ((BasePlugin)this).Config.Bind<bool>("Inventory", "Inventory Get Item Url Button", true, new ConfigDescription("Toggle generation of 'Get Url' button in inventory", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.Inventory.ToggleGetUrlButton", "Settings.dev.lecloutpanda.Toggles.Inventory.ToggleGetUrlButton.Description") }));
		PROTOFLUX_OVERVIEW_BUTTON = ((BasePlugin)this).Config.Bind<bool>("Protoflux Tool", "Overview Button", true, new ConfigDescription("Toggle generation of 'Overview' context menu button on protoflux tools", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.ProtofluxTool.ToggleOverviewButton", "Settings.dev.lecloutpanda.Toggles.ProtofluxTool.ToggleOverviewButton.Description") }));
		DEVTOOL_GIZMOSNAPPING_BUTTON = ((BasePlugin)this).Config.Bind<bool>("Dev Tool", "Gizmo Snapping Button", true, new ConfigDescription("Toggle generation of a 'Gizmo Snapping' context menu button in the 'Gizmo Options' menu on a Dev Tool", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.DevTool.ToggleGizmoSnappingButton", "Settings.dev.lecloutpanda.Toggles.DevTool.ToggleGizmoSnappingButton.Description") }));
		DEVTOOL_GIZMOSNAPPING_VALUE = ((BasePlugin)this).Config.Bind<bool>("Dev Tool", "Default Gizmo Snapping Value", true, new ConfigDescription("Default value for 'Gizmo Snapping'", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.DevTool.DefaultGizmoSnappingValue", "Settings.dev.lecloutpanda.Toggles.DevTool.DefaultGizmoSnappingValue.Description") }));
		CONTACT_ASK_TO_JOIN_BUTTON = ((BasePlugin)this).Config.Bind<bool>("Contacts", "Ask To Join Button", true, new ConfigDescription("Toggle Visibility of 'Ask To Join' button", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.Contacts.ToggleAskToJoinButton", "Settings.dev.lecloutpanda.Toggles.Contacts.ToggleAskToJoinButton.Description") }));
		WIKI_INTEGRATION_INSPECTOR = ((BasePlugin)this).Config.Bind<bool>("Misc", "Wiki Integration Inspector", true, new ConfigDescription("Toggle 'Wiki Hyperlink' button for components in inspectors", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.Misc.ToggleWikiIntegrationInspector", "Settings.dev.lecloutpanda.Toggles.Misc.ToggleWikiIntegrationInspector.Description") }));
		WIKI_INTEGRATION_PROTOFLUX = ((BasePlugin)this).Config.Bind<bool>("Misc", "Wiki Integration Protoflux", true, new ConfigDescription("Toggle 'Wiki Hyperlink' button for the protoflux tool context menu item", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.Misc.ToggleWikiIntegrationProtoflux", "Settings.dev.lecloutpanda.Toggles.Misc.ToggleWikiIntegrationProtoflux.Description") }));
		SLOT_TAG_INHERITANCE = ((BasePlugin)this).Config.Bind<bool>("Inspector", "Tag Inheritance", true, new ConfigDescription("Toggle 'Tag Inheritance' when creating a child slot via the inspector", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.Inspector.SlotTagInheritance", "Settings.dev.lecloutpanda.Toggles.Inspector.SlotTagInheritance.Description") }));
		MAYBE_JUMP_LEFT = ((BasePlugin)this).Config.Bind<bool>("Controls", "Maybe Jump Left", true, new ConfigDescription("TEMP DESCRIPTOR", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.Controls.MaybeJumpLeft", "Settings.dev.lecloutpanda.Toggles.Controls.MaybeJumpLeft.Description") }));
		MAYBE_JUMP_RIGHT = ((BasePlugin)this).Config.Bind<bool>("Controls", "Maybe Jump Right", true, new ConfigDescription("TEMP DESCRIPTOR", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.Controls.MaybeJumpRight", "Settings.dev.lecloutpanda.Toggles.Controls.MaybeJumpRight.Description") }));
		CONTROLLER_HAPTIC_DASH = ((BasePlugin)this).Config.Bind<bool>("Haptics", "Dash Haptics", true, new ConfigDescription("Toggle haptics when interacting with the Dash", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.Haptics.Dash", "Settings.dev.lecloutpanda.Toggles.Haptics.Dash.Description") }));
		CONTROLLER_HAPTIC_WORLD = ((BasePlugin)this).Config.Bind<bool>("Haptics", "World Haptics", true, new ConfigDescription("Toggle haptics when interacting with stuff in World", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.dev.lecloutpanda.Toggles.Haptics.World", "Settings.dev.lecloutpanda.Toggles.Haptics.World.Description") }));
		DevToolPatch.InitSubs();
	}
}
public static class PluginMetadata
{
	public const string GUID = "dev.lecloutpanda.Toggles";

	public const string NAME = "Toggles";

	public const string VERSION = "1.3.0";

	public const string AUTHORS = "LeCloutPanda, NepuShiro, art0007i, Gyztor";

	public const string REPOSITORY_URL = "https://github.com/lecloutpanda/Toggles";
}