using System; 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 BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using ULTRAKILL.Portal; 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: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace FPSFixer { [HarmonyPatch] public static class Patches { [HarmonyPrefix] [HarmonyPatch(/*Could not decode attribute arguments.*/)] public static bool P3(ref bool __result) { __result = false; return false; } [HarmonyPrefix] [HarmonyPatch(typeof(PrefsManager), "GetBoolLocal")] public static bool P4(string key, bool fallback, ref bool __result) { if (key == "bloodEnabled") { __result = false; return false; } return true; } } [HarmonyPatch(typeof(PortalNavigation), "Sync")] public static class PortalNavPatch { public static Queue portalsToUpdate = new Queue(); [HarmonyPrefix] public static bool Prefix(PortalScene scene, PortalNavigation __instance) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) List identifiers = scene.identifiers; int count = identifiers.Count; for (int i = 0; i < count; i++) { if (Time.frameCount % count == i) { PortalIdentifier val = identifiers[i]; _ = val.Handle; if (val.UpdateDirtiness() && val.CheckUpdateDiff()) { val.QueueLinksForRemoval(); __instance.GenerateLinks(scene, val); } } } return false; } } [BepInPlugin("MyNameWithoutTheB.FPSFixer", "FPSFixer", "0.1.0")] public class Plugin : BaseUnityPlugin { public static Plugin Instance; public static ManualLogSource logger => ((BaseUnityPlugin)Instance).Logger; public void Awake() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) Instance = this; ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; new Harmony("MyNameWithoutTheB.FPSFixer").PatchAll(); } } public class PluginInfo { public const string GUID = "MyNameWithoutTheB.FPSFixer"; public const string Name = "FPSFixer"; public const string Version = "0.1.0"; } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { internal IgnoresAccessChecksToAttribute(string assemblyName) { } } }