using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using HarmonyLib; using Microsoft.CodeAnalysis; using PickTimer; using PickTimer.Util; using UnboundLib; using UnboundLib.GameModes; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("0Harmony")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("BepInEx")] [assembly: IgnoresAccessChecksTo("Microsoft.Win32.Primitives")] [assembly: IgnoresAccessChecksTo("mscorlib")] [assembly: IgnoresAccessChecksTo("netstandard")] [assembly: IgnoresAccessChecksTo("PickPhaseImprovements")] [assembly: IgnoresAccessChecksTo("PickTimer")] [assembly: IgnoresAccessChecksTo("System.AppContext")] [assembly: IgnoresAccessChecksTo("System.Buffers")] [assembly: IgnoresAccessChecksTo("System.Collections.Concurrent")] [assembly: IgnoresAccessChecksTo("System.Collections")] [assembly: IgnoresAccessChecksTo("System.Collections.NonGeneric")] [assembly: IgnoresAccessChecksTo("System.Collections.Specialized")] [assembly: IgnoresAccessChecksTo("System.ComponentModel.Composition")] [assembly: IgnoresAccessChecksTo("System.ComponentModel")] [assembly: IgnoresAccessChecksTo("System.ComponentModel.EventBasedAsync")] [assembly: IgnoresAccessChecksTo("System.ComponentModel.Primitives")] [assembly: IgnoresAccessChecksTo("System.ComponentModel.TypeConverter")] [assembly: IgnoresAccessChecksTo("System.Console")] [assembly: IgnoresAccessChecksTo("System.Core")] [assembly: IgnoresAccessChecksTo("System.Data.Common")] [assembly: IgnoresAccessChecksTo("System.Data")] [assembly: IgnoresAccessChecksTo("System.Diagnostics.Contracts")] [assembly: IgnoresAccessChecksTo("System.Diagnostics.Debug")] [assembly: IgnoresAccessChecksTo("System.Diagnostics.FileVersionInfo")] [assembly: IgnoresAccessChecksTo("System.Diagnostics.Process")] [assembly: IgnoresAccessChecksTo("System.Diagnostics.StackTrace")] [assembly: IgnoresAccessChecksTo("System.Diagnostics.TextWriterTraceListener")] [assembly: IgnoresAccessChecksTo("System.Diagnostics.Tools")] [assembly: IgnoresAccessChecksTo("System.Diagnostics.TraceSource")] [assembly: IgnoresAccessChecksTo("System.Diagnostics.Tracing")] [assembly: IgnoresAccessChecksTo("System")] [assembly: IgnoresAccessChecksTo("System.Drawing")] [assembly: IgnoresAccessChecksTo("System.Drawing.Primitives")] [assembly: IgnoresAccessChecksTo("System.Dynamic.Runtime")] [assembly: IgnoresAccessChecksTo("System.Globalization.Calendars")] [assembly: IgnoresAccessChecksTo("System.Globalization")] [assembly: IgnoresAccessChecksTo("System.Globalization.Extensions")] [assembly: IgnoresAccessChecksTo("System.IO.Compression")] [assembly: IgnoresAccessChecksTo("System.IO.Compression.FileSystem")] [assembly: IgnoresAccessChecksTo("System.IO.Compression.ZipFile")] [assembly: IgnoresAccessChecksTo("System.IO")] [assembly: IgnoresAccessChecksTo("System.IO.FileSystem")] [assembly: IgnoresAccessChecksTo("System.IO.FileSystem.DriveInfo")] [assembly: IgnoresAccessChecksTo("System.IO.FileSystem.Primitives")] [assembly: IgnoresAccessChecksTo("System.IO.FileSystem.Watcher")] [assembly: IgnoresAccessChecksTo("System.IO.IsolatedStorage")] [assembly: IgnoresAccessChecksTo("System.IO.MemoryMappedFiles")] [assembly: IgnoresAccessChecksTo("System.IO.Pipes")] [assembly: IgnoresAccessChecksTo("System.IO.UnmanagedMemoryStream")] [assembly: IgnoresAccessChecksTo("System.Linq")] [assembly: IgnoresAccessChecksTo("System.Linq.Expressions")] [assembly: IgnoresAccessChecksTo("System.Linq.Parallel")] [assembly: IgnoresAccessChecksTo("System.Linq.Queryable")] [assembly: IgnoresAccessChecksTo("System.Memory")] [assembly: IgnoresAccessChecksTo("System.Net")] [assembly: IgnoresAccessChecksTo("System.Net.Http")] [assembly: IgnoresAccessChecksTo("System.Net.NameResolution")] [assembly: IgnoresAccessChecksTo("System.Net.NetworkInformation")] [assembly: IgnoresAccessChecksTo("System.Net.Ping")] [assembly: IgnoresAccessChecksTo("System.Net.Primitives")] [assembly: IgnoresAccessChecksTo("System.Net.Requests")] [assembly: IgnoresAccessChecksTo("System.Net.Security")] [assembly: IgnoresAccessChecksTo("System.Net.Sockets")] [assembly: IgnoresAccessChecksTo("System.Net.WebHeaderCollection")] [assembly: IgnoresAccessChecksTo("System.Net.WebSockets.Client")] [assembly: IgnoresAccessChecksTo("System.Net.WebSockets")] [assembly: IgnoresAccessChecksTo("System.Numerics")] [assembly: IgnoresAccessChecksTo("System.Numerics.Vectors")] [assembly: IgnoresAccessChecksTo("System.ObjectModel")] [assembly: IgnoresAccessChecksTo("System.Reflection.DispatchProxy")] [assembly: IgnoresAccessChecksTo("System.Reflection")] [assembly: IgnoresAccessChecksTo("System.Reflection.Emit")] [assembly: IgnoresAccessChecksTo("System.Reflection.Emit.ILGeneration")] [assembly: IgnoresAccessChecksTo("System.Reflection.Emit.Lightweight")] [assembly: IgnoresAccessChecksTo("System.Reflection.Extensions")] [assembly: IgnoresAccessChecksTo("System.Reflection.Primitives")] [assembly: IgnoresAccessChecksTo("System.Resources.Reader")] [assembly: IgnoresAccessChecksTo("System.Resources.ResourceManager")] [assembly: IgnoresAccessChecksTo("System.Resources.Writer")] [assembly: IgnoresAccessChecksTo("System.Runtime.CompilerServices.VisualC")] [assembly: IgnoresAccessChecksTo("System.Runtime")] [assembly: IgnoresAccessChecksTo("System.Runtime.Extensions")] [assembly: IgnoresAccessChecksTo("System.Runtime.Handles")] [assembly: IgnoresAccessChecksTo("System.Runtime.InteropServices")] [assembly: IgnoresAccessChecksTo("System.Runtime.InteropServices.RuntimeInformation")] [assembly: IgnoresAccessChecksTo("System.Runtime.Numerics")] [assembly: IgnoresAccessChecksTo("System.Runtime.Serialization")] [assembly: IgnoresAccessChecksTo("System.Runtime.Serialization.Formatters")] [assembly: IgnoresAccessChecksTo("System.Runtime.Serialization.Json")] [assembly: IgnoresAccessChecksTo("System.Runtime.Serialization.Primitives")] [assembly: IgnoresAccessChecksTo("System.Runtime.Serialization.Xml")] [assembly: IgnoresAccessChecksTo("System.Security.Claims")] [assembly: IgnoresAccessChecksTo("System.Security.Cryptography.Algorithms")] [assembly: IgnoresAccessChecksTo("System.Security.Cryptography.Csp")] [assembly: IgnoresAccessChecksTo("System.Security.Cryptography.Encoding")] [assembly: IgnoresAccessChecksTo("System.Security.Cryptography.Primitives")] [assembly: IgnoresAccessChecksTo("System.Security.Cryptography.X509Certificates")] [assembly: IgnoresAccessChecksTo("System.Security.Principal")] [assembly: IgnoresAccessChecksTo("System.Security.SecureString")] [assembly: IgnoresAccessChecksTo("System.ServiceModel.Web")] [assembly: IgnoresAccessChecksTo("System.Text.Encoding")] [assembly: IgnoresAccessChecksTo("System.Text.Encoding.Extensions")] [assembly: IgnoresAccessChecksTo("System.Text.RegularExpressions")] [assembly: IgnoresAccessChecksTo("System.Threading")] [assembly: IgnoresAccessChecksTo("System.Threading.Overlapped")] [assembly: IgnoresAccessChecksTo("System.Threading.Tasks")] [assembly: IgnoresAccessChecksTo("System.Threading.Tasks.Extensions")] [assembly: IgnoresAccessChecksTo("System.Threading.Tasks.Parallel")] [assembly: IgnoresAccessChecksTo("System.Threading.Thread")] [assembly: IgnoresAccessChecksTo("System.Threading.ThreadPool")] [assembly: IgnoresAccessChecksTo("System.Threading.Timer")] [assembly: IgnoresAccessChecksTo("System.Transactions")] [assembly: IgnoresAccessChecksTo("System.ValueTuple")] [assembly: IgnoresAccessChecksTo("System.Web")] [assembly: IgnoresAccessChecksTo("System.Windows")] [assembly: IgnoresAccessChecksTo("System.Xml")] [assembly: IgnoresAccessChecksTo("System.Xml.Linq")] [assembly: IgnoresAccessChecksTo("System.Xml.ReaderWriter")] [assembly: IgnoresAccessChecksTo("System.Xml.Serialization")] [assembly: IgnoresAccessChecksTo("System.Xml.XDocument")] [assembly: IgnoresAccessChecksTo("System.Xml.XmlDocument")] [assembly: IgnoresAccessChecksTo("System.Xml.XmlSerializer")] [assembly: IgnoresAccessChecksTo("System.Xml.XPath")] [assembly: IgnoresAccessChecksTo("System.Xml.XPath.XDocument")] [assembly: IgnoresAccessChecksTo("UnboundLib")] [assembly: IgnoresAccessChecksTo("UnityEngine.CoreModule")] [assembly: IgnoresAccessChecksTo("UnityEngine")] [assembly: AssemblyCompany("PickTimerCompat")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+470cf00a981fe76ad8146a67c7315e29ff87326f")] [assembly: AssemblyProduct("PickTimerCompat")] [assembly: AssemblyTitle("PickTimerCompat")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] 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; } } } namespace PickTimerCompat { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Systems.R00t.PickPhaseImprovements.PickTimerCompat", "PickTimerCompat", "0.1.0")] [BepInProcess("Rounds.exe")] [HarmonyPatch] public class Plugin : BaseUnityPlugin { private const string ModId = "Systems.R00t.PickPhaseImprovements.PickTimerCompat"; private const string ModName = "PickTimerCompat"; public const string Version = "0.1.0"; private void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) new Harmony("Systems.R00t.PickPhaseImprovements.PickTimerCompat").PatchAll(); } [HarmonyPrefix] [HarmonyPatch(typeof(CardChoice), "ReplaceCards")] public static void RetriggerTimer(CardChoice __instance) { if (__instance.picks > 0) { ((MonoBehaviour)__instance).StartCoroutine(TimerHandler.Start((IGameModeHandler)null)); } } [HarmonyPrefix] [HarmonyPatch(typeof(PickTimerController), "StartPickTimer")] public static bool FixTimerSoftlock(CardChoice instance, ref IEnumerator __result) { __result = FixedStartPickTimer(instance); return false; } public static IEnumerator FixedStartPickTimer(CardChoice instance) { if (PickTimer.PickTimerEnabled) { if (PickTimerController.TimerCr != null) { ((MonoBehaviour)Unbound.Instance).StopCoroutine(PickTimerController.TimerCr); } PickTimerController.TimerCr = ((MonoBehaviour)Unbound.Instance).StartCoroutine(PickTimerController.Timer((float)PickTimer.PickTimerTime)); yield return (object)new WaitForSecondsRealtime((float)PickTimer.PickTimerTime); Traverse traverse = Traverse.Create((object)instance); List spawnedCards = (List)traverse.Field("spawnedCards").GetValue(); instance.Pick(spawnedCards[PickTimerController.Random.Next(0, spawnedCards.Count)], false); } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { internal IgnoresAccessChecksToAttribute(string assemblyName) { } } }