Decompiled source of The Timestopper v1.6.12
plugins/The Timestopper.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using HarmonyLib; using PluginConfig.API; using PluginConfig.API.Decorators; using PluginConfig.API.Fields; using PluginConfig.API.Functionals; using PluginConfiguratorComponents; using Sandbox; using Sandbox.Arm; using TMPro; using The_Timestopper.Arm; using The_Timestopper.Internal; using The_Timestopper.Physics; using The_Timestopper.Player; using ULTRAKILL.Cheats; using ULTRAKILL.Portal; using UnityEngine; using UnityEngine.Networking; using UnityEngine.SceneManagement; using UnityEngine.Serialization; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("The Timestopper")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("The Timestopper")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c602a639-0d74-4ae5-a633-6ae2db957a9e")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = "")] [assembly: AssemblyVersion("1.0.0.0")] public static class ComponentDuplicator { public static T CopyComponent<T>(this GameObject destination, T original) where T : Component { Type type = ((object)original).GetType(); Component obj = destination.AddComponent(type); T val = (T)(object)((obj is T) ? obj : null); FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo[] array = fields; foreach (FieldInfo fieldInfo in array) { if (!fieldInfo.IsStatic) { fieldInfo.SetValue(val, fieldInfo.GetValue(original)); } } PropertyInfo[] properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); PropertyInfo[] array2 = properties; foreach (PropertyInfo propertyInfo in array2) { if (propertyInfo.CanWrite && propertyInfo.CanRead && propertyInfo.GetIndexParameters().Length == 0 && !propertyInfo.GetCustomAttributes(typeof(ObsoleteAttribute), inherit: true).Any()) { try { propertyInfo.SetValue(val, propertyInfo.GetValue(original, null), null); } catch { } } } return val; } public static T CopyComponent<T>(this GameObject host, T original, GameObject target) where T : Component { Type type = ((object)original).GetType(); Component obj = target.AddComponent(type); T val = (T)(object)((obj is T) ? obj : null); FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo[] array = fields; foreach (FieldInfo fieldInfo in array) { if (!fieldInfo.IsStatic) { fieldInfo.SetValue(val, fieldInfo.GetValue(original)); } } PropertyInfo[] properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); PropertyInfo[] array2 = properties; foreach (PropertyInfo propertyInfo in array2) { if (propertyInfo.CanWrite && propertyInfo.CanRead && propertyInfo.GetIndexParameters().Length == 0 && !propertyInfo.GetCustomAttributes(typeof(ObsoleteAttribute), inherit: true).Any()) { try { propertyInfo.SetValue(val, propertyInfo.GetValue(original, null), null); } catch { } } } return val; } } namespace The_Timestopper { [BepInPlugin("dev.galvin.timestopper", "The Timestopper", "1.6.12")] public class Timestopper : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Type, bool> <>9__99_0; public static Action <>9__103_0; public static Action <>9__103_1; public static Func<string, bool> <>9__106_0; public static Func<string, bool> <>9__106_1; public static Func<string, bool> <>9__106_2; public static BoolValueChangeEventDelegate <>9__107_1; public static FloatValueChangeEventDelegate <>9__107_2; public static FloatValueChangeEventDelegate <>9__107_3; public static FloatValueChangeEventDelegate <>9__107_4; public static FloatValueChangeEventDelegate <>9__107_5; public static FloatValueChangeEventDelegate <>9__107_6; public static FloatValueChangeEventDelegate <>9__107_7; public static FloatValueChangeEventDelegate <>9__107_8; public static ColorValueChangeEventDelegate <>9__107_9; public static FloatValueChangeEventDelegate <>9__107_10; public static OnClick <>9__107_12; public static IntValueChangeEventDelegate <>9__107_13; public static Func<string, bool> <>9__110_0; public static Func<string, bool> <>9__110_1; public static Func<string, bool> <>9__110_2; public static Action <>9__112_0; public static Action <>9__112_1; public static Func<bool> <>9__116_0; internal bool <ExperimentalCustomTimePatches>b__99_0(Type t) { return t != null; } internal void <OnSceneLoaded>b__103_0() { HudMessageReceiver instance = MonoSingleton<HudMessageReceiver>.Instance; if (instance != null) { ((MonoBehaviour)instance).Invoke("Done", 0f); } firstLoad = false; } internal void <OnSceneLoaded>b__103_1() { HudMessageReceiver instance = MonoSingleton<HudMessageReceiver>.Instance; if (instance != null) { ((MonoBehaviour)instance).Invoke("Done", 0f); } firstLoad = false; } internal bool <ReloadSoundProfilesList>b__106_0(string file) { return file.EndsWith(".wav") || file.EndsWith(".ogg"); } internal bool <ReloadSoundProfilesList>b__106_1(string file) { return file.EndsWith(".wav") || file.EndsWith(".ogg"); } internal bool <ReloadSoundProfilesList>b__106_2(string file) { return file.EndsWith(".wav") || file.EndsWith(".ogg"); } internal void <InitializeConfig>b__107_1(BoolValueChangeEvent e) { Grayscaler.UpdateShaderSettings(); } internal void <InitializeConfig>b__107_2(FloatValueChangeEvent e) { Grayscaler.UpdateShaderSettings(); } internal void <InitializeConfig>b__107_3(FloatValueChangeEvent e) { Grayscaler.UpdateShaderSettings(); } internal void <InitializeConfig>b__107_4(FloatValueChangeEvent e) { Grayscaler.UpdateShaderSettings(); } internal void <InitializeConfig>b__107_5(FloatValueChangeEvent e) { Grayscaler.UpdateShaderSettings(); } internal void <InitializeConfig>b__107_6(FloatValueChangeEvent e) { Grayscaler.UpdateShaderSettings(); } internal void <InitializeConfig>b__107_7(FloatValueChangeEvent e) { Grayscaler.UpdateShaderSettings(); } internal void <InitializeConfig>b__107_8(FloatValueChangeEvent e) { Grayscaler.UpdateShaderSettings(); } internal void <InitializeConfig>b__107_9(ColorValueChangeEvent e) { Grayscaler.UpdateShaderSettings(); } internal void <InitializeConfig>b__107_10(FloatValueChangeEvent e) { Grayscaler.UpdateShaderSettings(); } internal void <InitializeConfig>b__107_12() { Application.OpenURL(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds")); } internal void <InitializeConfig>b__107_13(IntValueChangeEvent e) { if (e.value < 1) { e.value = 1; maxUpgrades.value = 1; } } internal bool <LoadSoundProfiles>b__110_0(string file) { return file.EndsWith(".wav") || file.EndsWith(".ogg"); } internal bool <LoadSoundProfiles>b__110_1(string file) { return file.EndsWith(".wav") || file.EndsWith(".ogg"); } internal bool <LoadSoundProfiles>b__110_2(string file) { return file.EndsWith(".wav") || file.EndsWith(".ogg"); } internal void <UpdateTerminal>b__112_0() { Log("this is good", extensive: false, ErrorLevel.Warning); } internal void <UpdateTerminal>b__112_1() { Log("this is good", extensive: false, ErrorLevel.Warning); } internal bool <InstantiateMenuItems>b__116_0() { return LoadDone; } } public const string GUID = "dev.galvin.timestopper"; public const string Name = "The Timestopper"; public const string Version = "1.6.12"; public const string SubVersion = "0"; private readonly Harmony harmony = new Harmony("dev.galvin.timestopper"); public static Timestopper Instance; public static ManualLogSource mls = Logger.CreateLogSource("The Timestopper"); public const string ARM_PICKUP_MESSAGE = "<color=#FFFF23>TIMESTOPPER</color>: Use \"<color=#FF4223>{0}</color>\" to stop and start time at will."; public const string ARM_DESCRIPTION = "A Godfist that <color=#FFFF43>stops</color> time.\r\n\r\nRecharges very slow, but <color=#FF4343>parrying</color> helps it recharge faster.\r\n\r\nCan be <color=#FFFF24>upgraded</color> through terminals.\r\n"; public const string ARM_NEW_MESSAGE = "Somewhere in the depths of <color=#FF0000>Violence /// First</color>, a new <color=#FFFF23>golden</color> door appears"; public const string TIMESTOP_STYLE = "<color=#FFCF21>TIME STOP</color>"; public static Shader grayscaleShader; public static Shader depthShader; public static AudioClip[] TimestopSounds; public static AudioClip[] StoppedTimeAmbiences; public static AudioClip[] TimestartSounds; public static Texture2D armGoldLogo; public static Texture2D modLogo; public static GameObject armTimeText; public static GameObject Dummy; public static GameObject LatestTerminal; private static GameObject _menuCanvas; public static bool TimeStop; public static float StoppedTimeAmount; public static bool LoadDone; public static float realTimeScale = 1f; public static bool fixedCall; public static bool firstLoad = true; public static bool cybergrind; public static int cybergrindWave; public static bool UnscaleTimeSince; public static PrivateInsideTimer messageTimer = new PrivateInsideTimer(); private GameObject currentLevelInfo; private TimeSince timeSinceLastTimestop = TimeSince.op_Implicit(0f); private IEnumerator timeStopper; private IEnumerator timeStarter; public static bool Compatability_JukeBox; public static BoolField alterMainMenu; public static BoolField aprilFools; public static KeyCodeField stopKey; public static StringListField stopSound; public static StringListField stoppedSound; public static StringListField startSound; public static ButtonField soundFileButton; public static ButtonField soundReloadButton; public static FloatField stopSpeed; public static FloatField startSpeed; public static FloatField affectSpeed; public static FloatField animationSpeed; public static FloatSliderField soundEffectVolume; public static BoolField filterMusic; public static FloatSliderField stoppedMusicPitch; public static FloatSliderField stoppedMusicVolume; public static BoolField grayscale; public static BoolField bubbleEffect; public static FloatField overallEffectIntensity; public static FloatField grayscaleIntensity; public static FloatField bubbleSmoothness; public static FloatField colorInversionArea; public static FloatField skyTransitionTreshold; public static FloatField bubbleDistance; public static FloatField bubbleProgression; public static ColorField grayscaleColorSpace; public static FloatField grayscaleColorSpaceIntensity; public static BoolField timestopHardDamage; public static IntField maxUpgrades; public static BoolField forceDowngrade; public static BoolField specialMode; public static BoolField extensiveLogging; public static FloatField lowerTreshold; public static FloatField refillMultiplier; public static FloatField bonusTimeForParry; public static FloatField antiHpMultiplier; public static ButtonField resetSaveButton; public static ButtonField giveArmButton; public static ColorField timeJuiceColorNormal; public static ColorField timeJuiceColorInsufficient; public static ColorField timeJuiceColorUsing; public static ColorField timeJuiceColorNoCooldown; private PluginConfigurator config; public static Sprite[] aprilFoolsPFPList = (Sprite[])(object)new Sprite[0]; public static GameObject rickrollObject; public static string rickrollPath; public static GameObject newTimeArm; public static GameObject newArmAltar; public static readonly HashSet<string> forbiddenSceneList = new HashSet<string> { "b3e7f2f8052488a45b35549efb98d902", "Bootstrap", "241a6a8caec7a13438a5ee786040de32", "4c18368dae54f154da2ae65baf0e630e", "d8e7c3bbb0c2f3940aa7c51dc5849781" }; public static bool frameLaterer; private bool menuOpenLastFrame; private float time; private static Type portalManagerV2Type = AccessTools.TypeByName("PortalManagerV2"); private static Type simplePortalTravelerType = AccessTools.TypeByName("SimplePortalTraveler"); private FieldInfo travellersField = AccessTools.Field(portalManagerV2Type, "travellers"); private MethodInfo cacheTravelerValues = AccessTools.Method(simplePortalTravelerType, "CacheTravelerValues", (Type[])null, (Type[])null); public static bool isInForbiddenScene; public static GameObject Player { get { if ((Object)(object)MonoSingleton<NewMovement>.Instance == (Object)null) { return null; } return ((Component)MonoSingleton<NewMovement>.Instance).gameObject; } } [DefaultValue(1f)] public static float playerTimeScale { get; private set; } = 1f; public static float playerDeltaTime { get { if (fixedCall) { return Time.fixedDeltaTime; } if (TimeStop) { return Time.unscaledDeltaTime * playerTimeScale; } return Time.deltaTime; } } public static float playerFixedDeltaTime { get { if (fixedCall) { return Time.fixedDeltaTime; } if (TimeStop) { return Time.fixedDeltaTime * playerTimeScale; } return Time.fixedDeltaTime; } } public static bool isAprilFools => aprilFools.value || (DateTime.Today.Month == 4 && DateTime.Today.Day == 1); public static void Log(object log, bool extensive = false, ErrorLevel err_lvl = ErrorLevel.Info) { if (!(extensiveLogging != null && !extensiveLogging.value && extensive)) { switch (err_lvl) { case ErrorLevel.Info: mls.LogInfo(log); break; case ErrorLevel.Warning: mls.LogWarning(log); break; case ErrorLevel.Error: mls.LogError(log); break; case ErrorLevel.Fatal: mls.LogFatal(log); break; default: mls.LogInfo(log); break; } } } public static void FixedUpdateFix(Transform target) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown if ((Object)(object)((Component)target).GetComponent(typeof(MonoBehaviour)) != (Object)null && (Object)(object)((Component)target).GetComponent<FixedUpdateCaller>() == (Object)null) { ((Component)target).gameObject.AddComponent<FixedUpdateCaller>(); } foreach (Transform item in target) { Transform val = item; if ((Object)(object)((Component)val).GetComponent(typeof(MonoBehaviour)) != (Object)null && (Object)(object)((Component)val).GetComponent<FixedUpdateCaller>() == (Object)null) { ((Component)val).gameObject.AddComponent<FixedUpdateCaller>(); } FixedUpdateFix(val); } } public static bool ReferencesDeltaTime(MethodInfo method) { MethodBody methodBody = method.GetMethodBody(); if (methodBody == null) { return false; } byte[] iLAsByteArray = methodBody.GetILAsByteArray(); List<CodeInstruction> originalInstructions = PatchProcessor.GetOriginalInstructions((MethodBase)method, (ILGenerator)null); foreach (CodeInstruction item in originalInstructions) { if (CodeInstructionExtensions.Calls(item, AccessTools.PropertyGetter(typeof(Time), "deltaTime")) || CodeInstructionExtensions.Calls(item, AccessTools.PropertyGetter(typeof(Time), "timeScale")) || CodeInstructionExtensions.Calls(item, AccessTools.PropertyGetter(typeof(Time), "fixedDeltaTime"))) { return true; } } return false; } public void ReplaceConsoleLine(object o) { Stream stream = Console.OpenStandardOutput(); int num = o.ToString().Split(new char[1] { '\n' }).Length; int cursorTop = Console.CursorTop; for (int i = 0; i <= num; i++) { Console.CursorLeft = 0; byte[] bytes = Encoding.UTF8.GetBytes(new string(' ', Console.WindowWidth - 1)); stream.Write(bytes, 0, bytes.Length); Console.CursorTop--; } Console.CursorTop++; Console.CursorLeft = 0; byte[] bytes2 = Encoding.UTF8.GetBytes(o.ToString()); stream.Write(bytes2, 0, bytes2.Length); stream.Flush(); Console.CursorTop = cursorTop; Console.CursorLeft = 0; } private void ExperimentalCustomTimePatches() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown mls.LogWarning((object)"Initiating experimental CustomTime transpiling process..."); HarmonyMethod val = new HarmonyMethod(typeof(UltimateTimeReplacer).GetMethod("Transpiler")); string text = "\n\n"; Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly in assemblies) { if (assembly == null) { continue; } string name = assembly.GetName().Name; if (name.StartsWith("System") || name.StartsWith("mscorlib") || name.StartsWith("0Harmony") || name.StartsWith("BepInEx") || name.StartsWith("The Timestopper") || name.StartsWith("Mono") || name.StartsWith("Harmony") || name.StartsWith("NewBlood")) { continue; } Type[] array; try { array = assembly.GetTypes(); } catch (ReflectionTypeLoadException ex) { mls.LogError((object)("cannot get types from " + name)); array = ex.Types.Where((Type t) => t != null).ToArray(); } mls.LogWarning((object)("total of " + array.Length + " types found in " + name + text)); int num = array.Length; int num2 = 0; int num3 = 0; Type[] array2 = array; foreach (Type type in array2) { if (!typeof(Component).IsAssignableFrom(type)) { continue; } MethodInfo[] methods; try { methods = type.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); } catch { mls.LogError((object)("error while getting methods of " + type.Name + ". " + text)); continue; } MethodInfo[] array3 = methods; foreach (MethodInfo methodInfo in array3) { if (methodInfo.IsAbstract || methodInfo.ContainsGenericParameters || methodInfo.IsGenericMethodDefinition) { continue; } try { if (methodInfo == null || !MethodBaseExtensions.HasMethodBody((MethodBase)methodInfo) || methodInfo.GetMethodBody() == null) { continue; } goto IL_02b6; } catch { mls.LogError((object)("error while getting body of " + methodInfo.Name + " of " + type.Name + ". " + text)); } continue; IL_02b6: try { if (ReferencesDeltaTime(methodInfo)) { harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, (HarmonyMethod)null, val, (HarmonyMethod)null, (HarmonyMethod)null); num3++; } } catch (Exception ex2) { mls.LogError((object)("error while transpiling " + methodInfo.Name + " of " + type.Name + ".\n" + ex2?.ToString() + text)); } } string text2 = "transpiling: " + ((float)num2 / (float)num * 100f).ToString("000.00") + " %\n"; text2 += "["; for (int num6 = 0; num6 < 100; num6++) { text2 = ((!((float)num6 < (float)num2 / (float)num * 100f)) ? (text2 + " ") : (text2 + "#")); } text2 += "]"; num2++; Console.ForegroundColor = ConsoleColor.Yellow; ReplaceConsoleLine(text2); Console.ResetColor(); } if (num3 > 0) { mls.LogWarning((object)("Transpiled with total of " + num3 + " changes.")); } else { mls.LogError((object)("Transpiled with no changes (" + num3 + ").")); } } mls.LogWarning((object)"patching ended "); } private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } Log("The Timestopper has awakened!"); try { bool flag = (Object)(object)MonoSingleton<PortalManagerV2>.Instance == (Object)null; } catch { mls.LogFatal((object)"ULTRAKILL source code does not define PortalManagerV2, make sure you are running the Timestopper mod with the appropriate version of the game!"); mls.LogFatal((object)"Otherwise expect lots of bugs"); } InitializeConfig(); playerTimeScale = 1f; try { harmony.PatchAll(); } catch (Exception ex) { Log("An error occured while patching the game for TimeStopper mod.", extensive: false, ErrorLevel.Error); Log(ex.ToString(), extensive: false, ErrorLevel.Error); Log("The mod will attempt to load, but expect issues regarding gameplay.", extensive: false, ErrorLevel.Warning); Log("The most prominent cause of this issue is version mismatch between the game and the mod, \r\n please make sure your game is up to date, or consider downgrading the Timestopper mod.", extensive: false, ErrorLevel.Warning); } Type typeFromHandle = typeof(CameraController); MethodInfo method = typeFromHandle.GetMethod("LateUpdate", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { method = typeFromHandle.GetMethod("Update", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { mls.LogFatal((object)"ULTRAKILL source code does not define an Update nor LateUpdate method for CameraController, are you sure this is the right version for the game!?"); } else { mls.LogFatal((object)"CameraController defines an Update method instead of LateUpdate, are you sure you are running the latest version of ULTRAKILL?"); } } SceneManager.sceneLoaded += OnSceneLoaded; SceneManager.sceneUnloaded += OnSceneUnloaded; ExecuteOnTreeChange.onNewGameObject += OnNewGameObject; StatsManager.checkpointRestart += ResetGoldArm; } private static void OnNewGameObject(GameObject go) { if ((Object)(object)go == (Object)(object)Player || go.transform.IsChildOf(Player.transform)) { if (((Object)go).name == "Main Camera" && TimestopperProgress.HasArm) { Grayscaler.UpdateShaderSettings(); } return; } if (Object.op_Implicit((Object)(object)go.GetComponent<Rigidbody>()) && !Object.op_Implicit((Object)(object)go.GetComponent<RigidbodyStopper>())) { go.AddComponent<RigidbodyStopper>(); } if (Object.op_Implicit((Object)(object)go.GetComponent<AudioSource>()) && !Object.op_Implicit((Object)(object)go.GetComponent<AudioPitcher>()) && !go.transform.IsChildOf(Player.transform) && !Object.op_Implicit((Object)(object)go.GetComponent<Chainsaw>())) { go.AddComponent<AudioPitcher>(); } if (Object.op_Implicit((Object)(object)go.GetComponent<Enemy>())) { go.AddComponent<CustomTime>(); } SimplePortalTraveler component = go.GetComponent<SimplePortalTraveler>(); if (Object.op_Implicit((Object)(object)component)) { FixedUpdateCaller fixedUpdateCaller = go.AddComponent<FixedUpdateCaller>(); fixedUpdateCaller.targets = (Component[])(object)new Component[1] { (Component)component }; } FakeFallZone component2 = go.GetComponent<FakeFallZone>(); if (Object.op_Implicit((Object)(object)component2)) { FixedUpdateCaller fixedUpdateCaller2 = go.AddComponent<FixedUpdateCaller>(); fixedUpdateCaller2.targets = (Component[])(object)new Component[1] { (Component)component2 }; } } public static void LoadHUDIfAppropriate() { if (TimestopperProgress.HasArm && TimestopperProgress.EquippedArm) { ((MonoBehaviour)Instance).StartCoroutine(Instance.LoadHUD()); } } public void OnSceneLoaded(Scene scene, LoadSceneMode mode) { //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) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) HashSet<string> hashSet = forbiddenSceneList; Scene activeScene = SceneManager.GetActiveScene(); isInForbiddenScene = hashSet.Contains(((Scene)(ref activeScene)).name); if (((Scene)(ref scene)).name == "b3e7f2f8052488a45b35549efb98d902") { mls.LogWarning((object)"main menu loaded"); if ((Object)(object)armTimeText == (Object)null) { ((MonoBehaviour)this).StartCoroutine(LoadBundle()); } if (alterMainMenu.value) { ((MonoBehaviour)this).StartCoroutine(InstantiateMenuItems()); } } if (!isInForbiddenScene) { SceneTreeChangeWatcher.StartWatchingSceneForTreeChanges(); InvokeCaller.ClearMonos(); InvokeCaller.RegisterMethods(typeof(Coin), new string[2] { "StartCheckingSpeed", "TripleTime" }); InvokeCaller.RegisterType(typeof(ScaleNFade)); PortalManagerV2 instance = MonoSingleton<PortalManagerV2>.Instance; if (instance != null) { ((Component)instance).gameObject.AddComponent<FixedUpdateCaller>(); } Playerstopper.Instance.AddInvokeCallers(((Component)Playerstopper.Instance).transform); if ((Object)(object)Player.GetComponent<TerminalUpdater>() == (Object)null) { Player.AddComponent<TerminalUpdater>(); } if (forceDowngrade.value) { TimestopperProgress.ForceDowngradeArm(); } if (TimestopperProgress.HasArm && TimestopperProgress.EquippedArm) { ((MonoBehaviour)this).StartCoroutine(LoadHUD()); } if (firstLoad && !TimestopperProgress.HasArm) { HudMessageReceiver instance2 = MonoSingleton<HudMessageReceiver>.Instance; if (instance2 != null) { instance2.SendHudMessage("Somewhere in the depths of <color=#FF0000>Violence /// First</color>, a new <color=#FFFF23>golden</color> door appears", "", "", 2, false, false, true); } PrivateInsideTimer privateInsideTimer = messageTimer; privateInsideTimer.done = (Action)Delegate.Combine(privateInsideTimer.done, (Action)delegate { HudMessageReceiver instance5 = MonoSingleton<HudMessageReceiver>.Instance; if (instance5 != null) { ((MonoBehaviour)instance5).Invoke("Done", 0f); } firstLoad = false; }); messageTimer.SetTimer(6f, _scaled: true); } if (isAprilFools) { HudMessageReceiver instance3 = MonoSingleton<HudMessageReceiver>.Instance; if (instance3 != null) { instance3.SendHudMessage("Meet me at the terminal.", "", "", 2, false, false, true); } PrivateInsideTimer privateInsideTimer2 = messageTimer; privateInsideTimer2.done = (Action)Delegate.Combine(privateInsideTimer2.done, (Action)delegate { HudMessageReceiver instance5 = MonoSingleton<HudMessageReceiver>.Instance; if (instance5 != null) { ((MonoBehaviour)instance5).Invoke("Done", 0f); } firstLoad = false; }); messageTimer.SetTimer(6f, _scaled: true); } StyleHUD instance4 = MonoSingleton<StyleHUD>.Instance; if (instance4 != null) { instance4.RegisterStyleItem("timestopper.timestop", "<color=#FFCF21>TIME STOP</color>"); } } else { if (timeStopper != null) { ((MonoBehaviour)this).StopCoroutine(timeStopper); } timeStopper = null; timeStarter = CStartTime(0f); } if (ConfirmLevel("VIOLENCE /// FIRST")) { Log("7-1 level detected", extensive: true); GameObject val = Object.Instantiate<GameObject>(GameObject.Find("Crossroads -> Forward Hall"), GameObject.Find("Stairway Down").transform); ((Object)val).name = "Stairway Down -> Gold Arm Hall"; val.transform.position = new Vector3(-14.6292f, -25.0312f, 590.2311f); val.transform.eulerAngles = new Vector3(0f, 270f, 0f); ((Renderer)((Component)val.transform.GetChild(0)).GetComponent<MeshRenderer>()).materials[1].color = Color.yellow; ((Renderer)((Component)val.transform.GetChild(0)).GetComponent<MeshRenderer>()).materials[2].color = Color.yellow; ((Renderer)((Component)val.transform.GetChild(1)).GetComponent<MeshRenderer>()).materials[1].color = Color.yellow; ((Renderer)((Component)val.transform.GetChild(1)).GetComponent<MeshRenderer>()).materials[2].color = Color.yellow; val.GetComponent<Door>().Close(false); val.GetComponent<Door>().Lock(); val.GetComponent<Door>().activatedRooms = (GameObject[])(object)new GameObject[0]; GameObject val2 = Object.Instantiate<GameObject>(newArmAltar, GameObject.Find("Stairway Down").transform); val2.transform.position = new Vector3(-10.0146f, -24.9875f, 590.0158f); val2.transform.localEulerAngles = new Vector3(0f, 0f, 0f); ((Component)val2.transform.Find("TimeArmPickup")).gameObject.AddComponent<TimeArmPickup>(); Log("Added The New Arm Altar", extensive: true); } if (((Scene)(ref scene)).name == "9240e656c89994d44b21940f65ab57da") { cybergrind = true; if (!Chainloader.PluginInfos.ContainsKey("dev.flazhik.jukebox")) { return; } Compatability_JukeBox = true; Type type = Type.GetType("Jukebox.Components.NowPlayingHud, Jukebox"); if (type != null) { Object obj = Object.FindObjectOfType(type); Component val3 = (Component)(object)((obj is Component) ? obj : null); if ((Object)(object)val3 != (Object)null) { Transform transform = val3.gameObject.transform; transform.localPosition += new Vector3(0f, 60f, 0f); } else { Log("Component C is null!", extensive: true, ErrorLevel.Error); } } else { Log("Could not get Jukebox.Components.NowPlayingHud, Cybergrind Music Explorer may have errors", extensive: true, ErrorLevel.Error); } } else { cybergrind = false; Compatability_JukeBox = false; } } public void ReloadStringListField(StringListField slf, IEnumerable<string> values) { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown FieldInfo field = typeof(StringListField).GetField("values", BindingFlags.Instance | BindingFlags.NonPublic); FieldInfo field2 = typeof(StringListField).GetField("currentUi", BindingFlags.Instance | BindingFlags.NonPublic); string[] source = (values as string[]) ?? values.ToArray(); field?.SetValue(slf, source.ToList()); if (!source.ToArray().Contains(slf.defaultValue)) { slf.defaultValue = source.ToList()[0]; } if (field2 != null && field2.GetValue(slf) != null) { ((ConfigDropdownField)field2.GetValue(slf)).dropdown.options.Clear(); string[] array = source.ToArray(); foreach (string text in array) { ((ConfigDropdownField)field2.GetValue(slf)).dropdown.options.Add(new OptionData(text)); } } typeof(ConfigPanel).GetMethod("ProtectedInternalMethod", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy)?.Invoke(((ConfigField)slf).parentPanel, null); } public static string SearchForFile(string path, string filename) { if (!File.Exists(Path.Combine(path, filename))) { return path; } string[] directories = Directory.GetDirectories(path); foreach (string path2 in directories) { string text = SearchForFile(path2, filename); if (text != null) { return text; } } return null; } public void ReloadSoundProfilesList() { //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Expected O, but got Unknown //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Expected O, but got Unknown //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Expected O, but got Unknown Log("Info.Location: " + ((BaseUnityPlugin)this).Info.Location, extensive: false, ErrorLevel.Warning); bool flag = false; string[] array = new string[3] { "Stopping", "Stopped", "Starting" }; if (Directory.Exists(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds"))) { string[] array2 = array; foreach (string path in array2) { if (!Directory.Exists(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", path)) || Directory.GetFiles(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", path), "*.*").Length == 0) { flag = true; break; } } } else { flag = true; } if (flag) { try { string directoryName = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location); if (directoryName == null) { Log("The Timestoper.dll could not be found, please make sure the mod is installed correctly!", extensive: false, ErrorLevel.Error); return; } Log("The Timestopper.dll found, searching for audio files...", extensive: false, ErrorLevel.Warning); Directory.CreateDirectory(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds")); List<string> list = Directory.EnumerateFiles(directoryName, "*.ogg", SearchOption.AllDirectories).ToList(); string sourceFileName = Directory.EnumerateFiles(directoryName, "*.txt", SearchOption.AllDirectories).First(); string[] array3 = array; foreach (string path2 in array3) { Directory.CreateDirectory(Path.Combine(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", path2))); } foreach (string item in list) { string fileName = Path.GetFileName(item); string fileName2 = Path.GetFileName(Path.GetDirectoryName(item)?.TrimEnd(new char[1] { Path.DirectorySeparatorChar })); Log("copying over audio file to " + fileName2); File.Copy(item, Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", fileName2 ?? "unknown", fileName), overwrite: true); } if (!File.Exists(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", "README.txt"))) { File.Copy(sourceFileName, Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", "README.txt"), overwrite: true); } } catch (Exception ex) { Log("An error occurred while copying audio files to config, trace:", extensive: false, ErrorLevel.Error); Log(ex.Message, extensive: false, ErrorLevel.Error); Log(ex.Source, extensive: false, ErrorLevel.Error); Log(ex.StackTrace, extensive: false, ErrorLevel.Error); Log(ex.TargetSite, extensive: false, ErrorLevel.Error); } } string[] array4 = (from file in Directory.GetFiles(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", "Stopping"), "*.*") where file.EndsWith(".wav") || file.EndsWith(".ogg") select file).Select(Path.GetFileNameWithoutExtension).ToArray(); string[] array5 = (from file in Directory.GetFiles(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", "Stopped"), "*.*") where file.EndsWith(".wav") || file.EndsWith(".ogg") select file).Select(Path.GetFileNameWithoutExtension).ToArray(); string[] array6 = (from file in Directory.GetFiles(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", "Starting"), "*.*") where file.EndsWith(".wav") || file.EndsWith(".ogg") select file).Select(Path.GetFileNameWithoutExtension).ToArray(); if (array4.Length < 1) { Log("No time stop sounds found!", extensive: false, ErrorLevel.Error); array4 = new string[1] { "FILE ERROR" }; } if (array5.Length < 1) { Log("No ambience sounds found!", extensive: false, ErrorLevel.Error); array5 = new string[1] { "FILE ERROR" }; } if (array6.Length < 1) { Log("No time start sounds found!", extensive: false, ErrorLevel.Error); array6 = new string[1] { "FILE ERROR" }; } string text = "Classic"; string text2 = "Classic"; string text3 = "Classic"; if (!array4.Contains(text)) { text = array4[0]; } if (!array5.Contains(text2)) { text2 = array5[0]; } if (!array6.Contains(text3)) { text3 = array6[0]; } if (stopSound == null) { stopSound = new StringListField(config.rootPanel, "Timestop Sound", "timestopprofile", array4, text); } else { ReloadStringListField(stopSound, array4); } if (!array4.Contains(stopSound.value)) { stopSound.value = array4[0]; } if (stoppedSound == null) { stoppedSound = new StringListField(config.rootPanel, "Stopped Time Ambience", "ambienceprofile", array5, text2); } else { ReloadStringListField(stoppedSound, array5); } if (!array5.Contains(stoppedSound.value)) { stoppedSound.value = array5[0]; } if (startSound == null) { startSound = new StringListField(config.rootPanel, "Timestart Sound", "timestartprofile", array6, text3); } else { ReloadStringListField(startSound, array6); } if (!array6.Contains(startSound.value)) { startSound.value = array6[0]; } } private void InitializeConfig() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Expected O, but got Unknown //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Expected O, but got Unknown //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Expected O, but got Unknown //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Expected O, but got Unknown //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Expected O, but got Unknown //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Expected O, but got Unknown //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Expected O, but got Unknown //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Expected O, but got Unknown //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Expected O, but got Unknown //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Expected O, but got Unknown //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Expected O, but got Unknown //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Expected O, but got Unknown //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Expected O, but got Unknown //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Expected O, but got Unknown //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Expected O, but got Unknown //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Expected O, but got Unknown //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Expected O, but got Unknown //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Expected O, but got Unknown //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Expected O, but got Unknown //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Expected O, but got Unknown //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Expected O, but got Unknown //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Expected O, but got Unknown //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Expected O, but got Unknown //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Expected O, but got Unknown //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Expected O, but got Unknown //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Expected O, but got Unknown //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Expected O, but got Unknown //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Expected O, but got Unknown //IL_0643: Unknown result type (might be due to invalid IL or missing references) //IL_065b: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_0689: Expected O, but got Unknown //IL_0622: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Expected O, but got Unknown //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06d7: Expected O, but got Unknown //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Expected O, but got Unknown //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_071e: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Expected O, but got Unknown //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_0782: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Unknown result type (might be due to invalid IL or missing references) //IL_0791: Expected O, but got Unknown //IL_07ba: Unknown result type (might be due to invalid IL or missing references) //IL_07bf: Unknown result type (might be due to invalid IL or missing references) //IL_07c9: Expected O, but got Unknown //IL_07f2: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Unknown result type (might be due to invalid IL or missing references) //IL_0801: Expected O, but got Unknown //IL_082a: Unknown result type (might be due to invalid IL or missing references) //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Expected O, but got Unknown //IL_0849: Unknown result type (might be due to invalid IL or missing references) //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_087c: Unknown result type (might be due to invalid IL or missing references) //IL_0882: Expected O, but got Unknown //IL_0892: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08ae: Expected O, but got Unknown //IL_08ba: Unknown result type (might be due to invalid IL or missing references) //IL_08c4: Expected O, but got Unknown //IL_08d4: Unknown result type (might be due to invalid IL or missing references) //IL_08de: Expected O, but got Unknown //IL_08ee: Unknown result type (might be due to invalid IL or missing references) //IL_08f8: Expected O, but got Unknown //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Expected O, but got Unknown //IL_0923: Unknown result type (might be due to invalid IL or missing references) //IL_092d: Expected O, but got Unknown //IL_0943: Unknown result type (might be due to invalid IL or missing references) //IL_094d: Expected O, but got Unknown //IL_0959: Unknown result type (might be due to invalid IL or missing references) //IL_0963: Expected O, but got Unknown //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06a7: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Expected O, but got Unknown if (config != null) { return; } config = PluginConfigurator.Create("The Timestopper", "dev.galvin.timestopper"); new ConfigSpace(config.rootPanel, 6f); new ConfigHeader(config.rootPanel, "-- GENERAL --", 24); alterMainMenu = new BoolField(config.rootPanel, "Alter Main Menu", "altermainmenu", true); stopKey = new KeyCodeField(config.rootPanel, "Timestopper Key", "stopkey", (KeyCode)118); timestopHardDamage = new BoolField(config.rootPanel, "Timestop Hard Damage", "harddamage", true); stopSpeed = new FloatField(config.rootPanel, "Timestop Speed", "stopspeed", 0.6f); startSpeed = new FloatField(config.rootPanel, "Timestart Speed", "startspeed", 0.8f); affectSpeed = new FloatField(config.rootPanel, "Interaction Speed", "interactionspeed", 1f); animationSpeed = new FloatField(config.rootPanel, "Animation Speed", "animationspeed", 1.3f); aprilFools = new BoolField(config.rootPanel, "Enable April Fools Mode", "aprilfools", false); new ConfigSpace(config.rootPanel, 4f); new ConfigHeader(config.rootPanel, "-- GRAPHICS --", 24); grayscale = new BoolField(config.rootPanel, "Do Shader Effects", "doGrayscale", false); ConfigDivision grayscaleOptions = new ConfigDivision(config.rootPanel, "grayscaleOptions") { interactable = grayscale.value }; grayscale.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e) { ((ConfigField)grayscaleOptions).interactable = e.value; Grayscaler.UpdateShaderSettings(); }; ConfigPanel val = new ConfigPanel((ConfigPanel)(object)grayscaleOptions, "SHADER OPTIONS", "shaderoptions"); bubbleEffect = new BoolField(val, "Expanding Bubble Effect", "bubbleeffect", true); overallEffectIntensity = new FloatField(val, "Overall Intensity", "overalleffectintensity", 1f); grayscaleIntensity = new FloatField(val, "Grayscale Intensity", "grayscaleintensity", 1f); bubbleSmoothness = new FloatField(val, "Bubble Border Smoothness", "bubblesmoothness", 0.1f); colorInversionArea = new FloatField(val, "Inverted Border Thickness", "colorinversionarea", 0.01f); skyTransitionTreshold = new FloatField(val, "Sky Transition Treshold", "skytransitiontreshold", 10f); bubbleDistance = new FloatField(val, "Bubble Expansion rate", "bubbledistance", 20f); bubbleProgression = new FloatField(val, "Inverse Color Intensity", "bubbleprogression", 1f); grayscaleColorSpace = new ColorField(val, "Grayscale Color Space", "grayscalecolorspace", new Color(0.212f, 0.71f, 0.072f)); grayscaleColorSpaceIntensity = new FloatField(val, "Grayscale Color Space Multiplier", "grayscalecolorspaceintensity", 1f); BoolField obj = bubbleEffect; object obj2 = <>c.<>9__107_1; if (obj2 == null) { BoolValueChangeEventDelegate val2 = delegate { Grayscaler.UpdateShaderSettings(); }; <>c.<>9__107_1 = val2; obj2 = (object)val2; } obj.onValueChange += (BoolValueChangeEventDelegate)obj2; FloatField obj3 = overallEffectIntensity; object obj4 = <>c.<>9__107_2; if (obj4 == null) { FloatValueChangeEventDelegate val3 = delegate { Grayscaler.UpdateShaderSettings(); }; <>c.<>9__107_2 = val3; obj4 = (object)val3; } obj3.onValueChange += (FloatValueChangeEventDelegate)obj4; FloatField obj5 = grayscaleIntensity; object obj6 = <>c.<>9__107_3; if (obj6 == null) { FloatValueChangeEventDelegate val4 = delegate { Grayscaler.UpdateShaderSettings(); }; <>c.<>9__107_3 = val4; obj6 = (object)val4; } obj5.onValueChange += (FloatValueChangeEventDelegate)obj6; FloatField obj7 = bubbleSmoothness; object obj8 = <>c.<>9__107_4; if (obj8 == null) { FloatValueChangeEventDelegate val5 = delegate { Grayscaler.UpdateShaderSettings(); }; <>c.<>9__107_4 = val5; obj8 = (object)val5; } obj7.onValueChange += (FloatValueChangeEventDelegate)obj8; FloatField obj9 = colorInversionArea; object obj10 = <>c.<>9__107_5; if (obj10 == null) { FloatValueChangeEventDelegate val6 = delegate { Grayscaler.UpdateShaderSettings(); }; <>c.<>9__107_5 = val6; obj10 = (object)val6; } obj9.onValueChange += (FloatValueChangeEventDelegate)obj10; FloatField obj11 = skyTransitionTreshold; object obj12 = <>c.<>9__107_6; if (obj12 == null) { FloatValueChangeEventDelegate val7 = delegate { Grayscaler.UpdateShaderSettings(); }; <>c.<>9__107_6 = val7; obj12 = (object)val7; } obj11.onValueChange += (FloatValueChangeEventDelegate)obj12; FloatField obj13 = bubbleDistance; object obj14 = <>c.<>9__107_7; if (obj14 == null) { FloatValueChangeEventDelegate val8 = delegate { Grayscaler.UpdateShaderSettings(); }; <>c.<>9__107_7 = val8; obj14 = (object)val8; } obj13.onValueChange += (FloatValueChangeEventDelegate)obj14; FloatField obj15 = bubbleProgression; object obj16 = <>c.<>9__107_8; if (obj16 == null) { FloatValueChangeEventDelegate val9 = delegate { Grayscaler.UpdateShaderSettings(); }; <>c.<>9__107_8 = val9; obj16 = (object)val9; } obj15.onValueChange += (FloatValueChangeEventDelegate)obj16; ColorField obj17 = grayscaleColorSpace; object obj18 = <>c.<>9__107_9; if (obj18 == null) { ColorValueChangeEventDelegate val10 = delegate { Grayscaler.UpdateShaderSettings(); }; <>c.<>9__107_9 = val10; obj18 = (object)val10; } obj17.onValueChange += (ColorValueChangeEventDelegate)obj18; FloatField obj19 = grayscaleColorSpaceIntensity; object obj20 = <>c.<>9__107_10; if (obj20 == null) { FloatValueChangeEventDelegate val11 = delegate { Grayscaler.UpdateShaderSettings(); }; <>c.<>9__107_10 = val11; obj20 = (object)val11; } obj19.onValueChange += (FloatValueChangeEventDelegate)obj20; new ConfigSpace(config.rootPanel, 4f); new ConfigHeader(config.rootPanel, "-- AUDIO --", 24); soundEffectVolume = new FloatSliderField(config.rootPanel, "Sound Effects Volume", "effectvolume", new Tuple<float, float>(0f, 2f), 1f); stoppedMusicPitch = new FloatSliderField(config.rootPanel, "Music Pitch in Stopped Time", "musicpitch", new Tuple<float, float>(0f, 1f), 0.6f); stoppedMusicVolume = new FloatSliderField(config.rootPanel, "Music volume in Stopped Time", "musicvolume", new Tuple<float, float>(0f, 1f), 0.8f); filterMusic = new BoolField(config.rootPanel, "Filter Music in Stopped Time", "filtermusic", false); ReloadSoundProfilesList(); soundReloadButton = new ButtonField(config.rootPanel, "Reload Sound Profiles", "soundprofilebutton"); soundReloadButton.onClick += (OnClick)delegate { ((MonoBehaviour)this).StartCoroutine(LoadSoundProfiles()); }; soundFileButton = new ButtonField(config.rootPanel, "Open Sound Profile Folder", "soundprofilebutton"); ButtonField obj21 = soundFileButton; object obj22 = <>c.<>9__107_12; if (obj22 == null) { OnClick val12 = delegate { Application.OpenURL(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds")); }; <>c.<>9__107_12 = val12; obj22 = (object)val12; } obj21.onClick += (OnClick)obj22; new ConfigSpace(config.rootPanel, 4f); new ConfigHeader(config.rootPanel, "-- GAMEPLAY --", 24); maxUpgrades = new IntField(config.rootPanel, "Maximum Number of Upgrades", "maxupgrades", 10) { minimumValue = 1 }; IntField obj23 = maxUpgrades; object obj24 = <>c.<>9__107_13; if (obj24 == null) { IntValueChangeEventDelegate val13 = delegate(IntValueChangeEvent e) { if (e.value < 1) { e.value = 1; maxUpgrades.value = 1; } }; <>c.<>9__107_13 = val13; obj24 = (object)val13; } obj23.onValueChange += (IntValueChangeEventDelegate)obj24; refillMultiplier = new FloatField(config.rootPanel, "Passive Income Multiplier", "refillmultiplier", 0.1f); bonusTimeForParry = new FloatField(config.rootPanel, "Time Juice Refill Per Parry", "bonustimeperparry", 1f); specialMode = new BoolField(config.rootPanel, "Special Mode", "specialmode", false) { interactable = false, value = false }; new ConfigSpace(config.rootPanel, 4f); new ConfigHeader(config.rootPanel, "-- COLORS --", 24); timeJuiceColorNormal = new ColorField(config.rootPanel, "Time Juice Bar Normal Color", "timejuicecolornormal", new Color(1f, 1f, 0f, 1f)); timeJuiceColorInsufficient = new ColorField(config.rootPanel, "Time Juice Bar Insufficient Color", "timejuicecolorinsufficient", new Color(1f, 0f, 0f, 1f)); timeJuiceColorUsing = new ColorField(config.rootPanel, "Time Juice Bar Draining Color", "timejuicecolorusing", new Color(1f, 0.6f, 0f, 1f)); timeJuiceColorNoCooldown = new ColorField(config.rootPanel, "Time Juice Bar No Cooldown Color", "timejuicecolornocooldown", new Color(0f, 1f, 1f, 1f)); new ConfigSpace(config.rootPanel, 4f); new ConfigHeader(config.rootPanel, "-- ADVANCED OPTIONS --", 24); ConfigPanel val14 = new ConfigPanel(config.rootPanel, "ADVANCED", "advancedoptions"); new ConfigSpace(config.rootPanel, 8f); extensiveLogging = new BoolField(val14, "Extensive Logging", "extensivelogging", false); forceDowngrade = new BoolField(val14, "Force Downgrade Arm", "forcedowngrade", true); lowerTreshold = new FloatField(val14, "Min Time Juice to Stop Time", "lowertreshold", 2f); antiHpMultiplier = new FloatField(val14, "Hard Damage Buildup Multiplier", "antihpmultiplier", 30f); resetSaveButton = new ButtonField(config.rootPanel, "RESET TIMESTOPPER PROGRESS", "resetsavebutton"); resetSaveButton.onClick += new OnClick(TimestopperProgress.Reset); giveArmButton = new ButtonField(config.rootPanel, "GIVE TIMESTOPPER ARM", "givearmbutton"); giveArmButton.onClick += new OnClick(TimestopperProgress.GiveArm); } public IEnumerator LoadSoundProfiles() { ((ConfigField)stopSound).interactable = false; ((ConfigField)startSound).interactable = false; ((ConfigField)stoppedSound).interactable = false; ((ConfigField)soundReloadButton).interactable = false; ReloadSoundProfilesList(); string[] timestopSoundsList = (from file in Directory.GetFiles(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", "Stopping"), "*.*") where file.EndsWith(".wav") || file.EndsWith(".ogg") select file).ToArray(); TimestopSounds = (AudioClip[])(object)new AudioClip[timestopSoundsList.Length]; for (int i = 0; i < timestopSoundsList.Length; i++) { AudioType audioType = (AudioType)20; if (timestopSoundsList[i].EndsWith(".ogg")) { audioType = (AudioType)14; } if (timestopSoundsList[i].EndsWith(".wav")) { audioType = (AudioType)20; } if (timestopSoundsList[i].EndsWith(".mp3")) { audioType = (AudioType)13; } UnityWebRequest request = UnityWebRequestMultimedia.GetAudioClip("file://" + timestopSoundsList[i], audioType); try { yield return request.SendWebRequest(); TimestopSounds[i] = DownloadHandlerAudioClip.GetContent(request); Log("downloaded timestop audio cussessfully!"); } finally { ((IDisposable)request)?.Dispose(); } } string[] stopambienceSoundsList = (from file in Directory.GetFiles(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", "Stopped"), "*.*") where file.EndsWith(".wav") || file.EndsWith(".ogg") select file).ToArray(); StoppedTimeAmbiences = (AudioClip[])(object)new AudioClip[stopambienceSoundsList.Length]; for (int i2 = 0; i2 < stopambienceSoundsList.Length; i2++) { AudioType audioType2 = (AudioType)20; if (stopambienceSoundsList[i2].EndsWith(".ogg")) { audioType2 = (AudioType)14; } if (stopambienceSoundsList[i2].EndsWith(".wav")) { audioType2 = (AudioType)20; } if (stopambienceSoundsList[i2].EndsWith(".mp3")) { audioType2 = (AudioType)13; } UnityWebRequest request2 = UnityWebRequestMultimedia.GetAudioClip("file://" + stopambienceSoundsList[i2], audioType2); try { yield return request2.SendWebRequest(); StoppedTimeAmbiences[i2] = DownloadHandlerAudioClip.GetContent(request2); Log("downloaded stopambience audio successfully!"); } finally { ((IDisposable)request2)?.Dispose(); } } string[] timestartSoundsList = (from file in Directory.GetFiles(Path.Combine(Paths.ConfigPath, "Timestopper", "Sounds", "Starting"), "*.*") where file.EndsWith(".wav") || file.EndsWith(".ogg") select file).ToArray(); TimestartSounds = (AudioClip[])(object)new AudioClip[timestartSoundsList.Length]; for (int i3 = 0; i3 < timestartSoundsList.Length; i3++) { AudioType audioType3 = (AudioType)20; if (timestartSoundsList[i3].EndsWith(".ogg")) { audioType3 = (AudioType)14; } if (timestartSoundsList[i3].EndsWith(".wav")) { audioType3 = (AudioType)20; } if (timestartSoundsList[i3].EndsWith(".mp3")) { audioType3 = (AudioType)13; } UnityWebRequest request3 = UnityWebRequestMultimedia.GetAudioClip("file://" + timestartSoundsList[i3], audioType3); try { yield return request3.SendWebRequest(); TimestartSounds[i3] = DownloadHandlerAudioClip.GetContent(request3); Log("downloaded timestart audio successfully!"); } finally { ((IDisposable)request3)?.Dispose(); } } ((ConfigField)stopSound).interactable = true; ((ConfigField)startSound).interactable = true; ((ConfigField)stoppedSound).interactable = true; ((ConfigField)soundReloadButton).interactable = true; ReloadSoundProfilesList(); } public IEnumerator LoadBundle() { LoadDone = false; Type imageType = typeof(Image); GC.KeepAlive(imageType); Assembly assembler = Assembly.GetExecutingAssembly(); string[] resourceNames = assembler.GetManifestResourceNames(); Log("Scanning newly embedded resources: " + string.Join(", ", resourceNames), extensive: true); using (Stream stream = assembler.GetManifestResourceStream("The_Timestopper.aprilfools.bundle")) { AssetBundle aprilFoolsBundle = AssetBundle.LoadFromStream(stream); aprilFoolsPFPList = aprilFoolsBundle.LoadAllAssets<Sprite>(); rickrollObject = aprilFoolsBundle.LoadAllAssets<GameObject>()[0]; } using (Stream stream2 = assembler.GetManifestResourceStream("The_Timestopper.timestopper_assets_assets_all.bundle")) { AssetBundle newBundle = AssetBundle.LoadFromStream(stream2); newTimeArm = newBundle.LoadAsset<GameObject>("Assets/TimestopperMod/TimeArm.prefab"); newArmAltar = newBundle.LoadAsset<GameObject>("Assets/TimestopperMod/TimeArmAltar.prefab"); armTimeText = newBundle.LoadAsset<GameObject>("Assets/TimestopperMod/TimestopperText.prefab"); armGoldLogo = newBundle.LoadAsset<Texture2D>("Assets/TimestopperMod/ArmTimestopper.png"); modLogo = newBundle.LoadAsset<Texture2D>("Assets/TimestopperMod/icon_big.png"); grayscaleShader = newBundle.LoadAsset<Shader>("Assets/TimestopperMod/GrayscaleObject.shader"); depthShader = newBundle.LoadAsset<Shader>("Assets/TimestopperMod/DepthRenderer.shader"); config.icon = Sprite.Create(modLogo, new Rect(0f, 0f, 750f, 750f), new Vector2(375f, 375f)); Log("Total assets loaded: " + newBundle.GetAllAssetNames().Length, extensive: true); string[] allAssetNames = newBundle.GetAllAssetNames(); foreach (string asset in allAssetNames) { Log(asset, extensive: true); } yield return LoadSoundProfiles(); } Log("Scanning embedded resources: " + string.Join(", ", resourceNames), extensive: true); Log(" >:Bundle extraction done!", extensive: true); LoadDone = true; } public static GameObject UpdateTerminal(ShopZone ShopComp) { //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_0a25: Unknown result type (might be due to invalid IL or missing references) //IL_0a34: Unknown result type (might be due to invalid IL or missing references) //IL_0a3e: Unknown result type (might be due to invalid IL or missing references) //IL_0a7c: Unknown result type (might be due to invalid IL or missing references) //IL_0b0a: Unknown result type (might be due to invalid IL or missing references) //IL_0b19: Unknown result type (might be due to invalid IL or missing references) //IL_0b23: Unknown result type (might be due to invalid IL or missing references) //IL_0bd1: Unknown result type (might be due to invalid IL or missing references) //IL_0cf8: Unknown result type (might be due to invalid IL or missing references) //IL_0d19: Unknown result type (might be due to invalid IL or missing references) //IL_0d6f: Unknown result type (might be due to invalid IL or missing references) //IL_0dce: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_060f: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_07e6: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ShopComp == (Object)null) { Log("Shop Component is null, cannot update terminal!", extensive: false, ErrorLevel.Error); return null; } GameObject gameObject = ((Component)ShopComp).gameObject; if ((Object)(object)gameObject.transform.Find("Canvas/Background/Main Panel/Weapons/Arm Window") == (Object)null) { ((Component)ShopComp).gameObject.AddComponent<TerminalExcluder>(); return null; } GameObject gameObject2 = ((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Weapons/Arm Window")).gameObject; GameObject gameObject3 = ((Component)gameObject2.transform.Find("Variation Screen/Variations/Arm Panel (Gold)")).gameObject; GameObject gameObject4 = ((Component)gameObject2.transform.Find("Arm Info (Gold)")).gameObject; if (isAprilFools) { Debug.LogWarning((object)"You are now dawn!"); int num = Random.Range(0, aprilFoolsPFPList.Length); ((Component)ShopComp).gameObject.AddComponent<TerminalExcluder>(); GameObject val = Object.Instantiate<GameObject>(rickrollObject, gameObject.transform.Find("Canvas/Background/Main Panel")); ((Component)val.transform.Find("close")).GetComponent<ShopButton>().toActivate = (GameObject[])(object)new GameObject[2] { ((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Main Menu")).gameObject, ((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Tip of the Day")).gameObject }; val.SetActive(false); GameObject val2 = Object.Instantiate<GameObject>(((Component)gameObject.transform.Find("Canvas/Background/Main Panel/The Cyber Grind/Cyber Grind Panel")).gameObject, gameObject.transform.Find("Canvas/Background/Main Panel")); ((Object)val2).name = "New Mail!"; val2.GetComponent<RectTransform>().SetSizeWithCurrentAnchors((Axis)0, 500f); val2.GetComponent<RectTransform>().SetSizeWithCurrentAnchors((Axis)1, 230f); val2.transform.localPosition = new Vector3(-9.4417f, 6f, 0.0002f); ((Component)val2.transform.Find("Button 1")).gameObject.SetActive(false); ((Component)val2.transform.Find("Button 2")).gameObject.SetActive(false); ((Component)val2.transform.Find("Button 3")).gameObject.SetActive(false); if (Object.op_Implicit((Object)(object)val2.GetComponentInChildren<HudMessage>())) { Object.Destroy((Object)(object)((Component)val2.GetComponentInChildren<HudMessage>()).gameObject); } string text = "something is wrong..."; if (((Object)aprilFoolsPFPList[num]).name == "brakxypfp") { text = "<color=#FF0000>@hellbrakxy123</color><color=#EEEEEE> has invited you to commit Fraud in Minecraft, accept? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "dialyultrakillnewspfp") { text = "<color=#FF0000>@dailyultrakillnewsofficialnofake</color><color=#EEEEEE> has sent you an ULTRAKILL leak, accept it? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "galvinpfp") { text = "<color=#FF0000>@xXxgalvinvoltagxXx</color><color=#EEEEEE> has invited you to a private conversation, accept it? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "hakitapfp") { text = "<color=#FF0000>@arsihakita</color><color=#EEEEEE> has invited you to a public video call, accept it? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "librarianpfp") { text = "<color=#FF0000>@thelibrarian</color><color=#EEEEEE> has sent you a very comfy and creepy pocket dimension, accept? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "markpfp") { text = "<color=#FF0000>@realmarkiplier</color><color=#EEEEEE> announced that you won a special prize, accept the suspicious link? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "martapfp") { text = "<color=#FF0000>@martaspidetty</color><color=#EEEEEE> offered you a drawing class in the Treachery layer, accept offer? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "newbloodpfp") { text = "<color=#FF0000>@newbloodofficial</color><color=#EEEEEE> has offered you a sale on merch and games, accept offer? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "newtonpfp") { text = "<color=#FF0000>@isaacnewtonrblx</color><color=#EEEEEE> has offered you a class on Einstein's relativity principle, accept? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "radiationpfp") { text = "<color=#FF0000>@tobynotradiationfox</color><color=#EEEEEE> has some of your delta rune, would you like to rob him? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "mindflayerpfp") { text = "<color=#FF0000>@sexflayer3169</color><color=#EEEEEE> has sent you and invitation to the Lust layer, alone, accept offer? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "sisyphuspfp") { text = "<color=#FF0000>@hotprimesoul</color><color=#EEEEEE> has sent you an invitation to the Greed layer, alone, accept offer? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "rickpfp") { text = "<color=#FF0000>@rickastley</color><color=#EEEEEE> announced you as his new legal daughter, accept your new self? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "earthpfp") { text = "<color=#FF0000>@earthchannotflat</color><color=#EEEEEE> has sent you a new blood-y mail, open and view it? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "linguinipfp") { text = "<color=#FF0000>@linguiniwithoutlasagna</color><color=#EEEEEE> has defeated you in 8-S speedrun already, take revenge? </color>"; } if (((Object)aprilFoolsPFPList[num]).name == "gronf") { text = "<color=#FF0000>@gronf</color><color=#EEEEEE> has forgotten to install The Timestopper, remind him to do so? </color>"; } ((TMP_Text)((Component)val2.transform.Find("Panel/Text Inset/Text")).GetComponent<TextMeshProUGUI>()).text = text; ((Component)val2.transform.Find("Panel/Text Inset/Text")).GetComponent<RectTransform>().SetInsetAndSizeFromParentEdge((Edge)1, 10f, 350f); GameObject val3 = Object.Instantiate<GameObject>(((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Enemies/Enemies Panel/Icon")).gameObject, val2.transform.Find("Title")); GameObject val4 = Object.Instantiate<GameObject>(((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Enemies/Enemies Panel/Icon")).gameObject, val2.transform.Find("Title")); val4.transform.localPosition = new Vector3(-37f, 0f, 0f); val3.transform.localPosition = new Vector3(190f, 0f, 0f); ((TMP_Text)((Component)val2.transform.Find("Title")).GetComponent<TextMeshProUGUI>()).text = "NEWBLOOD-Y MAIL"; ((TMP_Text)((Component)val2.transform.Find("Title")).GetComponent<TextMeshProUGUI>()).transform.localPosition = new Vector3(-100f, 116f, 0f); GameObject gameObject5 = ((Component)val2.transform.Find("Icon")).gameObject; gameObject5.transform.SetParent(val2.transform.Find("Panel/Text Inset"), true); gameObject5.transform.localPosition = new Vector3(-225f, 40f, 0f); gameObject5.transform.localScale = new Vector3(2f, 2f, 2f); gameObject5.GetComponent<Image>().sprite = aprilFoolsPFPList[num]; GameObject gameObject6 = ((Component)val2.transform.Find("Panel/Enter Button")).gameObject; ((TMP_Text)((Component)gameObject6.transform.Find("Text")).GetComponent<TextMeshProUGUI>()).text = "YES"; ((Graphic)gameObject6.GetComponent<Image>()).color = new Color(0f, 1f, 0f, 1f); ((Object)gameObject6).name = "Accept Button"; Object.Destroy((Object)(object)gameObject6.GetComponent<AbruptLevelChanger>()); val2.SetActive(true); ((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Main Menu")).gameObject.SetActive(false); ((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Tip of the Day")).gameObject.SetActive(false); gameObject6.GetComponent<ShopButton>().PointerClickSuccess += delegate { Log("this is good", extensive: false, ErrorLevel.Warning); }; gameObject6.GetComponent<ShopButton>().toDeactivate = (GameObject[])(object)new GameObject[1] { val2 }; gameObject6.GetComponent<ShopButton>().toActivate = (GameObject[])(object)new GameObject[1] { val }; gameObject6.GetComponent<RectTransform>().SetInsetAndSizeFromParentEdge((Edge)1, 10f, 220f); GameObject val5 = Object.Instantiate<GameObject>(gameObject6, gameObject6.transform.parent, true); val5.GetComponent<RectTransform>().SetInsetAndSizeFromParentEdge((Edge)0, 10f, 220f); ((TMP_Text)((Component)val5.transform.Find("Text")).GetComponent<TextMeshProUGUI>()).text = "NOOo"; ((Graphic)val5.GetComponent<Image>()).color = new Color(1f, 0f, 0f, 1f); Object.Destroy((Object)(object)val5.GetComponent<AbruptLevelChanger>()); val5.GetComponent<ShopButton>().PointerClickSuccess += delegate { Log("this is good", extensive: false, ErrorLevel.Warning); }; val5.GetComponent<ShopButton>().toDeactivate = (GameObject[])(object)new GameObject[1] { val2 }; val5.GetComponent<ShopButton>().toActivate = (GameObject[])(object)new GameObject[2] { ((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Tip of the Day")).gameObject, ((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Main Menu")).gameObject }; ((Object)val5).name = "Decline Button"; } if (TimestopperProgress.HasArm) { ((Component)ShopComp).gameObject.AddComponent<TerminalExcluder>(); gameObject3.GetComponent<ShopButton>().toActivate = (GameObject[])(object)new GameObject[1] { gameObject4 }; ((TMP_Text)((Component)gameObject3.transform.Find("Variation Name")).GetComponent<TextMeshProUGUI>()).text = "TIMESTOPPER"; ((Behaviour)gameObject3.GetComponent<VariationInfo>()).enabled = true; gameObject3.GetComponent<VariationInfo>().alreadyOwned = true; gameObject3.GetComponent<VariationInfo>().varPage = gameObject4; gameObject3.GetComponent<VariationInfo>().weaponName = "arm4"; gameObject3.GetComponent<ShopButton>().PointerClickSuccess += gameObject.GetComponent<TerminalExcluder>().OverrideInfoMenu; ((Component)gameObject4.transform.Find("Panel/Purchase Button")).GetComponent<ShopButton>().PointerClickSuccess += TimestopperProgress.UpgradeArm; ((Component)gameObject4.transform.Find("Panel/Purchase Button")).GetComponent<ShopButton>().PointerClickSuccess += gameObject.GetComponent<TerminalExcluder>().OverrideInfoMenu; gameObject3.GetComponent<VariationInfo>().cost = (int)TimestopperProgress.UpgradeCost; ((Component)gameObject3.transform.Find("Equipment/Equipment Status")).GetComponent<ShopButton>().PointerClickSuccess += TimestopperProgress.ChangeEquipmentStatus; ((Component)gameObject3.transform.Find("Equipment/Buttons/Previous Button")).GetComponent<ShopButton>().PointerClickSuccess += TimestopperProgress.ChangeEquipmentStatus; ((Component)gameObject3.transform.Find("Equipment/Buttons/Next Button")).GetComponent<ShopButton>().PointerClickSuccess += TimestopperProgress.ChangeEquipmentStatus; Sprite sprite = Sprite.Create(armGoldLogo, new Rect(0f, 0f, 750f, 750f), new Vector2(750f, 750f) / 2f); ((Component)gameObject3.transform.Find("Weapon Icon")).GetComponent<Image>().sprite = sprite; ((Graphic)((Component)gameObject3.transform.Find("Weapon Icon")).GetComponent<Image>()).color = Color.yellow; ((TMP_Text)((Component)gameObject4.transform.Find("Title")).GetComponent<TextMeshProUGUI>()).text = "Timestopper"; ((TMP_Text)((Component)gameObject4.transform.Find("Panel/Name")).GetComponent<TextMeshProUGUI>()).text = "TIMESTOPPER"; ((TMP_Text)((Component)gameObject4.transform.Find("Panel/Description")).GetComponent<TextMeshProUGUI>()).text = "A Godfist that <color=#FFFF43>stops</color> time.\r\n\r\nRecharges very slow, but <color=#FF4343>parrying</color> helps it recharge faster.\r\n\r\nCan be <color=#FFFF24>upgraded</color> through terminals.\r\n" + TimestopperProgress.UpgradeText; Sprite sprite2 = Sprite.Create(armGoldLogo, new Rect(0f, 0f, 750f, 750f), new Vector2(750f, 750f) / 2f); ((Component)gameObject4.transform.Find("Panel/Icon Inset/Icon")).GetComponent<Image>().sprite = sprite2; if (!TimestopperProgress.FirstWarning) { GameObject val6 = Object.Instantiate<GameObject>(((Component)gameObject.transform.Find("Canvas/Background/Main Panel/The Cyber Grind/Cyber Grind Panel")).gameObject, gameObject.transform.Find("Canvas/Background/Main Panel")); ((Object)val6).name = "Warning Panel"; if (Object.op_Implicit((Object)(object)val6.GetComponentInChildren<HudMessage>())) { Object.Destroy((Object)(object)((Component)val6.GetComponentInChildren<HudMessage>()).gameObject); } val6.transform.localPosition = new Vector3(-9.4417f, 6f, 0.0002f); ((Component)val6.transform.Find("Button 1")).gameObject.SetActive(false); ((Component)val6.transform.Find("Button 2")).gameObject.SetActive(false); ((Component)val6.transform.Find("Button 3")).gameObject.SetActive(false); ((Component)val6.transform.Find("Icon")).gameObject.SetActive(false); Object.Destroy((Object)(object)val6.transform.Find("GameObject")); ((TMP_Text)((Component)val6.transform.Find("Panel/Text Inset/Text")).GetComponent<TextMeshProUGUI>()).text = "<color=#FF4343>!!! Extreme Hazard Detected !!!</color> \r\n\r\nYou have <color=#FF4343>The Timestopper</color> in your possession. Using this item may cause disturbance in space-time continuum.\r\n\r\n<color=#FF4343>Please acknowledge the consequences before proceeding further.</color>"; GameObject val7 = Object.Instantiate<GameObject>(((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Enemies/Enemies Panel/Icon")).gameObject, val6.transform.Find("Title")); GameObject val8 = Object.Instantiate<GameObject>(((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Enemies/Enemies Panel/Icon")).gameObject, val6.transform.Find("Title")); val8.transform.localPosition = new Vector3(-37.1206f, -0.0031f, 0f); val7.transform.localPosition = new Vector3(97.8522f, -0.0031f, 0f); ((TMP_Text)((Component)val6.transform.Find("Title")).GetComponent<TextMeshProUGUI>()).text = "WARNING"; ((TMP_Text)((Component)val6.transform.Find("Title")).GetComponent<TextMeshProUGUI>()).transform.localPosition = new Vector3(-51.5847f, 189.9997f, 0f); GameObject gameObject7 = ((Component)val6.transform.Find("Panel/Enter Button")).gameObject; ((TMP_Text)((Component)gameObject7.transform.Find("Text")).GetComponent<TextMeshProUGUI>()).text = "ACCEPT"; ((Graphic)gameObject7.GetComponent<Image>()).color = new Color(0f, 1f, 0f, 1f); ((Object)gameObject7).name = "Accept Button"; Object.Destroy((Object)(object)gameObject7.GetComponent<AbruptLevelChanger>()); val6.SetActive(false); ((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Main Menu")).gameObject.SetActive(false); ((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Tip of the Day")).gameObject.SetActive(false); gameObject7.GetComponent<ShopButton>().PointerClickSuccess += TimestopperProgress.AcceptWarning; gameObject7.GetComponent<ShopButton>().toDeactivate = (GameObject[])(object)new GameObject[1] { val6 }; gameObject7.GetComponent<ShopButton>().toActivate = (GameObject[])(object)new GameObject[2] { ((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Tip of the Day")).gameObject, ((Component)gameObject.transform.Find("Canvas/Background/Main Panel/Main Menu")).gameObject }; return val6; } } else { ((Behaviour)gameObject3.GetComponent<VariationInfo>()).enabled = true; gameObject3.GetComponent<VariationInfo>().alreadyOwned = false; gameObject3.GetComponent<VariationInfo>().varPage = gameObject4; } return null; } public IEnumerator LoadHUD() { if (!TimestopperProgress.HasArm) { yield break; } float elapsedTime = 0f; Log("Loading HUD Elements...", extensive: true); do { if (elapsedTime > 5f) { Log("Time Juice Bar creation failed after 5 seconds!", extensive: false, ErrorLevel.Error); yield break; } elapsedTime += Time.unscaledDeltaTime; yield return null; } while ((Object)(object)Player.transform.Find("Main Camera/HUD Camera/HUD/GunCanvas/StatsPanel/Filler/AltRailcannonPanel") == (Object)null); GameObject[] TimeHUD = (GameObject[])(object)new GameObject[3] { Object.Instantiate<GameObject>(((Component)Player.transform.Find("Main Camera/HUD Camera/HUD/GunCanvas/StatsPanel/Filler/AltRailcannonPanel")).gameObject, Player.transform.Find("Main Camera/HUD Camera/HUD/GunCanvas/StatsPanel/Filler")), default(GameObject), default(GameObject) }; TimeHUD[0].SetActive(true); ((Object)TimeHUD[0]).name = "Golden Time"; TimeHUD[0].transform.localPosition = new Vector3(0f, 124.5f, 0f); ((Component)TimeHUD[0].transform.Find("Image")).gameObject.GetComponent<Image>().fillAmount = 0f; Sprite mm = Sprite.Create(armGoldLogo, new Rect(0f, 0f, 750f, 750f), new Vector2(750f, 750f) / 2f); ((Component)TimeHUD[0].transform.Find("Icon")).gameObject.GetComponent<Image>().sprite = mm; TimeHUD[0].AddComponent<TimeHUD>(); TimeHUD[0].GetComponent<TimeHUD>().type = 0; Transform transform = ((Component)HudController.Instance.speedometer).gameObject.transform; transform.localPosition += new Vector3(0f, 64f, 0f); Log("Time Juice Bar created successfully.", extensive: true); GameObject obj; do { if (elapsedTime > 5f) { Log("Time Juice Alt HUD creation failed after 5 seconds!", extensive: false, ErrorLevel.Error); yield break; } elapsedTime += Time.unscaledDeltaTime; yield return null; obj = FindRootGameObject("Canvas"); } while ((Object)(object)((obj != null) ? obj.transform.Find("Crosshair Filler/AltHud/Filler/Speedometer") : null) == (Object)null); TimeHUD[1] = Object.Instantiate<GameObject>(((Component)FindRootGameObject("Canvas").transform.Find("Crosshair Filler/AltHud/Filler/Speedometer")).gameObject, FindRootGameObject("Canvas").transform.Find("Crosshair Filler/AltHud/Filler")); TimeHUD[2] = Object.Instantiate<GameObject>(((Component)FindRootGameObject("Canvas").transform.Find("Crosshair Filler/AltHud (2)/Filler/Speedometer")).gameObject, FindRootGameObject("Canvas").transform.Find("Crosshair Filler/AltHud (2)/Filler")); ((TMP_Text)((Component)TimeHUD[1].transform.Find("Text (TMP)")).GetComponent<TextMeshProUGUI>()).fontMaterial = ((TMP_Text)((Component)TimeHUD[1].transform.Find("Text (TMP)")).GetComponent<TextMeshProUGUI>()).fontSharedMaterial; ((Graphic)((Component)TimeHUD[1].transform.Find("Text (TMP)")).GetComponent<TextMeshProUGUI>()).SetMaterialDirty(); ((Graphic)((Component)TimeHUD[1].transform.Find("Text (TMP)")).GetComponent<TextMeshProUGUI>()).color = new Color(1f, 0.9f, 0.2f); ((TMP_Text)((Component)TimeHUD[1].transform.Find("Title")).GetComponent<TextMeshProUGUI>()).text = "TIME"; TimeHUD[1].transform.localPosition = new Vector3(360f, -360f, 0f); Object.Destroy((Object)(object)TimeHUD[1].GetComponent<Speedometer>()); ((Object)TimeHUD[1]).name = "Time Juice"; ((TMP_Text)((Component)TimeHUD[2].transform.Find("Title")).GetComponent<TextMeshProUGUI>()).text = "TIME"; TimeHUD[2].transform.localPosition = new Vector3(360f, -360f, 0f); Object.Destroy((Object)(object)TimeHUD[2].GetComponent<Speedometer>()); ((Object)TimeHUD[2]).name = "Time Juice"; TimeHUD[1].AddComponent<TimeHUD>(); TimeHUD[1].GetComponent<TimeHUD>().type = 1; TimeHUD[2].AddComponent<TimeHUD>(); TimeHUD[2].GetComponent<TimeHUD>().type = 2; Log("Golden Time Alt HUD created successfully.", extensive: true); } public static void ResetGoldArm() { StartTime(0f); TimeArm.Instance?.Reset(); } public static GameObject FindRootGameObject(string _name) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); return ((IEnumerable<GameObject>)((Scene)(ref activeScene)).GetRootGameObjects()).FirstOrDefault((Func<GameObject, bool>)((GameObject G) => ((Object)G).name == _name)); } public IEnumerator InstantiateMenuItems() { yield return (object)new WaitUntil((Func<bool>)(() => LoadDone)); Log("custom menu items are loaded"); GameObject timeArmText = Object.Instantiate<GameObject>(armTimeText, FindRootGameObject("Canvas").transform.Find("Main Menu (1)/V1")); timeArmText.SetActive(TimestopperProgress.HasArm); GameObject timeArmText2 = Object.Instantiate<GameObject>(armTimeText, FindRootGameObject("Canvas").transform.Find("Difficulty Select (1)/Info Background/V1")); ((Graphic)timeArmText2.GetComponent<Image>()).color = new Color(0.125f, 0.125f, 0.125f, 1f); timeArmText2.SetActive(TimestopperProgress.HasArm); } public void OnSceneUnloaded(Scene scene) { } private bool ConfirmLevel(string LayerName) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)currentLevelInfo == (Object)null) { Scene activeScene = SceneManager.GetActiveScene(); GameObject[] rootGameObjects = ((Scene)(ref activeScene)).GetRootGameObjects(); foreach (GameObject val in rootGameObjects) { if (((Object)val).name == "Level Info") { currentLevelInfo = val; if (((MapInfoBase)val.GetComponent<StockMapInfo>()).layerName == LayerName) { return true; } } } } else if (((MapInfoBase)currentLevelInfo.GetComponent<StockMapInfo>()).layerName == LayerName) { return true; } return false; } public IEnumerator CStopTime(float speed) { if (isInForbiddenScene) { yield break; } ((MonoBehaviour)this).StopCoroutine(timeStarter); StoppedTimeAmount = 0f; if (filterMusic.value) { MusicManager instance = MonoSingleton<MusicManager>.Instance; if (instance != null) { instance.FilterMusic(); } } Physics.simulationMode = (SimulationMode)2; RigidbodyStopper.FreezeAll(); Animator[] componentsInChildren = Player.GetComponentsInChildren<Animator>(); foreach (Animator A in componentsInChildren) { A.updateMode = (AnimatorUpdateMode)2; } if (speed == 0f) { Time.timeScale = 0f; realTimeScale = 0f; playerTimeScale = 1f; yield break; } while (Object.op_Implicit((Object)(object)MonoSingleton<OptionsManager>.Instance)) { Time.timeScale -= Time.unscaledDeltaTime / speed * (float)((!MonoSingleton<OptionsManager>.Instance.paused) ? 1 : 0); realTimeScale -= Time.unscaledDeltaTime / speed * (float)((!MonoSingleton<OptionsManager>.Instance.paused) ? 1 : 0); yield return null; if (!(Time.timeScale > Time.unscaledDeltaTime / speed)) { break; } } Time.timeScale = 0f; realTimeScale = 0f; } public IEnumerator CStartTime(float speed, bool preventStyle = false) { if (isInForbiddenScene) { yield break; } ((MonoBehaviour)this).StopCoroutine(timeStopper); if (filterMusic.value) { MusicManager instance = MonoSingleton<MusicManager>.Instance; if (instance != null) { instance.UnfilterMusic(); } } Physics.simulationMode = (SimulationMode)0; RigidbodyStopper.UnfreezeAll(); Animator[] array = Object.FindObjectsOfType<Animator>(); foreach (Animator A in array) { if (((Component)A).gameObject.transform.IsChildOf(Player.transform) && (int)A.updateMode == 2) { A.updateMode = (AnimatorUpdateMode)0; } } if (speed == 0f) { Time.timeScale = 1f; realTimeScale = 1f; StoppedTimeAmount = 0f; yield break; } if (Time.timeScale < 0f) { Time.timeScale = 0f; } while (Object.op_Implicit((Object)(object)MonoSingleton<OptionsManager>.Instance)) { Time.timeScale += Time.unscaledDeltaTime / speed * (float)((!MonoSingleton<OptionsManager>.Instance.paused) ? 1 : 0); realTimeScale += Time.unscaledDeltaTime / speed * (float)((!MonoSingleton<OptionsManager>.Instance.paused) ? 1 : 0); yield return null; if (!(Time.timeScale < 1f)) { break; } } if (!preventStyle && StoppedTimeAmount > 2f) { StyleHUD instance2 = MonoSingleton<StyleHUD>.Instance; if (instance2 != null) { instance2.AddPoints((int)StoppedTimeAmount * 100, "timestopper.timestop", ((Component)Playerstopper.Instance).gameObject, (EnemyIdentifier)null, -1, "", ""); } } StoppedTimeAmount = 0f; Time.timeScale = 1f; realTimeScale = 1f; } public static void StopTime(float time) { if (!isInForbiddenScene) { Instance.timeStopper = Instance.CStopTime(time); ((MonoBehaviour)Instance).StartCoroutine(Instance.timeStopper); TimeStop = true; } } public static void StartTime(float time, bool preventStyle = false) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (!isInForbiddenScene) { Instance.timeStarter = Instance.CStartTime(time, preventStyle); ((MonoBehaviour)Instance).StartCoroutine(Instance.timeStarter); Instance.timeSinceLastTimestop = TimeSince.op_Implicit(0f); TimeStop = false; } } private void HandleHitstop() { //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown if ((float)AccessTools.Field(typeof(TimeController), "currentStop").GetValue(MonoSingleton<TimeController>.Instance) <= 0f) { if (!(playerTimeScale <= 0f)) { return; } playerTimeScale = 1f; Time.timeScale = 0f; TimeController instance = MonoSingleton<TimeController>.Instance; if ((Object)(object)instance != (Object)null) { instance.timeScaleModifier = 1f; } object? value = AccessTools.Field(typeof(TimeController), "parryFlash").GetValue(MonoSingleton<TimeController>.Instance); object? obj = ((value is GameObject) ? value : null); if (obj != null) { ((GameObject)obj).SetActive(false); } { foreach (Transform item in ((Component)Player.transform.Find("Main Camera/New Game Object")).transform) { Transform val = item; Object.Destroy((Object)(object)((Component)val).gameObject); } return; } } frameLaterer = true; playerTimeScale = 0f; Time.timeScale = 0f; } private void HandleMenuPause() { if (Object.op_Implicit((Object)(object)MonoSingleton<OptionsManager>.Instance) && MonoSingleton<OptionsManager>.Instance.paused) { playerTimeScale = 0f; } else if (menuOpenLastFrame != MonoSingleton<OptionsManager>.Instance?.paused) { playerTimeScale = 1f; } if (Object.op_Implicit((Object)(object)MonoSingleton<OptionsManager>.Instance)) { menuOpenLastFrame = MonoSingleton<OptionsManager>.Instance.paused; } } public void FakeFixedUpdate() { if (TimeStop && Object.op_Implicit((Object)(object)MonoSingleton<OptionsManager>.Instance) && !MonoSingleton<OptionsManager>.Instance.paused) { Time.timeScale = realTimeScale; FixedUpdateCaller.CallAllFixedUpdates(); if (playerDeltaTime > 0f) { Physics.Simulate(Mathf.Max(Time.fixedDeltaTime * (1f - realTimeScale), 0f)); } } } public Vector3 GetPlayerVelocity(bool trueVelocity = false) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)MonoSingleton<NewMovement>.Instance)) { return Vector3.zero; } Vector3 val = MonoSingleton<NewMovement>.Instance.rb.velocity; if (!trueVelocity && MonoSingleton<NewMovement>.Instance.boost && !MonoSingleton<NewMovement>.Instance.sliding) { val /= 3f; } if (Object.op_Implicit((Object)(object)MonoSingleton<NewMovement>.Instance.ridingRocket)) { val += MonoSingleton<NewMovement>.Instance.ridingRocket.rb.velocity; } if (Object.op_Implicit((Object)(object)MonoSingleton<PlayerMovementParenting>.Instance)) { Vector3 val2 = MonoSingleton<PlayerMovementParenting>.Instance.currentDelta * 60f; val += val2; } return val; } private void Update() { //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) if (TimeStop) { HandleHitstop(); HandleMenuPause(); time += playerDeltaTime; if (time > Time.maximumDeltaTime) { time = Time.maximumDeltaTime; } UnscaleTimeSince = true; fixedCall = true; while (time >= Time.fixedDeltaTime) { time -= Time.fixedDeltaTime; FakeFixedUpdate(); } fixedCall = false; } InvokeCaller.Update(); if (isInForbiddenScene) { return; } if (TimeStop) { if (!Object.op_Implicit((Object)(object)Dummy)) { Dummy = new GameObject("Player Dummy"); Rigidbody val = Dummy.AddComponent<Rigidbody>(); val.isKinematic = true; GameObject val2 = new GameObject("Head"); val2.transform.parent = Dummy.transform; val2.transform.localPosition = ((Component)Player.transform.Find("Main Camera").Find("New Game Object")).transform.localPosition; val2.transform.localRotation = ((Component)Player.transform.Find("Main Camera").Find("New Game Object")).transform.localRotation; Dummy.transform.position = Player.transform.Find("New Game Object").position; Dummy.transform.rotation = Player.transform.Find("New Game Object").rotation; } typeof(PlayerTracker).GetField("target", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(MonoSingleton<PlayerTracker>.Instance, Dummy.transform); typeof(PlayerTracker).GetField("player", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(MonoSingleton<PlayerTracker>.Instance, Dummy.transform.GetChild(0)); typeof(PlayerTracker).GetField("playerRb", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(MonoSingleton<PlayerTracker>.Instance, Dummy.GetComponent<Rigidbody>()); } else if (Object.op_Implicit((Object)(object)Dummy) && TimeSince.op_Implicit(timeSinceLastTimestop) > 1f) { if (Vector3.Distance(Dummy.transform.position, Player.transform.position) > 1f) { Transform transform = Dummy.transform; transform.position -= Vector3.Normalize(Dummy.transform.position - Player.transform.position) * (200f * playerDeltaTime); return; } typeof(PlayerTracker).GetField("target", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(MonoSingleton<PlayerTracker>.Instance, Player.transform.Find("Main Camera").Find("New Game Object")); typeof(PlayerTracker).GetField("player", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(MonoSingleton<PlayerTracker>.Instance, ((Component)Player.transform.Find("New Game Object")).transform); typeof(PlayerTracker).GetField("playerRb", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(MonoSingleton<PlayerTracker>.Instance, Player.GetComponent<Rigidbody>()); Object.DestroyImmediate((Object)(object)((Component)Dummy.transform.GetChild(0)).gameObject); Object.DestroyImmediate((Object)(object)Dummy); Dummy = null; } } private void LateUpdate() { if (Object.op_Implicit((Object)(object)Player) && !isInForbiddenScene && cybergrind && Object.op_Implicit((Object)(object)MonoSingleton<EndlessGrid>.Instance) && cybergrindWave != MonoSingleton<EndlessGrid>.Instance.currentWave) { Playerstopper.Instance.timeArm.GetComponent<TimeArm>().timeLeft = TimestopperProgress.MaxTime; cybergrindWave = MonoSingleton<EndlessGrid>.Instance.currentWave; } } } public class TimeArm : MonoBehaviour { public static TimeArm Instance; public float timeLeft = TimestopperProgress.MaxTime; public AudioSource armAudio; public NewMovement movement; public Animator animator; public bool localTimeStopTracker; private HashSet<Transform> latestObjects = new HashSet<Transform>(); private bool oldPause; public void Equip(