Decompiled source of The Grid v1.0.1

com.Omniscye.MenuReplacer.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.SceneManagement;

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

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

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

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

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BepInEx
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	internal sealed class BepInAutoPluginAttribute : Attribute
	{
		public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace BepInEx.Preloader.Core.Patching
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	internal sealed class PatcherAutoPluginAttribute : Attribute
	{
		public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace YapYap.MenuModelReplacer
{
	[BepInPlugin("empressyapyap.menumodelreplacer", "Menu Model Replacer (Buttons Kept)", "1.0.2")]
	public class MenuModelReplacerPlugin : BaseUnityPlugin
	{
		public const string PluginGuid = "empressyapyap.menumodelreplacer";

		public const string PluginName = "Menu Model Replacer (Buttons Kept)";

		public const string PluginVersion = "1.0.2";

		public static ManualLogSource Log;

		private void Awake()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			Log = ((BaseUnityPlugin)this).Logger;
			GameObject val = new GameObject("MenuReplacerController");
			Object.DontDestroyOnLoad((Object)val);
			((Object)val).hideFlags = (HideFlags)61;
			val.AddComponent<MenuReplacerController>();
			Log.LogInfo((object)"Menu Model Replacer (Buttons Kept) loaded.");
		}
	}
	public class MenuReplacerController : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <HandleSceneLoadedNextFrame>d__5 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public Scene scene;

			public MenuReplacerController <>4__this;

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

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

			[DebuggerHidden]
			public <HandleSceneLoadedNextFrame>d__5(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				MenuReplacerController menuReplacerController = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = null;
					<>1__state = 1;
					return true;
				case 1:
				{
					<>1__state = -1;
					Type type = Type.GetType("YAPYAP.MenuController, Assembly-CSharp");
					if (type == null)
					{
						MenuModelReplacerPlugin.Log.LogWarning((object)"Could not find type YAPYAP.MenuController. Skipping.");
						return false;
					}
					Object val = FindObjectOfTypeInScene(scene, type);
					if (val == (Object)null)
					{
						return false;
					}
					MenuModelReplacerPlugin.Log.LogInfo((object)("MenuController found in scene '" + ((Scene)(ref scene)).name + "'. Disabling menu model renderers (keeping buttons) + injecting bundle prefab."));
					Transform val2 = TryGetButtonContainer(type, val);
					if ((Object)(object)val2 == (Object)null)
					{
						MenuModelReplacerPlugin.Log.LogWarning((object)"Couldn't read MenuController._buttonContainer. Buttons may not be preserved correctly.");
					}
					menuReplacerController.DisableMenuRenderersKeepButtons(val2);
					menuReplacerController.InjectFromBundle((Component)(object)((val is Component) ? val : null));
					return false;
				}
				}
			}

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

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		private AssetBundle _bundle;

		private GameObject _spawned;

		private void Start()
		{
			SceneManager.sceneLoaded += OnSceneLoaded;
		}

		private void OnDestroy()
		{
			SceneManager.sceneLoaded -= OnSceneLoaded;
			SafeCleanup();
		}

		private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			((MonoBehaviour)this).StartCoroutine(HandleSceneLoadedNextFrame(scene));
		}

		[IteratorStateMachine(typeof(<HandleSceneLoadedNextFrame>d__5))]
		private IEnumerator HandleSceneLoadedNextFrame(Scene scene)
		{
			//IL_000e: 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)
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <HandleSceneLoadedNextFrame>d__5(0)
			{
				<>4__this = this,
				scene = scene
			};
		}

		private static Object FindObjectOfTypeInScene(Scene scene, Type t)
		{
			//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)
			Object[] array = Resources.FindObjectsOfTypeAll(t);
			foreach (Object val in array)
			{
				Component val2 = (Component)(object)((val is Component) ? val : null);
				if (val2 != null && val2.gameObject.scene == scene)
				{
					return val;
				}
			}
			return null;
		}

		private static Transform TryGetButtonContainer(Type menuControllerType, Object menuControllerInstance)
		{
			try
			{
				FieldInfo field = menuControllerType.GetField("_buttonContainer", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
				if (field == null)
				{
					return null;
				}
				object? value = field.GetValue(menuControllerInstance);
				return (Transform)((value is Transform) ? value : null);
			}
			catch
			{
				return null;
			}
		}

		private void DisableMenuRenderersKeepButtons(Transform buttonContainer)
		{
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			int num = 0;
			int num2 = 0;
			MeshRenderer[] source = Resources.FindObjectsOfTypeAll<MeshRenderer>();
			foreach (Renderer item in Enumerable.Concat(second: (IEnumerable<Renderer>)(object)Resources.FindObjectsOfTypeAll<SkinnedMeshRenderer>(), first: source.Cast<Renderer>()))
			{
				if ((Object)(object)item == (Object)null || (Object)(object)((Component)item).gameObject == (Object)null)
				{
					continue;
				}
				Scene scene = ((Component)item).gameObject.scene;
				if (((Scene)(ref scene)).IsValid())
				{
					if ((Object)(object)buttonContainer != (Object)null && IsChildOf(((Component)item).transform, buttonContainer))
					{
						num2++;
					}
					else if (item.enabled)
					{
						item.enabled = false;
						num++;
					}
				}
			}
			MenuModelReplacerPlugin.Log.LogInfo((object)$"Renderers disabled: {num}, kept (under buttons): {num2}");
		}

		private static bool IsChildOf(Transform t, Transform potentialParent)
		{
			if ((Object)(object)t == (Object)null || (Object)(object)potentialParent == (Object)null)
			{
				return false;
			}
			Transform val = t;
			while ((Object)(object)val != (Object)null)
			{
				if ((Object)(object)val == (Object)(object)potentialParent)
				{
					return true;
				}
				val = val.parent;
			}
			return false;
		}

		private void InjectFromBundle(Component menuControllerComponent)
		{
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_spawned != (Object)null)
			{
				return;
			}
			string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			string[] array = new string[5]
			{
				Path.Combine(directoryName ?? "", "food"),
				Path.Combine(directoryName ?? "", "food.bundle"),
				Path.Combine(directoryName ?? "", "food.assets"),
				Path.Combine(Paths.PluginPath, "food"),
				Path.Combine(Paths.BepInExRootPath, "food")
			};
			string text = array.FirstOrDefault(File.Exists);
			if (string.IsNullOrEmpty(text))
			{
				MenuModelReplacerPlugin.Log.LogError((object)("AssetBundle file not found. Put your bundle named 'food' next to the DLL (recommended). Tried:\n" + string.Join("\n", array)));
				return;
			}
			try
			{
				_bundle = AssetBundle.LoadFromFile(text);
				if ((Object)(object)_bundle == (Object)null)
				{
					MenuModelReplacerPlugin.Log.LogError((object)("Failed to load AssetBundle from: " + text));
					return;
				}
				GameObject[] array2 = _bundle.LoadAllAssets<GameObject>();
				if (array2 == null || array2.Length == 0)
				{
					string[] allAssetNames = _bundle.GetAllAssetNames();
					MenuModelReplacerPlugin.Log.LogError((object)("No GameObject assets found in bundle. Assets inside:\n" + string.Join("\n", allAssetNames)));
					return;
				}
				GameObject val = array2[0];
				_spawned = Object.Instantiate<GameObject>(val);
				_spawned.SetActive(true);
				if ((Object)(object)menuControllerComponent != (Object)null)
				{
					_spawned.transform.SetParent(menuControllerComponent.transform, false);
					_spawned.transform.localPosition = new Vector3(0.012466f, -13.00008f, 12.0875f);
					_spawned.transform.localRotation = Quaternion.identity;
					_spawned.transform.localScale = Vector3.one;
				}
				Object.DontDestroyOnLoad((Object)(object)_spawned);
				ApplyHideFlagsRecursive(_spawned, (HideFlags)61);
				MenuModelReplacerPlugin.Log.LogInfo((object)$"Spawned prefab '{((Object)val).name}' (InstanceID={((Object)_spawned).GetInstanceID()}) from bundle '{Path.GetFileName(text)}'. Position hardcoded.");
			}
			catch (Exception ex)
			{
				MenuModelReplacerPlugin.Log.LogError((object)("Exception while injecting bundle prefab:\n" + ex));
			}
		}

		private static void ApplyHideFlagsRecursive(GameObject root, HideFlags flags)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)root == (Object)null))
			{
				Transform[] componentsInChildren = root.GetComponentsInChildren<Transform>(true);
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					((Object)((Component)componentsInChildren[i]).gameObject).hideFlags = flags;
				}
			}
		}

		private void SafeCleanup()
		{
			if ((Object)(object)_spawned != (Object)null)
			{
				Object.Destroy((Object)(object)_spawned);
				_spawned = null;
			}
			if ((Object)(object)_bundle != (Object)null)
			{
				_bundle.Unload(false);
				_bundle = null;
			}
		}
	}
}
namespace System.Diagnostics.CodeAnalysis
{
	[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ConstantExpectedAttribute : Attribute
	{
		public object? Min { get; set; }

		public object? Max { get; set; }
	}
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ExperimentalAttribute : Attribute
	{
		public string DiagnosticId { get; }

		public string? UrlFormat { get; set; }

		public ExperimentalAttribute(string diagnosticId)
		{
			DiagnosticId = diagnosticId;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
	[ExcludeFromCodeCoverage]
	internal sealed class MemberNotNullAttribute : Attribute
	{
		public string[] Members { get; }

		public MemberNotNullAttribute(string member)
		{
			Members = new string[1] { member };
		}

		public MemberNotNullAttribute(params string[] members)
		{
			Members = members;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
	[ExcludeFromCodeCoverage]
	internal sealed class MemberNotNullWhenAttribute : Attribute
	{
		public bool ReturnValue { get; }

		public string[] Members { get; }

		public MemberNotNullWhenAttribute(bool returnValue, string member)
		{
			ReturnValue = returnValue;
			Members = new string[1] { member };
		}

		public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
		{
			ReturnValue = returnValue;
			Members = members;
		}
	}
	[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class SetsRequiredMembersAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class StringSyntaxAttribute : Attribute
	{
		public const string CompositeFormat = "CompositeFormat";

		public const string DateOnlyFormat = "DateOnlyFormat";

		public const string DateTimeFormat = "DateTimeFormat";

		public const string EnumFormat = "EnumFormat";

		public const string GuidFormat = "GuidFormat";

		public const string Json = "Json";

		public const string NumericFormat = "NumericFormat";

		public const string Regex = "Regex";

		public const string TimeOnlyFormat = "TimeOnlyFormat";

		public const string TimeSpanFormat = "TimeSpanFormat";

		public const string Uri = "Uri";

		public const string Xml = "Xml";

		public string Syntax { get; }

		public object?[] Arguments { get; }

		public StringSyntaxAttribute(string syntax)
		{
			Syntax = syntax;
			Arguments = new object[0];
		}

		public StringSyntaxAttribute(string syntax, params object?[] arguments)
		{
			Syntax = syntax;
			Arguments = arguments;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class UnscopedRefAttribute : Attribute
	{
	}
}
namespace System.Runtime.Versioning
{
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiresPreviewFeaturesAttribute : Attribute
	{
		public string? Message { get; }

		public string? Url { get; set; }

		public RequiresPreviewFeaturesAttribute()
		{
		}

		public RequiresPreviewFeaturesAttribute(string? message)
		{
			Message = message;
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CallerArgumentExpressionAttribute : Attribute
	{
		public string ParameterName { get; }

		public CallerArgumentExpressionAttribute(string parameterName)
		{
			ParameterName = parameterName;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CollectionBuilderAttribute : Attribute
	{
		public Type BuilderType { get; }

		public string MethodName { get; }

		public CollectionBuilderAttribute(Type builderType, string methodName)
		{
			BuilderType = builderType;
			MethodName = methodName;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CompilerFeatureRequiredAttribute : Attribute
	{
		public const string RefStructs = "RefStructs";

		public const string RequiredMembers = "RequiredMembers";

		public string FeatureName { get; }

		public bool IsOptional { get; set; }

		public CompilerFeatureRequiredAttribute(string featureName)
		{
			FeatureName = featureName;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class InterpolatedStringHandlerArgumentAttribute : Attribute
	{
		public string[] Arguments { get; }

		public InterpolatedStringHandlerArgumentAttribute(string argument)
		{
			Arguments = new string[1] { argument };
		}

		public InterpolatedStringHandlerArgumentAttribute(params string[] arguments)
		{
			Arguments = arguments;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class InterpolatedStringHandlerAttribute : Attribute
	{
	}
	[EditorBrowsable(EditorBrowsableState.Never)]
	[ExcludeFromCodeCoverage]
	internal static class IsExternalInit
	{
	}
	[AttributeUsage(AttributeTargets.Method, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ModuleInitializerAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class OverloadResolutionPriorityAttribute : Attribute
	{
		public int Priority { get; }

		public OverloadResolutionPriorityAttribute(int priority)
		{
			Priority = priority;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ParamCollectionAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiredMemberAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiresLocationAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class SkipLocalsInitAttribute : Attribute
	{
	}
}

com.Omniscye.Tron.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.SceneManagement;
using YAPYAP;

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

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

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

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

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BepInEx
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	internal sealed class BepInAutoPluginAttribute : Attribute
	{
		public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace BepInEx.Preloader.Core.Patching
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	internal sealed class PatcherAutoPluginAttribute : Attribute
	{
		public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace EmpressMods.Tron
{
	public sealed class TronManager : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass21_0
		{
			public Material target;

			internal bool <SwapOnceSliced>b__0(Material m)
			{
				return (Object)(object)m != (Object)(object)target;
			}
		}

		[CompilerGenerated]
		private sealed class <ApplyLoop>d__20 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public TronManager <>4__this;

			private float <interval>5__2;

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

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

			[DebuggerHidden]
			public <ApplyLoop>d__20(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_008c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0096: Expected O, but got Unknown
				int num = <>1__state;
				TronManager tronManager = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					break;
				case 1:
					<>1__state = -1;
					<>2__current = (object)new WaitForSecondsRealtime(<interval>5__2);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					break;
				}
				if (tronManager._isActive)
				{
					<interval>5__2 = Mathf.Max(0.1f, tronManager.ConfigRescanSeconds.Value);
					if (Time.unscaledTime < tronManager._burstUntilTime)
					{
						<interval>5__2 = Mathf.Min(<interval>5__2, 0.2f);
					}
					<>2__current = tronManager.SwapOnceSliced();
					<>1__state = 1;
					return true;
				}
				return false;
			}

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

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <SwapOnceSliced>d__21 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public TronManager <>4__this;

			private <>c__DisplayClass21_0 <>8__1;

			private Renderer[] <renderers>5__2;

			private Stopwatch <watch>5__3;

			private int <i>5__4;

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

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

			[DebuggerHidden]
			public <SwapOnceSliced>d__21(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>8__1 = null;
				<renderers>5__2 = null;
				<watch>5__3 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				int num = <>1__state;
				TronManager tronManager = <>4__this;
				if (num != 0)
				{
					if (num != 1)
					{
						return false;
					}
					<>1__state = -1;
					<watch>5__3.Restart();
					goto IL_0098;
				}
				<>1__state = -1;
				if ((Object)(object)tronManager.BaseMaterial == (Object)null)
				{
					return false;
				}
				<renderers>5__2 = Object.FindObjectsOfType<Renderer>(true);
				<watch>5__3 = new Stopwatch();
				<watch>5__3.Start();
				<i>5__4 = 0;
				goto IL_020d;
				IL_0098:
				Renderer val = <renderers>5__2[<i>5__4];
				if (!((Object)(object)val == (Object)null) && !(val is ParticleSystemRenderer) && !(val is TrailRenderer) && !(val is LineRenderer))
				{
					if (!tronManager._originalMats.ContainsKey(val))
					{
						tronManager._originalMats[val] = val.sharedMaterials;
					}
					<>8__1.target = tronManager.BaseMaterial;
					if ((tronManager.IsItemOrBreakableRenderer(val) || tronManager.IsDoor(val)) && (Object)(object)tronManager.ItemMaterial != (Object)null)
					{
						<>8__1.target = tronManager.ItemMaterial;
					}
					else if (tronManager.IsEnemyOrPlayer(val) && (Object)(object)tronManager.EnemyMaterial != (Object)null)
					{
						<>8__1.target = tronManager.EnemyMaterial;
					}
					else if (tronManager.IsInteractable(val) && (Object)(object)tronManager.InteractableMaterial != (Object)null)
					{
						<>8__1.target = tronManager.InteractableMaterial;
					}
					Material[] sharedMaterials = val.sharedMaterials;
					if (sharedMaterials == null || sharedMaterials.Length == 0 || sharedMaterials.Any((Material m) => (Object)(object)m != (Object)(object)<>8__1.target))
					{
						int num2 = ((sharedMaterials == null || sharedMaterials.Length == 0) ? 1 : sharedMaterials.Length);
						Material[] array = (Material[])(object)new Material[num2];
						for (int i = 0; i < num2; i++)
						{
							array[i] = <>8__1.target;
						}
						val.sharedMaterials = array;
					}
					<>8__1 = null;
				}
				<i>5__4++;
				goto IL_020d;
				IL_020d:
				if (<i>5__4 < <renderers>5__2.Length)
				{
					<>8__1 = new <>c__DisplayClass21_0();
					if (<watch>5__3.ElapsedMilliseconds > 2)
					{
						<>2__current = null;
						<>1__state = 1;
						return true;
					}
					goto IL_0098;
				}
				return false;
			}

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

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public ConfigEntry<bool> ConfigEnabled;

		public ConfigEntry<KeyboardShortcut> ConfigKey;

		public ConfigEntry<float> ConfigRescanSeconds;

		public ConfigEntry<float> ConfigBurstOnSceneLoadSeconds;

		public Material BaseMaterial;

		public Material ItemMaterial;

		public Material EnemyMaterial;

		public Material InteractableMaterial;

		private readonly Dictionary<Renderer, Material[]> _originalMats = new Dictionary<Renderer, Material[]>();

		private Coroutine _loopRoutine;

		private bool _isActive;

		private float _burstUntilTime;

		private void Start()
		{
			SceneManager.sceneLoaded += OnSceneLoaded;
			SceneManager.activeSceneChanged += OnActiveSceneChanged;
			_isActive = ConfigEnabled.Value;
			if (_isActive)
			{
				StartLoop();
			}
		}

		private void OnDestroy()
		{
			SceneManager.sceneLoaded -= OnSceneLoaded;
			SceneManager.activeSceneChanged -= OnActiveSceneChanged;
			StopLoop();
			RestoreAll();
		}

		private void Update()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			KeyboardShortcut value = ConfigKey.Value;
			if (((KeyboardShortcut)(ref value)).IsDown())
			{
				_isActive = !_isActive;
				ConfigEnabled.Value = _isActive;
				if (_isActive)
				{
					StartLoop();
					return;
				}
				StopLoop();
				RestoreAll();
			}
		}

		private void OnSceneLoaded(Scene s, LoadSceneMode m)
		{
			if (_isActive)
			{
				float num = Mathf.Max(0f, ConfigBurstOnSceneLoadSeconds.Value);
				_burstUntilTime = Time.unscaledTime + num;
				ForceOnePassSoon();
			}
		}

		private void OnActiveSceneChanged(Scene oldScene, Scene newScene)
		{
			if (_isActive)
			{
				float num = Mathf.Max(0f, ConfigBurstOnSceneLoadSeconds.Value);
				_burstUntilTime = Time.unscaledTime + num;
				ForceOnePassSoon();
			}
		}

		private void StartLoop()
		{
			StopLoop();
			_loopRoutine = ((MonoBehaviour)this).StartCoroutine(ApplyLoop());
		}

		private void StopLoop()
		{
			if (_loopRoutine != null)
			{
				((MonoBehaviour)this).StopCoroutine(_loopRoutine);
				_loopRoutine = null;
			}
		}

		private void ForceOnePassSoon()
		{
			if (_loopRoutine == null)
			{
				_loopRoutine = ((MonoBehaviour)this).StartCoroutine(ApplyLoop());
			}
		}

		[IteratorStateMachine(typeof(<ApplyLoop>d__20))]
		private IEnumerator ApplyLoop()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <ApplyLoop>d__20(0)
			{
				<>4__this = this
			};
		}

		[IteratorStateMachine(typeof(<SwapOnceSliced>d__21))]
		private IEnumerator SwapOnceSliced()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <SwapOnceSliced>d__21(0)
			{
				<>4__this = this
			};
		}

		private bool IsItemOrBreakableRenderer(Renderer r)
		{
			if ((Object)(object)r == (Object)null)
			{
				return false;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<NetworkPuppetProp>(true) != (Object)null)
			{
				return true;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<NetworkPhysicsPropDestroy>(true) != (Object)null)
			{
				return true;
			}
			return false;
		}

		private bool IsDoor(Renderer r)
		{
			if ((Object)(object)r == (Object)null)
			{
				return false;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<LockableDoor>(true) != (Object)null)
			{
				return true;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<ClosingGate>(true) != (Object)null)
			{
				return true;
			}
			return false;
		}

		private bool IsEnemyOrPlayer(Renderer r)
		{
			if ((Object)(object)r == (Object)null)
			{
				return false;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<NpcBehaviour>(true) != (Object)null)
			{
				return true;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<Pawn>(true) != (Object)null)
			{
				return true;
			}
			return false;
		}

		private bool IsInteractable(Renderer r)
		{
			if ((Object)(object)r == (Object)null)
			{
				return false;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<TeleportInteract>(true) != (Object)null)
			{
				return true;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<TeleportDungeonCircle>(true) != (Object)null)
			{
				return true;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<TeleportExtractionCircle>(true) != (Object)null)
			{
				return true;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<TeleportDeadEndCircle>(true) != (Object)null)
			{
				return true;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<TeleportAstralCircle>(true) != (Object)null)
			{
				return true;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<PressurePlate>(true) != (Object)null)
			{
				return true;
			}
			if ((Object)(object)((Component)r).GetComponentInParent<Interactable>(true) != (Object)null)
			{
				return true;
			}
			return false;
		}

		private void RestoreAll()
		{
			foreach (KeyValuePair<Renderer, Material[]> originalMat in _originalMats)
			{
				if ((Object)(object)originalMat.Key != (Object)null)
				{
					originalMat.Key.sharedMaterials = originalMat.Value;
				}
			}
			_originalMats.Clear();
		}
	}
	[BepInPlugin("empress.tron.swapper", "Empress Tron Swapper", "1.1.0")]
	public sealed class TronPlugin : BaseUnityPlugin
	{
		public static TronManager Manager;

		public static Material BaseMaterial;

		public static Material ItemMaterial;

		public static Material EnemyMaterial;

		public static Material InteractableMaterial;

		private void Awake()
		{
			//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Expected O, but got Unknown
			//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: Unknown result type (might be due to invalid IL or missing references)
			string? directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			string text = Path.Combine(directoryName, "tronwireframe");
			string text2 = Path.Combine(directoryName, "tronwireframe.bundle");
			string text3 = "";
			if (File.Exists(text))
			{
				text3 = text;
			}
			else if (File.Exists(text2))
			{
				text3 = text2;
			}
			if (string.IsNullOrEmpty(text3))
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("[TRON] Could not find bundle! Checked: '" + text + "' AND '" + text2 + "'"));
				return;
			}
			AssetBundle val = AssetBundle.LoadFromFile(text3);
			if ((Object)(object)val == (Object)null)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("[TRON] Failed to load bundle from: " + text3));
				return;
			}
			Material[] array = val.LoadAllAssets<Material>();
			if (array == null || array.Length == 0)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)"[TRON] Bundle loaded, but NO Materials found inside!");
				val.Unload(true);
				return;
			}
			ItemMaterial = ((IEnumerable<Material>)array).FirstOrDefault((Func<Material, bool>)((Material m) => (Object)(object)m != (Object)null && ((Object)m).name.Equals("trongreen", StringComparison.OrdinalIgnoreCase)));
			EnemyMaterial = ((IEnumerable<Material>)array).FirstOrDefault((Func<Material, bool>)((Material m) => (Object)(object)m != (Object)null && ((Object)m).name.Equals("tronred", StringComparison.OrdinalIgnoreCase)));
			InteractableMaterial = ((IEnumerable<Material>)array).FirstOrDefault((Func<Material, bool>)((Material m) => (Object)(object)m != (Object)null && ((Object)m).name.Equals("tronwhite", StringComparison.OrdinalIgnoreCase)));
			BaseMaterial = ((IEnumerable<Material>)array).FirstOrDefault((Func<Material, bool>)((Material m) => (Object)(object)m != (Object)null && ((Object)m).name.Equals("tronwireframe", StringComparison.OrdinalIgnoreCase))) ?? ((IEnumerable<Material>)array).FirstOrDefault((Func<Material, bool>)((Material m) => (Object)(object)m != (Object)null && !((Object)m).name.Equals("trongreen", StringComparison.OrdinalIgnoreCase) && !((Object)m).name.Equals("tronred", StringComparison.OrdinalIgnoreCase) && !((Object)m).name.Equals("tronwhite", StringComparison.OrdinalIgnoreCase))) ?? array.FirstOrDefault();
			if ((Object)(object)BaseMaterial == (Object)null)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)"[TRON] Could not determine BaseMaterial!");
				val.Unload(true);
				return;
			}
			if ((Object)(object)ItemMaterial == (Object)null)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)"[TRON] Could not find 'trongreen' material.");
			}
			if ((Object)(object)EnemyMaterial == (Object)null)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)"[TRON] Could not find 'tronred' material.");
			}
			if ((Object)(object)InteractableMaterial == (Object)null)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)"[TRON] Could not find 'tronwhite' material.");
			}
			ManualLogSource logger = ((BaseUnityPlugin)this).Logger;
			string[] obj = new string[9]
			{
				"[TRON] Loaded Base='",
				((Object)BaseMaterial).name,
				"', Item='",
				null,
				null,
				null,
				null,
				null,
				null
			};
			Material itemMaterial = ItemMaterial;
			obj[3] = ((itemMaterial != null) ? ((Object)itemMaterial).name : null);
			obj[4] = "', Enemy='";
			Material enemyMaterial = EnemyMaterial;
			obj[5] = ((enemyMaterial != null) ? ((Object)enemyMaterial).name : null);
			obj[6] = "', Interactable='";
			Material interactableMaterial = InteractableMaterial;
			obj[7] = ((interactableMaterial != null) ? ((Object)interactableMaterial).name : null);
			obj[8] = "'";
			logger.LogMessage((object)string.Concat(obj));
			GameObject val2 = new GameObject("EmpressTronManager");
			Object.DontDestroyOnLoad((Object)val2);
			((Object)val2).hideFlags = (HideFlags)61;
			Manager = val2.AddComponent<TronManager>();
			((Object)Manager).hideFlags = (HideFlags)61;
			Manager.ConfigEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Enabled", true, "Enable the swap");
			Manager.ConfigKey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("General", "ToggleKey", new KeyboardShortcut((KeyCode)287, Array.Empty<KeyCode>()), "Toggle key");
			Manager.BaseMaterial = BaseMaterial;
			Manager.ItemMaterial = ItemMaterial;
			Manager.EnemyMaterial = EnemyMaterial;
			Manager.InteractableMaterial = InteractableMaterial;
			Manager.ConfigRescanSeconds = ((BaseUnityPlugin)this).Config.Bind<float>("General", "RescanSeconds", 1f, "How often to rescan and re-apply materials (seconds).");
			Manager.ConfigBurstOnSceneLoadSeconds = ((BaseUnityPlugin)this).Config.Bind<float>("General", "BurstOnSceneLoadSeconds", 6f, "For this many seconds after a scene load, rescan faster to catch late spawns.");
		}

		private void OnDestroy()
		{
			if ((Object)(object)Manager != (Object)null)
			{
				Object.Destroy((Object)(object)((Component)Manager).gameObject);
			}
		}
	}
}
namespace System.Diagnostics.CodeAnalysis
{
	[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ConstantExpectedAttribute : Attribute
	{
		public object? Min { get; set; }

		public object? Max { get; set; }
	}
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ExperimentalAttribute : Attribute
	{
		public string DiagnosticId { get; }

		public string? UrlFormat { get; set; }

		public ExperimentalAttribute(string diagnosticId)
		{
			DiagnosticId = diagnosticId;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
	[ExcludeFromCodeCoverage]
	internal sealed class MemberNotNullAttribute : Attribute
	{
		public string[] Members { get; }

		public MemberNotNullAttribute(string member)
		{
			Members = new string[1] { member };
		}

		public MemberNotNullAttribute(params string[] members)
		{
			Members = members;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
	[ExcludeFromCodeCoverage]
	internal sealed class MemberNotNullWhenAttribute : Attribute
	{
		public bool ReturnValue { get; }

		public string[] Members { get; }

		public MemberNotNullWhenAttribute(bool returnValue, string member)
		{
			ReturnValue = returnValue;
			Members = new string[1] { member };
		}

		public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
		{
			ReturnValue = returnValue;
			Members = members;
		}
	}
	[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class SetsRequiredMembersAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class StringSyntaxAttribute : Attribute
	{
		public const string CompositeFormat = "CompositeFormat";

		public const string DateOnlyFormat = "DateOnlyFormat";

		public const string DateTimeFormat = "DateTimeFormat";

		public const string EnumFormat = "EnumFormat";

		public const string GuidFormat = "GuidFormat";

		public const string Json = "Json";

		public const string NumericFormat = "NumericFormat";

		public const string Regex = "Regex";

		public const string TimeOnlyFormat = "TimeOnlyFormat";

		public const string TimeSpanFormat = "TimeSpanFormat";

		public const string Uri = "Uri";

		public const string Xml = "Xml";

		public string Syntax { get; }

		public object?[] Arguments { get; }

		public StringSyntaxAttribute(string syntax)
		{
			Syntax = syntax;
			Arguments = new object[0];
		}

		public StringSyntaxAttribute(string syntax, params object?[] arguments)
		{
			Syntax = syntax;
			Arguments = arguments;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class UnscopedRefAttribute : Attribute
	{
	}
}
namespace System.Runtime.Versioning
{
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiresPreviewFeaturesAttribute : Attribute
	{
		public string? Message { get; }

		public string? Url { get; set; }

		public RequiresPreviewFeaturesAttribute()
		{
		}

		public RequiresPreviewFeaturesAttribute(string? message)
		{
			Message = message;
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CallerArgumentExpressionAttribute : Attribute
	{
		public string ParameterName { get; }

		public CallerArgumentExpressionAttribute(string parameterName)
		{
			ParameterName = parameterName;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CollectionBuilderAttribute : Attribute
	{
		public Type BuilderType { get; }

		public string MethodName { get; }

		public CollectionBuilderAttribute(Type builderType, string methodName)
		{
			BuilderType = builderType;
			MethodName = methodName;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CompilerFeatureRequiredAttribute : Attribute
	{
		public const string RefStructs = "RefStructs";

		public const string RequiredMembers = "RequiredMembers";

		public string FeatureName { get; }

		public bool IsOptional { get; set; }

		public CompilerFeatureRequiredAttribute(string featureName)
		{
			FeatureName = featureName;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class InterpolatedStringHandlerArgumentAttribute : Attribute
	{
		public string[] Arguments { get; }

		public InterpolatedStringHandlerArgumentAttribute(string argument)
		{
			Arguments = new string[1] { argument };
		}

		public InterpolatedStringHandlerArgumentAttribute(params string[] arguments)
		{
			Arguments = arguments;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class InterpolatedStringHandlerAttribute : Attribute
	{
	}
	[EditorBrowsable(EditorBrowsableState.Never)]
	[ExcludeFromCodeCoverage]
	internal static class IsExternalInit
	{
	}
	[AttributeUsage(AttributeTargets.Method, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ModuleInitializerAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class OverloadResolutionPriorityAttribute : Attribute
	{
		public int Priority { get; }

		public OverloadResolutionPriorityAttribute(int priority)
		{
			Priority = priority;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ParamCollectionAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiredMemberAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiresLocationAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class SkipLocalsInitAttribute : Attribute
	{
	}
}