using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Threading; using System.Threading.Tasks; using BepInEx; using Configgy; using DoomahLevelLoader.UnityComponents; using HarmonyLib; using HatefulScripts; using Logic; using LustForGrey.Hate_Buttons; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using TMPro; using UnityEngine; using UnityEngine.AI; using UnityEngine.AddressableAssets; using UnityEngine.AddressableAssets.ResourceLocators; using UnityEngine.Audio; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.ResourceManagement.ResourceLocations; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] public static class AssetBundleLoader { public static void LoadSceneFromAssetBundle(string assetBundlePath, string sceneName) { AssetBundle assetBundle = AssetBundle.LoadFromFile(assetBundlePath); if ((Object)(object)assetBundle == (Object)null) { Debug.LogError((object)("Failed to load AssetBundle from path: " + assetBundlePath)); } else if (assetBundle.isStreamedSceneAssetBundle) { string scenePath = GetScenePath(assetBundle.GetAllScenePaths(), sceneName); if (!string.IsNullOrEmpty(scenePath)) { SceneManager.LoadSceneAsync(Path.GetFileNameWithoutExtension(scenePath)).completed += delegate { Debug.Log((object)"Scene loaded successfully."); assetBundle.Unload(false); }; } else { Debug.LogError((object)"Scene not found in AssetBundle."); assetBundle.Unload(false); } } else { Debug.LogError((object)"AssetBundle does not contain scenes."); assetBundle.Unload(false); } } private static string GetScenePath(string[] scenePaths, string sceneName) { foreach (string text in scenePaths) { if (Path.GetFileNameWithoutExtension(text) == sceneName) { return text; } } return null; } } public class AssetBundleSceneLoader : MonoBehaviour { [SerializeField] private string assetBundlePath; [SerializeField] public string sceneNameToLoad; private AssetBundle loadedBundle; public Assembly why; public string resourceName = "hate"; public string bundlePath; public static bool doit; public static string ModPath() { return Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf(Path.DirectorySeparatorChar)); } private void Start() { why = Assembly.GetExecutingAssembly(); bundlePath = Path.Combine(ModPath(), resourceName); loadedBundle = AssetBundle.LoadFromFile(bundlePath); } private void OnTriggerEnter(Collider other) { if (((Component)other).gameObject.CompareTag("Player")) { ((MonoBehaviour)this).StartCoroutine(LoadAssetBundleAndScene(resourceName, sceneNameToLoad)); doit = true; } } public IEnumerator LoadAssetBundleAndScene(string resourceName, string sceneName) { bundlePath = Path.Combine(ModPath(), resourceName); sceneNameToLoad = sceneName; yield return AssetBundle.LoadFromFileAsync(bundlePath); if ((Object)(object)loadedBundle == (Object)null) { Debug.LogError((object)("Failed to load AssetBundle from path: " + assetBundlePath)); yield break; } Debug.Log((object)"AssetBundle loaded successfully."); if (!loadedBundle.isStreamedSceneAssetBundle) { Debug.LogError((object)"The AssetBundle does not contain any scenes."); UnloadBundle(); yield break; } string[] allScenePaths = loadedBundle.GetAllScenePaths(); string text = null; string[] array = allScenePaths; foreach (string text2 in array) { if (text2.EndsWith(sceneNameToLoad + ".unity")) { text = text2; break; } } if (string.IsNullOrEmpty(text)) { Debug.LogError((object)("Scene " + sceneNameToLoad + " not found in the AssetBundle.")); UnloadBundle(); yield break; } AsyncOperation sceneLoadRequest = SceneManager.LoadSceneAsync(text, (LoadSceneMode)0); yield return sceneLoadRequest; doit = true; if (sceneLoadRequest.isDone) { Debug.Log((object)("Scene loaded successfully from AssetBundle: " + sceneNameToLoad)); } else { Debug.LogError((object)"Failed to load the scene from AssetBundle."); } } private void UnloadBundle() { if ((Object)(object)loadedBundle != (Object)null) { loadedBundle.Unload(false); loadedBundle = null; Debug.Log((object)"AssetBundle unloaded."); } } private void OnDestroy() { UnloadBundle(); } } public class CustomButton : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler { public Color normalColor = Color.white; public Color hoverColor = Color.gray; public Color clickColor = Color.red; private Image buttonImage; private event Action onClick; private void Start() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) buttonImage = ((Component)this).GetComponent(); ((Graphic)buttonImage).color = normalColor; } public void AddOnClickListener(Action listener) { onClick += listener; } public void RemoveOnClickListener(Action listener) { onClick -= listener; } public void OnPointerEnter(PointerEventData eventData) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ((Graphic)buttonImage).color = hoverColor; } public void OnPointerExit(PointerEventData eventData) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ((Graphic)buttonImage).color = normalColor; } public void OnPointerDown(PointerEventData eventData) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ((Graphic)buttonImage).color = clickColor; } public void OnPointerUp(PointerEventData eventData) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ((Graphic)buttonImage).color = hoverColor; InvokeOnClick(); } private void InvokeOnClick() { this.onClick?.Invoke(); } private void Update() { //IL_000d: 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) RaycastHit val = default(RaycastHit); if (Input.GetMouseButtonDown(0) && Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), ref val) && (Object)(object)((RaycastHit)(ref val)).collider == (Object)(object)((Component)this).GetComponent()) { InvokeOnClick(); } } } public class DisableGameObject : MonoBehaviour { public void DISABLEIT() { string text = "Outdoors/OOB Minefield/Plane(Clone)"; GameObject val = GameObject.Find(text); if ((Object)(object)val != (Object)null) { val.gameObject.SetActive(false); Debug.Log((object)("GameObject found and disabled: " + ((Object)val).name)); } else { Debug.LogWarning((object)("GameObject not found at path: " + text)); } } } public class ParticleRenderingRange : MonoBehaviour { public float maxRenderDistance = 50f; private ParticleSystem ps; private Transform cameraTransform; private bool isCheckingDistance; private void Start() { ps = ((Component)this).GetComponent(); cameraTransform = ((Component)Camera.main).transform; isCheckingDistance = false; CheckDistanceAsync(); } private async void CheckDistanceAsync() { isCheckingDistance = true; while (isCheckingDistance) { await Task.Delay(100); if (Vector3.Distance(((Component)this).transform.position, cameraTransform.position) <= maxRenderDistance) { EnableParticles(); } else { DisableParticles(); } } } private void EnableParticles() { //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) EmissionModule emission = ps.emission; ((EmissionModule)(ref emission)).enabled = true; if (!ps.isPlaying) { ps.Play(); } } private void DisableParticles() { //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) EmissionModule emission = ps.emission; ((EmissionModule)(ref emission)).enabled = false; if (ps.isPlaying) { ps.Stop(true, (ParticleSystemStopBehavior)1); } } private void OnDestroy() { isCheckingDistance = false; } private void OnDrawGizmosSelected() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) Gizmos.color = Color.green; Gizmos.DrawWireSphere(((Component)this).transform.position, maxRenderDistance); } } public class EnableOnTrigger : MonoBehaviour { public Transform trigger; private void Start() { ((Component)this).gameObject.SetActive(false); } private void Update() { if ((Object)(object)trigger != (Object)null && ((Component)trigger).gameObject.activeSelf) { ((Component)this).gameObject.SetActive(true); } } } public class EoTM : MonoBehaviour { public GameObject targetObject; public Transform trigger; private void Update() { } } public class GameManager : MonoBehaviour { public string sceneName; private AssetBundle loadedBundle; public Assembly why; public string resourceName = "hate1scene"; public string bundlePath; public static string ModPath() { return Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf(Path.DirectorySeparatorChar)); } private void Start() { why = Assembly.GetExecutingAssembly(); bundlePath = Path.Combine(ModPath(), resourceName); } private void OnTriggerEnter(Collider other) { if (((Component)other).gameObject.CompareTag("Player")) { AssetBundleLoader.LoadSceneFromAssetBundle(bundlePath, sceneName); } } } public class HABundle : MonoBehaviour { public string publicModPath; public string publicSceneName; private Plugin pluginInstance; public string ModPath() { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); } private void Awake() { pluginInstance = Plugin.Instance; if ((Object)(object)pluginInstance == (Object)null) { Debug.LogError((object)"Plugin instance is null. Ensure the Plugin is properly loaded by BepInEx."); } } private void OnEnable() { SceneManager.sceneUnloaded += OnSceneUnloaded; } private void OnDisable() { SceneManager.sceneUnloaded -= OnSceneUnloaded; } private void OnSceneUnloaded(Scene scene) { UnloadAllBundles(); } public IEnumerator LoadAssetBundleAndScene(string resourceName, string sceneNameToLoad) { if (string.IsNullOrEmpty(resourceName) || string.IsNullOrEmpty(sceneNameToLoad)) { Debug.LogError((object)"Invalid resource or scene name provided."); yield break; } string bundlePath = Path.Combine(ModPath(), resourceName); if (pluginInstance.loadedBundlesList.Any((AssetBundle bundle) => (Object)(object)bundle != (Object)null && ((Object)bundle).name == resourceName)) { Debug.LogError((object)("AssetBundle '" + resourceName + "' is already loaded.")); yield break; } Debug.Log((object)("Attempting to load AssetBundle: " + bundlePath)); AssetBundleCreateRequest bundleRequest = AssetBundle.LoadFromFileAsync(bundlePath); yield return bundleRequest; AssetBundle assetBundle = bundleRequest.assetBundle; if ((Object)(object)assetBundle == (Object)null) { Debug.LogError((object)("Failed to load AssetBundle from path: " + bundlePath)); yield break; } Debug.Log((object)"AssetBundle loaded successfully."); AddBundleToGlobalList(assetBundle); if (!assetBundle.isStreamedSceneAssetBundle) { Debug.LogError((object)"The AssetBundle does not contain any scenes."); yield break; } string[] allScenePaths = assetBundle.GetAllScenePaths(); string scenePathToLoad = Array.Find(allScenePaths, (string path) => path.EndsWith(sceneNameToLoad + ".unity", StringComparison.OrdinalIgnoreCase)); if (string.IsNullOrEmpty(scenePathToLoad)) { Debug.LogError((object)("Scene '" + sceneNameToLoad + "' not found in AssetBundle.")); yield break; } Scene activeScene = SceneManager.GetActiveScene(); string currentSceneName = ((Scene)(ref activeScene)).name; if (allScenePaths.Any((string path) => path.EndsWith(currentSceneName + ".unity"))) { yield return SceneManager.UnloadSceneAsync(currentSceneName); Debug.Log((object)("Unloaded current scene: " + currentSceneName)); } AsyncOperation sceneLoadRequest = SceneManager.LoadSceneAsync(scenePathToLoad, (LoadSceneMode)0); yield return sceneLoadRequest; if (sceneLoadRequest.isDone) { Debug.Log((object)("Scene '" + sceneNameToLoad + "' loaded successfully.")); ReloadCurrentScene(); } else { Debug.LogError((object)("Failed to load scene '" + sceneNameToLoad + "' from AssetBundle.")); } } private void AddBundleToGlobalList(AssetBundle bundle) { if ((Object)(object)pluginInstance != (Object)null) { for (int i = 0; i < pluginInstance.loadedBundlesList.Length; i++) { if ((Object)(object)pluginInstance.loadedBundlesList[i] == (Object)null) { pluginInstance.loadedBundlesList[i] = bundle; Debug.Log((object)$"Added AssetBundle '{((Object)bundle).name}' to global list at index {i}."); return; } } Debug.LogWarning((object)"Global loaded bundles list is full; unable to add the AssetBundle."); } else { Debug.LogError((object)"Plugin instance not found."); } } public void UnloadAllBundles() { if (!((Object)(object)pluginInstance != (Object)null)) { return; } for (int i = 0; i < pluginInstance.loadedBundlesList.Length; i++) { AssetBundle val = pluginInstance.loadedBundlesList[i]; if ((Object)(object)val != (Object)null) { val.Unload(true); pluginInstance.loadedBundlesList[i] = null; Debug.Log((object)$"Unloaded AssetBundle at index {i}: {((Object)val).name}"); } } Debug.Log((object)"All AssetBundles unloaded."); } public AsyncOperation ReloadCurrentScene() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; Debug.Log((object)("Reloading current scene: " + name)); AsyncOperation obj = SceneManager.LoadSceneAsync(name); obj.completed += delegate { SceneHelper.DismissBlockers(); Plugin.Fixorsmth(); }; return obj; } } public class HatefulAbruptLevelChanger : MonoBehaviour { public bool loadingSplash; public bool saveMission; public string bundleName; public string levelname; [SerializeField] private AssetReference finalRoomPit; [SerializeField] private GameObject loadingBlocker; [SerializeField] private TMP_Text loadingBar; [SerializeField] private GameObject preloadingBadge; [SerializeField] private GameObject eventSystem; public string CurrentScene { get; private set; } public string LastScene { get; private set; } public string PendingScene { get; private set; } public void AbruptChangeLevel() { if (saveMission) { MonoSingleton.Instance.previousMission = MonoSingleton.Instance.levelNumber; } LoadSceneAsync(levelname, bundleName); } public string SanitizeLevelPath(string scene) { if (scene.StartsWith("Assets/Scenes/")) { scene = scene.Substring("Assets/Scenes/".Length); } if (scene.EndsWith(".unity")) { scene = scene.Substring(0, scene.Length - ".unity".Length); } return scene; } public IEnumerator LoadSceneAsync(string sceneName, string assetBundlePath, bool noSplash = false) { if (PendingScene == null) { PendingScene = sceneName; sceneName = SanitizeLevelPath(sceneName); Debug.Log((object)("(LoadSceneAsync) Loading scene " + sceneName)); loadingBlocker.SetActive(!noSplash); yield return null; if (CurrentScene != sceneName) { LastScene = CurrentScene; } CurrentScene = sceneName; if ((Object)(object)MonoSingleton.Instance != (Object)null) { MonoSingleton.Instance.ReloadMapVars(); } AssetBundleLoader.LoadSceneFromAssetBundle(assetBundlePath, sceneName); if ((Object)(object)GameStateManager.Instance != (Object)null) { GameStateManager.Instance.currentCustomGame = null; } if ((Object)(object)preloadingBadge != (Object)null) { preloadingBadge.SetActive(false); } if ((Object)(object)loadingBlocker != (Object)null) { loadingBlocker.SetActive(false); } if ((Object)(object)loadingBar != (Object)null) { ((Component)loadingBar).gameObject.SetActive(false); } PendingScene = null; } } public void NormalChangeLevel() { LoadSceneAsync(levelname, bundleName); } public void GoToLevel(int missionNumber) { SceneHelper.LoadScene(GetMissionName.GetSceneName(missionNumber), false); } public void GoToSavedLevel() { PreviousMissionSaver instance = MonoSingleton.Instance; if ((Object)(object)instance != (Object)null) { _ = instance.previousMission; Object.Destroy((Object)(object)((Component)instance).gameObject); GoToLevel(instance.previousMission); } else { GoToLevel(GameProgressSaver.GetProgress(MonoSingleton.Instance.GetInt("difficulty", 0))); } } } public static class HatefulAssetBundleSceneLoader { public static string publicModPath; public static string publicSceneName; private static Dictionary loadedBundles = new Dictionary(); public static string ModPath() { return Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf(Path.DirectorySeparatorChar)); } public static IEnumerator LoadAssetBundleAndScene(string resourceName, string sceneNameToLoad) { string bundlePath = (publicModPath = Path.Combine(ModPath(), resourceName)); publicSceneName = sceneNameToLoad; AssetBundleCreateRequest bundleRequest = AssetBundle.LoadFromFileAsync(bundlePath); yield return bundleRequest; AssetBundle loadedBundle = bundleRequest.assetBundle; if ((Object)(object)loadedBundle == (Object)null) { Debug.LogError((object)("Failed to load AssetBundle from path: " + bundlePath)); yield break; } Debug.Log((object)"AssetBundle loaded successfully."); if (!loadedBundle.isStreamedSceneAssetBundle) { Debug.LogError((object)"The AssetBundle does not contain any scenes."); UnloadBundle(loadedBundle); yield break; } string[] allScenePaths = loadedBundle.GetAllScenePaths(); string text = null; string[] array = allScenePaths; foreach (string text2 in array) { if (text2.EndsWith(sceneNameToLoad + ".unity")) { text = text2; break; } } if (string.IsNullOrEmpty(text)) { Debug.LogError((object)("Scene " + sceneNameToLoad + " not found in the AssetBundle.")); UnloadBundle(loadedBundle); yield break; } AsyncOperation sceneLoadRequest = SceneManager.LoadSceneAsync(text, (LoadSceneMode)0); yield return sceneLoadRequest; if (sceneLoadRequest.isDone) { Debug.Log((object)("Scene loaded successfully from AssetBundle: " + sceneNameToLoad)); Plugin.Fixorsmth(); } else { Debug.LogError((object)"Failed to load the scene from AssetBundle."); } UnloadBundle(loadedBundle); } public static AsyncOperation ReloadCurrentScene() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); AsyncOperation obj = SceneManager.LoadSceneAsync(((Scene)(ref activeScene)).name); obj.completed += delegate { SceneHelper.DismissBlockers(); Plugin.Fixorsmth(); }; return obj; } public static void UnloadAssetBundle(string bundlePath) { if (loadedBundles.TryGetValue(bundlePath, out var value)) { value.Unload(true); loadedBundles.Remove(bundlePath); Debug.Log((object)("AssetBundle unloaded: " + bundlePath)); } } private static void UnloadBundle(AssetBundle bundle) { if ((Object)(object)bundle != (Object)null) { bundle.Unload(false); Debug.Log((object)"AssetBundle unloaded."); } } } public class HatefulController : MonoBehaviour { public string sceneNameToLoad; public string BundleName; private AssetBundle[] loadedBundles = (AssetBundle[])(object)new AssetBundle[3]; private int bundleIndex; private AssetBundle currentBundle; [SerializeField] private Button loadLevelButton; private void Start() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown if ((Object)(object)loadLevelButton != (Object)null) { ((UnityEvent)loadLevelButton.onClick).AddListener((UnityAction)delegate { LoadLevel(); }); } else { Debug.LogWarning((object)"LoadLevel button is not assigned in the inspector."); } SceneManager.sceneUnloaded += OnSceneUnloaded; } private void OnDestroy() { SceneManager.sceneUnloaded -= OnSceneUnloaded; } private void OnSceneUnloaded(Scene scene) { UnloadAllBundles(); } public string ModPath() { return Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf(Path.DirectorySeparatorChar)); } public void LoadLevel() { ((MonoBehaviour)this).StartCoroutine(LoadAssetBundleAndScene(BundleName, sceneNameToLoad)); } private IEnumerator LoadAssetBundleAndScene(string resourceName, string sceneNameToLoad) { string bundlePath = Path.Combine(ModPath(), resourceName); AssetBundle[] array = loadedBundles; foreach (AssetBundle val in array) { if ((Object)(object)val != (Object)null && ((Object)val).name == resourceName) { Debug.LogError((object)("AssetBundle '" + resourceName + "' is already loaded.")); yield break; } } if ((Object)(object)currentBundle != (Object)null) { currentBundle.Unload(true); Debug.Log((object)"Unloaded previous AssetBundle."); } AssetBundleCreateRequest bundleRequest = AssetBundle.LoadFromFileAsync(bundlePath); yield return bundleRequest; AssetBundle loadedBundle = bundleRequest.assetBundle; if ((Object)(object)loadedBundle == (Object)null) { Debug.LogError((object)("Failed to load AssetBundle from path: " + bundlePath)); yield break; } Debug.Log((object)"AssetBundle loaded successfully."); currentBundle = loadedBundle; loadedBundles[bundleIndex] = loadedBundle; bundleIndex = (bundleIndex + 1) % loadedBundles.Length; AddBundleToGlobalList(loadedBundle); if (!loadedBundle.isStreamedSceneAssetBundle) { Debug.LogError((object)"The AssetBundle does not contain any scenes."); yield break; } Scene activeScene = SceneManager.GetActiveScene(); string currentSceneName = ((Scene)(ref activeScene)).name; if (loadedBundle.GetAllScenePaths().Any((string path) => path.EndsWith(currentSceneName + ".unity"))) { yield return SceneManager.UnloadSceneAsync(currentSceneName); Debug.Log((object)("Unloaded current scene: " + currentSceneName)); } string text = loadedBundle.GetAllScenePaths().FirstOrDefault((string path) => path.EndsWith(sceneNameToLoad + ".unity")); if (string.IsNullOrEmpty(text)) { Debug.LogError((object)("Scene " + sceneNameToLoad + " not found in the AssetBundle.")); yield break; } AsyncOperation sceneLoadRequest = SceneManager.LoadSceneAsync(text, (LoadSceneMode)0); yield return sceneLoadRequest; if (sceneLoadRequest.isDone) { Debug.Log((object)("Scene loaded successfully from AssetBundle: " + sceneNameToLoad)); Plugin.Fixorsmth(); } else { Debug.LogError((object)"Failed to load the scene from AssetBundle."); } } private void AddBundleToGlobalList(AssetBundle bundle) { Plugin instance = Plugin.Instance; if ((Object)(object)instance == (Object)null) { Debug.LogError((object)"Plugin instance not found."); return; } for (int i = 0; i < instance.loadedBundlesList.Length; i++) { if ((Object)(object)instance.loadedBundlesList[i] == (Object)null) { instance.loadedBundlesList[i] = bundle; Debug.Log((object)$"Added AssetBundle '{((Object)bundle).name}' to global list at index {i}."); return; } } Debug.LogWarning((object)"Global loaded bundles list is full; unable to add the AssetBundle."); } public void UnloadAllBundles() { for (int i = 0; i < loadedBundles.Length; i++) { if ((Object)(object)loadedBundles[i] != (Object)null) { loadedBundles[i].Unload(true); loadedBundles[i] = null; Debug.Log((object)("Unloaded AssetBundle at index " + i)); } } currentBundle = null; } } public class HatefulFinalPit : MonoBehaviour { private NewMovement nmov; private StatsManager sm; private Rigidbody rb; private bool rotationReady; private GameObject player; private bool infoSent; public bool rankless; public bool secondPit; public string targetLevelName; private int levelNumber; public bool musicFadeOut; private Quaternion targetRotation; public string bundlename; public string lvlname; public HatefulFinalRank hatefulFinalRank; public void LoadLevel(string bundlename, string lvlname) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) HABundle hABundle = new GameObject("HABundleObject").AddComponent(); Debug.Log((object)("Loading via HABundle: " + bundlename + ", Scene: " + lvlname)); ((MonoBehaviour)this).StartCoroutine(hABundle.LoadAssetBundleAndScene(bundlename, lvlname)); } private void Start() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) sm = MonoSingleton.Instance; player = ((Component)MonoSingleton.Instance).gameObject; Quaternion rotation = ((Component)this).transform.rotation; targetRotation = Quaternion.Euler(((Quaternion)(ref rotation)).eulerAngles + Vector3.up * 0.01f); hatefulFinalRank = new GameObject("HatefulFinalRank").AddComponent(); } private void OnTriggerEnter(Collider other) { //IL_007c: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject == (Object)(object)player) { NewMovement instance = MonoSingleton.Instance; if (instance != null && instance.hp > 0) { HatefulAssetBundleSceneLoader.publicModPath = Path.Combine(ShaderManager.ModPath(), bundlename); HatefulAssetBundleSceneLoader.publicSceneName = Path.Combine(ShaderManager.ModPath(), lvlname); if (musicFadeOut) { MonoSingleton.Instance.off = true; } GameStateManager.Instance.RegisterState(new GameState("pit-falling", ((Component)this).gameObject) { cursorLock = (LockMode)1, cameraInputLock = (LockMode)1 }); nmov = MonoSingleton.Instance; ((Component)nmov).gameObject.layer = 15; rb = nmov.rb; nmov.activated = false; ((Behaviour)nmov.cc).enabled = false; nmov.levelOver = true; sm.HideShit(); sm.StopTimer(); if (nmov.sliding) { nmov.StopSlide(); } rb.velocity = new Vector3(0f, rb.velocity.y, 0f); if (Object.op_Implicit((Object)(object)MonoSingleton.Instance)) { MonoSingleton.Instance.juice = 0f; } CrateCounter instance2 = MonoSingleton.Instance; if (instance2 != null) { instance2.SaveStuff(); } CrateCounter instance3 = MonoSingleton.Instance; if (instance3 != null) { instance3.CoinsToPoints(); } OutOfBounds[] array = Object.FindObjectsOfType(); for (int i = 0; i < array.Length; i++) { ((Component)array[i]).gameObject.SetActive(false); } DeathZone[] array2 = Object.FindObjectsOfType(); for (int i = 0; i < array2.Length; i++) { ((Component)array2[i]).gameObject.SetActive(false); } ((MonoBehaviour)this).Invoke("SendInfo", 5f); return; } } if (((Component)other).gameObject.CompareTag("Player")) { PlatformerMovement instance4 = MonoSingleton.Instance; if (instance4 != null && !instance4.dead) { MonoSingleton.Instance.ChangeToFPS(); } } } private void OnTriggerStay(Collider other) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)other).gameObject != (Object)(object)player) { return; } NewMovement instance = MonoSingleton.Instance; if (instance != null && instance.hp <= 0) { return; } if ((Object)(object)nmov == (Object)null) { nmov = ((Component)other).gameObject.GetComponent(); rb = nmov.rb; } if (((Component)other).transform.position.x != ((Component)this).transform.position.x || ((Component)other).transform.position.z != ((Component)this).transform.position.z) { Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(((Component)this).transform.position.x, ((Component)other).transform.position.y, ((Component)this).transform.position.z); float num = Vector3.Distance(((Component)other).transform.position, val); ((Component)other).transform.position = Vector3.MoveTowards(((Component)other).transform.position, val, 1f + num * Time.deltaTime); rb.velocity = new Vector3(0f, rb.velocity.y, 0f); } if (!rotationReady) { ((Component)nmov.cc).transform.rotation = Quaternion.RotateTowards(((Component)nmov.cc).transform.rotation, targetRotation, Time.fixedDeltaTime * 10f * (Quaternion.Angle(((Component)nmov.cc).transform.rotation, targetRotation) + 1f)); if (Quaternion.Angle(((Component)nmov.cc).transform.rotation, targetRotation) < 0.01f) { ((Component)nmov.cc).transform.rotation = targetRotation; rotationReady = true; } } if (rotationReady && !infoSent) { SendInfo(); } } private void SendInfo() { //IL_00b1: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)this).CancelInvoke(); if (infoSent) { return; } infoSent = true; if (!rankless) { FinalRank fr = sm.fr; if (!sm.infoSent) { levelNumber = MonoSingleton.Instance.levelNumber; if (SceneHelper.IsPlayingCustom) { GameProgressSaver.SaveProgress(SceneHelper.CurrentLevelNumber); } else if (levelNumber >= 420) { GameProgressSaver.SaveProgress(0); } else { GameProgressSaver.SaveProgress(levelNumber + 1); } hatefulFinalRank.targetLevelName = targetLevelName; LoadLevel(bundlename, lvlname); } if (secondPit) { fr.finalPitPos = ((Component)this).transform.position; fr.reachedSecondPit = true; hatefulFinalRank.finalPitPos = ((Component)this).transform.position; hatefulFinalRank.reachedSecondPit = true; LoadLevel(bundlename, lvlname); } if (!sm.infoSent) { sm.SendInfo(); } } else if (secondPit) { GameProgressSaver.SetTutorial(true); LoadLevel(bundlename, lvlname); } } } public class HatefulFinalRank : MonoBehaviour { public bool casual; public bool dontSavePos; public bool reachedSecondPit; public TMP_Text time; private float savedTime; public TMP_Text timeRank; private bool countTime; private int minutes; private float seconds; private float checkedSeconds; public TMP_Text kills; private int savedKills; public TMP_Text killsRank; private bool countKills; private float checkedKills; public TMP_Text style; private int savedStyle; public TMP_Text styleRank; private bool countStyle; private float checkedStyle; public TMP_Text extraInfo; public TMP_Text totalRank; public TMP_Text secrets; public Image[] secretsInfo; private int secretsFound; public GameObject[] levelSecrets; private int checkedSecrets; private int secretsCheckProgress; private int allSecrets; public List prevSecrets; public Image[] challenges; public GameObject[] toAppear; private int i; private bool flashFade; private Image flashPanel; private Color flashColor; private float flashMultiplier = 1f; private Vector3 maxPos; private Vector3 startingPos; private Vector3 goalPos; public bool complete; public GameObject playerPosInfo; public Vector3 finalPitPos; private AsyncOperation asyncLoad; private string oldBundle; private bool rankless; public GameObject ppiObject; public string targetLevelName; public TMP_Text pointsText; public int totalPoints; private bool loadAndActivateScene; public bool dependenciesLoaded; private bool sceneBundleLoaded; private bool skipping; private float timeBetween = 0.25f; private bool noRestarts; private bool noDamage; private bool majorAssists; public string gbundlename; public string glvlname; private void Start() { Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); } public void LoadLevel(string bundlename, string lvlname) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) HABundle hABundle = new GameObject("HABundleObject").AddComponent(); Debug.Log((object)("Loading via HABundle: " + bundlename + ", Scene: " + lvlname)); ((MonoBehaviour)this).StartCoroutine(hABundle.LoadAssetBundleAndScene(bundlename, lvlname)); } private void Update() { //IL_055d: Unknown result type (might be due to invalid IL or missing references) if (countTime) { if ((Object)(object)time == (Object)null) { Debug.LogError((object)"Time component is null!"); return; } if (savedTime >= checkedSeconds) { if (savedTime > checkedSeconds) { float num = savedTime - checkedSeconds; checkedSeconds += Time.deltaTime * 20f + Time.deltaTime * num * 1.5f; seconds += Time.deltaTime * 20f + Time.deltaTime * num * 1.5f; } if (checkedSeconds >= savedTime || skipping) { checkedSeconds = savedTime; seconds = savedTime; minutes = 0; while (seconds >= 60f) { seconds -= 60f; minutes++; } countTime = false; if ((Object)(object)((Component)time).GetComponent() != (Object)null) { ((Component)time).GetComponent().Stop(); } else { Debug.LogError((object)"AudioSource on time is null!"); } ((MonoBehaviour)this).Invoke("Appear", timeBetween * 2f); } if (seconds >= 60f) { seconds -= 60f; minutes++; } time.text = minutes + ":" + seconds.ToString("00.000"); } } else if (countKills) { if ((Object)(object)kills == (Object)null) { Debug.LogError((object)"Kills component is null!"); return; } if ((float)savedKills >= checkedKills) { if ((float)savedKills > checkedKills) { checkedKills += Time.deltaTime * 45f; } if (checkedKills >= (float)savedKills || skipping) { checkedKills = savedKills; countKills = false; if ((Object)(object)((Component)kills).GetComponent() != (Object)null) { ((Component)kills).GetComponent().Stop(); } else { Debug.LogError((object)"AudioSource on kills is null!"); } ((MonoBehaviour)this).Invoke("Appear", timeBetween * 2f); } kills.text = checkedKills.ToString("0"); } } else if (countStyle && (float)savedStyle >= checkedStyle) { if ((Object)(object)style == (Object)null) { Debug.LogError((object)"Style component is null!"); return; } _ = checkedStyle; if ((float)savedStyle > checkedStyle) { checkedStyle += Time.deltaTime * 4500f; } if (checkedStyle >= (float)savedStyle || skipping) { checkedStyle = savedStyle; countStyle = false; if ((Object)(object)((Component)style).GetComponent() != (Object)null) { ((Component)style).GetComponent().Stop(); } else { Debug.LogError((object)"AudioSource on style is null!"); } ((MonoBehaviour)this).Invoke("Appear", timeBetween * 2f); totalPoints += savedStyle; PointsShow(); } else { int num2 = totalPoints + Mathf.RoundToInt(checkedStyle); int num3 = 0; while (num2 >= 1000) { num3++; num2 -= 1000; } if (num3 > 0) { if ((Object)(object)pointsText == (Object)null) { Debug.LogError((object)"pointsText component is null!"); return; } if (num2 < 10) { pointsText.text = "+" + num3 + ",00" + num2 + "P"; } else if (num2 < 100) { pointsText.text = "+" + num3 + ",0" + num2 + "P"; } else { pointsText.text = "+" + num3 + "," + num2 + "P"; } } else { pointsText.text = "+" + num2 + "P"; } } LoadLevel(HatefulAssetBundleSceneLoader.publicModPath, HatefulAssetBundleSceneLoader.publicSceneName); } if (flashFade) { if ((Object)(object)flashPanel == (Object)null) { Debug.LogError((object)"flashPanel component is null!"); return; } flashColor.a -= Time.deltaTime * flashMultiplier; ((Graphic)flashPanel).color = flashColor; if (flashColor.a <= 0f) { flashFade = false; } } InputManager instance = MonoSingleton.Instance; if ((Object)(object)instance == (Object)null) { Debug.LogError((object)"InputManager instance is null!"); } else if (!instance.PerformingCheatMenuCombo() && instance.InputSource.Fire1.WasPerformedThisFrame && complete && Time.timeScale != 0f && reachedSecondPit) { LevelChange(); } else if (!instance.PerformingCheatMenuCombo() && instance.InputSource.Fire1.WasPerformedThisFrame && !complete && Time.timeScale != 0f) { skipping = true; timeBetween = 0.01f; } else if (rankless && asyncLoad != null && asyncLoad.progress >= 0.9f) { LevelChange(); } } public void SetTime(float seconds, string rank) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) savedTime = seconds; timeRank.text = rank; SceneManager.GetSceneByName(targetLevelName); } public void SetKills(int killAmount, string rank) { savedKills = killAmount; killsRank.text = rank; } public void SetStyle(int styleAmount, string rank) { savedStyle = styleAmount; styleRank.text = rank; } public void SetInfo(int restarts, bool damage, bool majorUsed, bool cheatsUsed) { extraInfo.text = ""; int num = 1; if (!damage) { num++; } if (majorUsed) { num++; } if (cheatsUsed) { num++; } if (cheatsUsed) { TMP_Text obj = extraInfo; obj.text += "- CHEATS USED\n"; } if (majorUsed) { if (!MonoSingleton.Instance.hidePopup) { TMP_Text obj2 = extraInfo; obj2.text += "- MAJOR ASSISTS USED\n"; } majorAssists = true; } if (restarts == 0) { if (num >= 3) { TMP_Text obj3 = extraInfo; obj3.text += "+ NO RESTARTS\n"; } else { TMP_Text obj4 = extraInfo; obj4.text += "+ NO RESTARTS\n (+500P)\n"; } noRestarts = true; } else { TMP_Text obj5 = extraInfo; obj5.text = obj5.text + "- " + restarts + " RESTARTS\n"; } if (!damage) { if (num >= 3) { TMP_Text obj6 = extraInfo; obj6.text += "+ NO DAMAGE\n"; } else { TMP_Text obj7 = extraInfo; obj7.text += "+ NO DAMAGE\n (+5,000P)\n"; } noDamage = true; } } public void SetRank(string rank) { totalRank.text = rank; } public void SetSecrets(int secretsAmount, int maxSecrets) { secrets.text = 0 + " / " + maxSecrets; allSecrets = maxSecrets; secretsFound = secretsAmount; } public void Appear() { //IL_02c0: Unknown result type (might be due to invalid IL or missing references) if (i < toAppear.Length) { if (!casual) { if (skipping) { HudOpenEffect component = toAppear[i].GetComponent(); if ((Object)(object)component != (Object)null) { component.skip = true; } } if ((Object)(object)toAppear[i] == (Object)(object)((Component)time).gameObject) { if (skipping) { checkedSeconds = savedTime; seconds = savedTime; minutes = 0; while (seconds >= 60f) { seconds -= 60f; minutes++; } ((Component)time).GetComponent().playOnAwake = false; ((MonoBehaviour)this).Invoke("Appear", timeBetween * 2f); time.text = minutes + ":" + seconds.ToString("00.000"); } else { countTime = true; } } else if ((Object)(object)toAppear[i] == (Object)(object)((Component)kills).gameObject) { if (skipping) { checkedKills = savedKills; ((Component)kills).GetComponent().playOnAwake = false; ((MonoBehaviour)this).Invoke("Appear", timeBetween * 2f); kills.text = checkedKills.ToString("0"); } else { countKills = true; } } else if ((Object)(object)toAppear[i] == (Object)(object)((Component)style).gameObject) { if (skipping) { checkedStyle = savedStyle; style.text = checkedStyle.ToString("0"); ((Component)style).GetComponent().playOnAwake = false; ((MonoBehaviour)this).Invoke("Appear", timeBetween * 2f); totalPoints += savedStyle; PointsShow(); } else { countStyle = true; } } else if ((Object)(object)toAppear[i] == (Object)(object)((Component)secrets).gameObject) { if (prevSecrets.Count > 0) { foreach (int prevSecret in prevSecrets) { ((Graphic)secretsInfo[prevSecret]).color = new Color(0.5f, 0.5f, 0.5f); checkedSecrets++; secrets.text = checkedSecrets + " / " + levelSecrets.Length; } } toAppear[i].gameObject.SetActive(true); ((MonoBehaviour)this).Invoke("CountSecrets", timeBetween); } else if ((Object)(object)toAppear[i] == (Object)(object)((Component)timeRank).gameObject || (Object)(object)toAppear[i] == (Object)(object)((Component)killsRank).gameObject || (Object)(object)toAppear[i] == (Object)(object)((Component)styleRank).gameObject) { switch (toAppear[i].GetComponent().text) { case "S": AddPoints(2500); break; case "A": AddPoints(2000); break; case "B": AddPoints(1500); break; case "C": AddPoints(1000); break; case "D": AddPoints(500); break; } LoadLevel(HatefulAssetBundleSceneLoader.publicModPath, HatefulAssetBundleSceneLoader.publicSceneName); FlashPanel(((Component)toAppear[i].transform.parent.GetChild(1)).gameObject); ((MonoBehaviour)this).Invoke("Appear", timeBetween * 2f); if (skipping) { toAppear[i].GetComponentInChildren().playOnAwake = false; } } else if ((Object)(object)toAppear[i] == (Object)(object)((Component)totalRank).gameObject) { FlashPanel(((Component)toAppear[i].transform.parent.GetChild(1)).gameObject); flashMultiplier = 0.5f; ((MonoBehaviour)this).Invoke("Appear", timeBetween * 4f); } else if ((Object)(object)toAppear[i] == (Object)(object)((Component)extraInfo).gameObject) { if (noRestarts) { AddPoints(500); } if (noDamage) { AddPoints(5000); } ((MonoBehaviour)this).Invoke("Appear", timeBetween); } else { ((MonoBehaviour)this).Invoke("Appear", timeBetween); } } else { ((MonoBehaviour)this).Invoke("Appear", timeBetween); } toAppear[i].gameObject.SetActive(true); i++; if (!toAppear[0].gameObject.activeSelf) { toAppear[0].gameObject.SetActive(true); } if (i >= toAppear.Length && !complete) { complete = true; GameProgressSaver.AddMoney(totalPoints); LoadLevel(HatefulAssetBundleSceneLoader.publicModPath, HatefulAssetBundleSceneLoader.publicSceneName); } } else if (!complete) { complete = true; GameProgressSaver.AddMoney(totalPoints); } LoadLevel(HatefulAssetBundleSceneLoader.publicModPath, HatefulAssetBundleSceneLoader.publicSceneName); } public void FlashPanel(GameObject panel) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (flashFade) { flashColor.a = 0f; ((Graphic)flashPanel).color = flashColor; } flashPanel = panel.GetComponent(); flashColor = ((Graphic)flashPanel).color; flashColor.a = 1f; ((Graphic)flashPanel).color = flashColor; flashFade = true; LoadLevel(HatefulAssetBundleSceneLoader.publicModPath, HatefulAssetBundleSceneLoader.publicSceneName); } private void CountSecrets() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) if (levelSecrets.Length != 0) { if ((Object)(object)levelSecrets[secretsCheckProgress] == (Object)null && !prevSecrets.Contains(secretsCheckProgress)) { checkedSecrets++; secrets.text = checkedSecrets + " / " + levelSecrets.Length; ((Component)secrets).GetComponent().Play(); ((Graphic)secretsInfo[secretsCheckProgress]).color = Color.white; secretsCheckProgress++; AddPoints(1000); if (secretsCheckProgress < levelSecrets.Length) { ((MonoBehaviour)this).Invoke("CountSecrets", timeBetween); } else { ((MonoBehaviour)this).Invoke("Appear", timeBetween); } } else if (secretsCheckProgress < levelSecrets.Length - 1) { secretsCheckProgress++; CountSecrets(); } else { secretsCheckProgress++; ((MonoBehaviour)this).Invoke("Appear", timeBetween); } } else { ((MonoBehaviour)this).Invoke("Appear", timeBetween); } } public void NotRanklessNextLevel(string bundlename, string lvlname) { if (lvlname != "") { LoadLevel(bundlename, lvlname); } } public void LevelChange(bool force = false) { //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) if (SceneHelper.IsPlayingCustom) { if (force) { MonoSingleton.Instance.QuitMission(); } else if (Object.op_Implicit((Object)(object)MonoSingleton.Instance) && MonoSingleton.Instance.hasAuthorLinks) { ((Component)this).gameObject.SetActive(false); MonoSingleton.Instance.Show(); } else if (GameStateManager.Instance.currentCustomGame != null && GameStateManager.Instance.currentCustomGame.workshopId.HasValue) { ((Behaviour)MonoSingleton.Instance).enabled = true; ((Component)this).gameObject.SetActive(false); } else { MonoSingleton.Instance.QuitMission(); } if (Plugin.IsCustomLevel) { LoadLevel(HatefulAssetBundleSceneLoader.publicModPath, HatefulAssetBundleSceneLoader.publicSceneName); } LoadLevel(HatefulAssetBundleSceneLoader.publicModPath, HatefulAssetBundleSceneLoader.publicSceneName); } if ((Object)(object)playerPosInfo != (Object)null) { if ((Object)(object)ppiObject == (Object)null) { ppiObject = Object.Instantiate(playerPosInfo); } PlayerPosInfo component = ppiObject.GetComponent(); Rigidbody component2 = ((Component)MonoSingleton.Instance).gameObject.GetComponent(); component.velocity = component2.velocity; component.position = ((Component)component2).transform.position - finalPitPos; component.position = new Vector3(component.position.x, component.position.y, component.position.z - 990f); component.wooshTime = ((Component)((Component)component2).GetComponentInChildren()).GetComponent().time; if (dontSavePos || targetLevelName == "Main Menu") { component.noPosition = true; } } ((Component)this).gameObject.SetActive(false); LoadLevel(gbundlename, glvlname); } public void AddPoints(int points) { totalPoints += points; PointsShow(); } private void PointsShow() { LoadLevel(HatefulAssetBundleSceneLoader.publicModPath, HatefulAssetBundleSceneLoader.publicSceneName); int num = totalPoints; int num2 = 0; while (num >= 1000) { num2++; num -= 1000; } if (num2 > 0) { if (num < 10) { pointsText.text = "+" + num2 + ",00" + num + "P"; } else if (num < 100) { pointsText.text = "+" + num2 + ",0" + num + "P"; } else { pointsText.text = "+" + num2 + "," + num + "P"; } } else { pointsText.text = "+" + num + "P"; } } } public class HatefulLevelSelectPanel : MonoBehaviour { public float collapsedHeight = 260f; public float expandedHeight = 400f; public GameObject leaderboardPanel; private RectTransform rectTransform; public int levelNumber; public int levelNumberInLayer; private bool allSecrets; public Sprite lockedSprite; public Sprite unlockedSprite; private Sprite origSprite; public Image[] secretIcons; public Image challengeIcon; private int tempInt; private string origName; private GameObject challengeChecker; public bool forceOff; public void CheckScore() { //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_0835: Unknown result type (might be due to invalid IL or missing references) //IL_071d: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0354: 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) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_07eb: Unknown result type (might be due to invalid IL or missing references) //IL_07c6: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) rectTransform = ((Component)this).GetComponent(); if ((Object)(object)origSprite == (Object)null) { origSprite = ((Component)((Component)this).transform.Find("Image")).GetComponent().sprite; } if (levelNumber == 666) { tempInt = GameProgressSaver.GetPrime(MonoSingleton.Instance.GetInt("difficulty", 0), levelNumberInLayer); } if (levelNumber >= 500 && levelNumber < 666) { tempInt = GameProgressSaver.GetPrime(MonoSingleton.Instance.GetInt("difficulty", 0), levelNumberInLayer); } else { tempInt = GameProgressSaver.GetProgress(MonoSingleton.Instance.GetInt("difficulty", 0)); } int num = levelNumber; if (levelNumber == 666) { num += levelNumberInLayer - 1; } if (levelNumber >= 500 && levelNumber < 666) { num += levelNumberInLayer - 1; } origName = GetMissionName.GetMission(num); if ((levelNumber == 666 && tempInt == 0) || (levelNumber != 666 && tempInt < levelNumber) || forceOff) { string text = "10"; ((Component)((Component)this).transform.Find("Name")).GetComponent().text = text + "-" + levelNumberInLayer + ": ???"; ((Component)((Component)this).transform.Find("Image")).GetComponent().sprite = lockedSprite; ((Behaviour)((Component)this).GetComponent