Decompiled source of AngryLevelLoader v3.1.1
plugins/AngryLevelLoader/AngryLevelLoader.dll
Decompiled 3 days 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.IO; using System.IO.Compression; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using AngryLevelLoader; using AngryLevelLoader.Containers; using AngryLevelLoader.DataTypes; using AngryLevelLoader.DataTypes.MapVarHandlers; using AngryLevelLoader.Extensions; using AngryLevelLoader.Fields; using AngryLevelLoader.Managers; using AngryLevelLoader.Managers.BannedMods; using AngryLevelLoader.Managers.LegacyPatches; using AngryLevelLoader.Managers.ServerManager; using AngryLevelLoader.Notifications; using AngryLevelLoader.Patches; using AngryUiComponents; using Atlas.Modules.Guns; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using FasterPunch; using HarmonyLib; using Logic; using LucasMeshCombine; using Microsoft.CodeAnalysis; using MyCoolMod; using Newtonsoft.Json; using PluginConfig; using PluginConfig.API; using PluginConfig.API.Decorators; using PluginConfig.API.Fields; using PluginConfig.API.Functionals; using ProjectProphet; using RudeLevelScript; using RudeLevelScripts; using RudeLevelScripts.Essentials; using Steamworks; using Steamworks.Data; using TMPro; using ULTRAKILL.Portal; using UltraFunGuns; using UltraTweaker; using UltraTweaker.Tweaks; using UltraTweaker.Tweaks.Impl; using Ultrapain; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.AddressableAssets.ResourceLocators; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.ResourceManagement.ResourceProviders; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("AngryLevelLoader")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Loads level made with Rude level editor")] [assembly: AssemblyFileVersion("3.1.1.0")] [assembly: AssemblyInformationalVersion("3.1.1+faca0f1d013937dbdc29e540a3c592b3fd4eb2e0")] [assembly: AssemblyProduct("AngryLevelLoader")] [assembly: AssemblyTitle("AngryLevelLoader")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("3.1.1.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class CrossThreadInvoker : ISynchronizeInvoke { private class BackgroundUpdater : MonoBehaviour { public void Update() { ProcessQueue(); } } private class AsyncResult : IAsyncResult { public Delegate method; public object[] args; public ManualResetEvent manualResetEvent; public Thread invokingThread; public bool IsCompleted { get; set; } public WaitHandle AsyncWaitHandle => manualResetEvent; public object AsyncState { get; set; } public bool CompletedSynchronously { get; set; } public void Invoke() { AsyncState = method.DynamicInvoke(args); IsCompleted = true; manualResetEvent.Set(); } } private static CrossThreadInvoker instance; private static Thread mainThread; private static readonly Queue<AsyncResult> ToExecute = new Queue<AsyncResult>(); public static CrossThreadInvoker Instance => instance; public bool InvokeRequired => mainThread.ManagedThreadId != Thread.CurrentThread.ManagedThreadId; public static void Init() { if (instance == null) { mainThread = Thread.CurrentThread; instance = new CrossThreadInvoker(); ((Component)Plugin.instance).gameObject.AddComponent<BackgroundUpdater>(); } } private static void ProcessQueue() { if (Thread.CurrentThread != mainThread) { throw new Exception("must be called from the same thread it was created on (created on thread id: " + mainThread.ManagedThreadId + ", called from thread id: " + Thread.CurrentThread.ManagedThreadId); } AsyncResult asyncResult = null; while (true) { lock (ToExecute) { if (ToExecute.Count == 0) { break; } asyncResult = ToExecute.Dequeue(); } asyncResult.Invoke(); } } public IAsyncResult BeginInvoke(Delegate method, object[] args) { AsyncResult asyncResult = new AsyncResult { method = method, args = args, IsCompleted = false, manualResetEvent = new ManualResetEvent(initialState: false), invokingThread = Thread.CurrentThread }; if (mainThread.ManagedThreadId != asyncResult.invokingThread.ManagedThreadId) { lock (ToExecute) { ToExecute.Enqueue(asyncResult); } } else { asyncResult.Invoke(); asyncResult.CompletedSynchronously = true; } return asyncResult; } public object EndInvoke(IAsyncResult result) { if (!result.IsCompleted) { result.AsyncWaitHandle.WaitOne(); } return result.AsyncState; } public object Invoke(Delegate method, object[] args) { if (InvokeRequired) { IAsyncResult result = BeginInvoke(method, args); return EndInvoke(result); } return method.DynamicInvoke(args); } } namespace AngryLevelLoader { public static class AngryPaths { public const string SERVER_ROOT_GLOBAL = "https://angry.dnzsoft.com"; public const string SERVER_ROOT_LOCAL = "http://localhost:3000"; public static string SERVER_ROOT { get { if (!Plugin.useLocalServer.value) { return "https://angry.dnzsoft.com"; } return "http://localhost:3000"; } } public static string ConfigFolderPath => Path.Combine(Paths.ConfigPath, "AngryLevelLoader"); public static string OnlineCacheFolderPath => Path.Combine(ConfigFolderPath, "OnlineCache"); public static string ThumbnailCachePath => Path.Combine(OnlineCacheFolderPath, "thumbnailCacheHashes.txt"); public static string LevelCatalogCachePath => Path.Combine(OnlineCacheFolderPath, "V2", "LevelCatalog.json"); public static string ScriptCatalogCachePath => Path.Combine(OnlineCacheFolderPath, "ScriptCatalog.json"); public static string ThumbnailCacheFolderPath => Path.Combine(OnlineCacheFolderPath, "ThumbnailCache"); public static string LastPlayedMapPath => Path.Combine(ConfigFolderPath, "lastPlayedMap.txt"); public static string LastUpdateMapPath => Path.Combine(ConfigFolderPath, "lastUpdateMap.txt"); public static void TryCreateAllPaths() { IOUtils.TryCreateDirectory(ConfigFolderPath); IOUtils.TryCreateDirectory(OnlineCacheFolderPath); IOUtils.TryCreateDirectory(ThumbnailCacheFolderPath); } } public class ManifestReader { public static byte[] GetBytes(string resourceName) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AngryLevelLoader.Resources." + resourceName); byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); return array; } } public class SpaceField : CustomConfigField { public SpaceField(ConfigPanel parentPanel, float space) : base(parentPanel, 60f, space) { } } [BepInPlugin("com.eternalUnion.angryLevelLoader", "AngryLevelLoader", "3.1.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public class FolderEnumerator : IEnumerator<AngryBundleContainer>, IEnumerator, IDisposable, IEnumerable<AngryBundleContainer>, IEnumerable { public readonly FolderButtonField sourceFolder; private int currentBundleIndex = -1; private Stack<FolderButtonField> currentFolderStack = new Stack<FolderButtonField>(); private List<AngryBundleContainer> currentBundles; public AngryBundleContainer Current => currentBundles[currentBundleIndex]; object IEnumerator.Current => Current; private static AngryBundleContainer[] Test() { return new FolderEnumerator(pathToFolderMap["/"]).ToArray(); } public FolderEnumerator(FolderButtonField folder) { sourceFolder = folder; currentFolderStack.Push(folder); currentBundles = folderToBundleMap[folder]; } public void Dispose() { } public bool MoveNext() { currentBundleIndex++; if (currentBundleIndex < currentBundles.Count) { return true; } currentBundleIndex = 0; while (currentFolderStack.Count != 0) { FolderButtonField key = currentFolderStack.Peek(); if (folderToFolderMap.TryGetValue(key, out var value) && value.Count != 0) { key = value[0]; currentBundles = folderToBundleMap[key]; currentFolderStack.Push(key); if (currentBundles.Count != 0) { return true; } continue; } while (currentFolderStack.Count > 1) { key = currentFolderStack.Pop(); FolderButtonField key2 = currentFolderStack.Peek(); List<FolderButtonField> list = folderToFolderMap[key2]; int num = list.IndexOf(key) + 1; if (num < list.Count) { key = list[num]; currentFolderStack.Push(key); currentBundles = folderToBundleMap[key]; if (currentBundles.Count == 0) { break; } return true; } } if (currentFolderStack.Count <= 1) { return false; } } return false; } public void Reset() { currentFolderStack.Clear(); currentFolderStack.Push(sourceFolder); currentBundles = folderToBundleMap[sourceFolder]; currentBundleIndex = -1; } public IEnumerator<AngryBundleContainer> GetEnumerator() { return this; } IEnumerator IEnumerable.GetEnumerator() { return this; } } public enum CustomLevelButtonPosition { Top, Bottom, Disabled } public enum BundleSorting { Alphabetically, Author, LastPlayed, LastUpdate } public enum DefaultLeaderboardCategory { All, PRank, Challenge, Nomo, Nomow } public enum DefaultLeaderboardDifficulty { Any, Harmless, Lenient, Standard, Violent, Brutal } public enum DefaultLeaderboardFilter { Global, Friends } private class RecordInfoJsonWrapper { public string category { get; set; } public string difficulty { get; set; } public string bundleGuid { get; set; } public string hash { get; set; } public string levelId { get; set; } public int time { get; set; } public RecordInfoJsonWrapper() { } public RecordInfoJsonWrapper(AngryLeaderboards.PostRecordInfo record) { category = AngryLeaderboards.RECORD_CATEGORY_DICT[record.category]; difficulty = AngryLeaderboards.RECORD_DIFFICULTY_DICT[record.difficulty]; bundleGuid = record.bundleGuid; hash = record.hash; levelId = record.levelId; time = record.time; } public bool TryParseRecordInfo(out AngryLeaderboards.PostRecordInfo record) { record = default(AngryLeaderboards.PostRecordInfo); record.category = AngryLeaderboards.RECORD_CATEGORY_DICT.FirstOrDefault((KeyValuePair<AngryLeaderboards.RecordCategory, string> i) => i.Value == category).Key; if (AngryLeaderboards.RECORD_CATEGORY_DICT[record.category] != category) { return false; } record.difficulty = AngryLeaderboards.RECORD_DIFFICULTY_DICT.FirstOrDefault((KeyValuePair<AngryLeaderboards.RecordDifficulty, string> i) => i.Value == difficulty).Key; if (AngryLeaderboards.RECORD_DIFFICULTY_DICT[record.difficulty] != difficulty) { return false; } record.bundleGuid = bundleGuid; record.hash = hash; record.levelId = levelId; record.time = time; return true; } } [CompilerGenerated] private sealed class <<InitializeFileWatcher>g__LoadLevelInstantly|123_5>d : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private <>c__DisplayClass123_0 <>8__1; private AngryBundleContainer <bundle>5__2; private LevelContainer <level>5__3; private Transform <optionsMenu>5__4; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <<InitializeFileWatcher>g__LoadLevelInstantly|123_5>d(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <bundle>5__2 = null; <level>5__3 = null; <optionsMenu>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass123_0(); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <bundle>5__2 = GetAngryBundleByGuid(instantLoadLevelGuid.value); if (<bundle>5__2 == null) { logger.LogInfo((object)"Bundle not found"); return false; } <>8__1.handler = <bundle>5__2.UpdateScenes(forceReload: false, lazyLoad: false); <>2__current = (object)new WaitUntil((Func<bool>)(() => <>8__1.handler.IsCompleted)); <>1__state = 2; return true; case 2: { <>1__state = -1; if (!<bundle>5__2.levels.TryGetValue(instantLoadLevelId.value, out <level>5__3)) { logger.LogInfo((object)"Level not found"); return false; } Scene activeScene = SceneManager.GetActiveScene(); GameObject val4 = (from obj in ((Scene)(ref activeScene)).GetRootGameObjects() where ((Object)obj).name == "Canvas" select obj).FirstOrDefault(); if ((Object)(object)val4 == (Object)null) { logger.LogWarning((object)"Angry tried to create main menu buttons, but root canvas was not found!"); return false; } <optionsMenu>5__4 = val4.transform.Find("OptionsMenu"); if ((Object)(object)<optionsMenu>5__4 == (Object)null) { logger.LogError((object)"Angry tried to find the options menu but failed!"); return false; } ((Component)<optionsMenu>5__4).gameObject.SetActive(true); <>2__current = null; <>1__state = 3; return true; } case 3: { <>1__state = -1; Transform val = ((Component)<optionsMenu>5__4).transform.Find("Navigation Rail/PluginConfiguratorButton(Clone)"); if ((Object)(object)val == (Object)null) { val = ((Component)<optionsMenu>5__4).transform.Find("Navigation Rail/PluginConfiguratorButton"); } if ((Object)(object)val == (Object)null) { logger.LogError((object)"Angry tried to find the plugin configurator button but failed!"); return false; } Transform val2 = <optionsMenu>5__4.Find("Navigation Rail"); ButtonHighlightParent val3 = default(ButtonHighlightParent); if ((Object)(object)val2 != (Object)null && ((Component)val2).gameObject.TryGetComponent<ButtonHighlightParent>(ref val3) && (val3.buttons == null || val3.buttons.Length == 0)) { val3.Start(); val3.targetOnStart = null; } ((UnityEvent)((Component)val).gameObject.GetComponent<Button>().onClick).Invoke(); <>2__current = null; <>1__state = 4; return true; } case 4: <>1__state = -1; if ((Object)(object)PluginConfiguratorController.activePanel != (Object)null) { PluginConfiguratorController.activePanel.SetActive(false); } <>2__current = null; <>1__state = 5; return true; case 5: <>1__state = -1; ((Component)PluginConfiguratorController.mainPanel).gameObject.SetActive(false); <>2__current = null; <>1__state = 6; return true; case 6: <>1__state = -1; config.rootPanel.OpenPanelInternally(false); <>2__current = null; <>1__state = 7; return true; case 7: <>1__state = -1; ((ConfigPanel)<bundle>5__2.rootPanel).OpenPanelInternally(false); <>2__current = null; <>1__state = 8; return true; case 8: <>1__state = -1; AngrySceneManager.LevelButtonPressed(<bundle>5__2, <level>5__3, <level>5__3.data, <level>5__3.data.scenePath); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <<InitializeFileWatcher>g__ShowScriptPrompt|123_7>d : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <<InitializeFileWatcher>g__ShowScriptPrompt|123_7>d(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0093: 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_00c0: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitUntil((Func<bool>)(() => (Object)(object)currentPanel != (Object)null && AngrySceneManager.isInCustomLevel)); <>1__state = 1; return true; case 1: { <>1__state = -1; ((Component)currentPanel.reloadScriptPrompt).gameObject.SetActive(true); currentPanel.reloadScriptPrompt.audio.Play(); currentPanel.reloadScriptPrompt.text.text = $"Script update detected\nPress <color=orange>{reloadScriptKeybind.value}</color> to reload\n(Can be binded in the settings)"; currentPanel.reloadScriptPrompt.reloadButton.onClick = new ButtonClickedEvent(); ButtonClickedEvent onClick = currentPanel.reloadScriptPrompt.reloadButton.onClick; object obj = <>c.<>9__123_9; if (obj == null) { UnityAction val = delegate { if (AngrySceneManager.isInCustomLevel) { instantLoadLevel.value = true; instantLoadLevelGuid.value = AngrySceneManager.currentBundleContainer.bundleData.bundleGuid; instantLoadLevelId.value = AngrySceneManager.currentLevelContainer.data.uniqueIdentifier; } PluginConfiguratorController.FlushAllConfigs(); ProcessStartInfo processStartInfo = new ProcessStartInfo { FileName = Path.Combine(Directory.GetParent(Application.dataPath).FullName, "ULTRAKILL.exe"), WorkingDirectory = Directory.GetParent(Application.dataPath).FullName, UseShellExecute = false, RedirectStandardError = true, RedirectStandardOutput = true }; string[] array = new string[7] { "DOORSTOP_DISABLE", "DOORSTOP_DLL_SEARCH_DIRS", "DOORSTOP_INITIALIZED", "DOORSTOP_INVOKE_DLL_PATH", "DOORSTOP_MANAGED_FOLDER_DIR", "DOORSTOP_MONO_LIB_PATH", "DOORSTOP_PROCESS_PATH" }; foreach (string key in array) { if (processStartInfo.EnvironmentVariables.ContainsKey(key)) { processStartInfo.EnvironmentVariables.Remove(key); } if (processStartInfo.Environment.ContainsKey(key)) { processStartInfo.Environment.Remove(key); } } Process.Start(processStartInfo); Application.Quit(); }; <>c.<>9__123_9 = val; obj = (object)val; } ((UnityEvent)onClick).AddListener((UnityAction)obj); currentPanel.reloadScriptPrompt.ignoreButton.onClick = new ButtonClickedEvent(); ButtonClickedEvent onClick2 = currentPanel.reloadScriptPrompt.ignoreButton.onClick; object obj2 = <>c.<>9__123_10; if (obj2 == null) { UnityAction val2 = delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown currentPanel.reloadScriptPrompt.reloadButton.onClick = new ButtonClickedEvent(); ((Component)currentPanel.reloadScriptPrompt).gameObject.SetActive(false); }; <>c.<>9__123_10 = val2; obj2 = (object)val2; } ((UnityEvent)onClick2).AddListener((UnityAction)obj2); return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private static class <>O { public static UnityAction<Scene, LoadSceneMode> <0>__RefreshCatalogOnMainMenu; public static OnClick <1>__ProcessPendingRecords; public static Action<string> <2>__UpdateBundleSearch; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<AngryBundleContainer, bool> <>9__45_1; public static Func<string, string> <>9__47_0; public static Func<string, bool> <>9__51_0; public static Func<AngryBundleContainer, string> <>9__52_0; public static Func<AngryBundleContainer, string> <>9__52_1; public static Func<AngryBundleContainer, long> <>9__52_2; public static Func<AngryBundleContainer, long> <>9__52_3; public static Func<GameObject, bool> <>9__116_0; public static Func<GameObject, bool> <>9__120_0; public static FileSystemEventHandler <>9__123_0; public static RenamedEventHandler <>9__123_1; public static FileSystemEventHandler <>9__123_2; public static FileSystemEventHandler <>9__123_3; public static Func<bool> <>9__123_8; public static UnityAction <>9__123_9; public static UnityAction <>9__123_10; public static Func<GameObject, bool> <>9__123_12; public static UnityAction<Scene, LoadSceneMode> <>9__123_6; public static PostPresetChangeEvent <>9__124_0; public static Func<string, bool> <>9__124_22; public static Func<string, string> <>9__124_23; public static OpenPanelEventDelegate <>9__124_1; public static OpenPanelEventDelegate <>9__124_2; public static EnumValueChangeEventDelegate<BundleSorting> <>9__124_3; public static PostStringListValueChangeEvent <>9__124_25; public static OpenPanelEventDelegate <>9__124_4; public static OnClick <>9__124_5; public static OnClick <>9__124_6; public static OnClick <>9__124_7; public static KeyCodeValueChangeEventDelegate <>9__124_8; public static KeyCodeValueChangeEventDelegate <>9__124_9; public static PostEnumValueChangeEvent<CustomLevelButtonPosition> <>9__124_10; public static PostColorValueChangeEvent <>9__124_11; public static PostColorValueChangeEvent <>9__124_12; public static BoolValueChangeEventDelegate <>9__124_13; public static BoolValueChangeEventDelegate <>9__124_14; public static BoolValueChangeEventDelegate <>9__124_15; public static OnClick <>9__124_17; public static OnClick <>9__124_19; public static Func<RudeLevelData, string> <>9__124_27; public static Func<RudeLevelData, int> <>9__124_28; public static Func<Task, bool> <>9__131_0; public static BoolValueChangeEventDelegate <>9__134_0; public static PostBoolValueChangeEvent <>9__134_1; public static OpenPanelEventDelegate <>9__134_3; public static OpenPanelEventDelegate <>9__134_4; public static Action <>9__134_6; public static Action<bool> <>9__134_7; internal bool <OpenFolder>b__45_1(AngryBundleContainer bundle) { return bundle.bundleData != null; } internal string <UpdateBundleSearch>b__47_0(string keyword) { return keyword.ToLower(); } internal bool <ScanForLevels>b__51_0(string path) { return validImageExts.Contains<string>(Path.GetExtension(path)); } internal string <SortBundles>b__52_0(AngryBundleContainer b) { return b.bundleData.bundleName; } internal string <SortBundles>b__52_1(AngryBundleContainer b) { return b.bundleData.bundleAuthor; } internal long <SortBundles>b__52_2(AngryBundleContainer b) { if (lastPlayed.TryGetValue(b.bundleData.bundleGuid, out var value)) { return value; } return 0L; } internal long <SortBundles>b__52_3(AngryBundleContainer b) { if (lastUpdate.TryGetValue(b.bundleData.bundleGuid, out var value)) { return value; } return 0L; } internal bool <CreateCustomLevelButtonOnMainMenuAsync>b__116_0(GameObject obj) { return ((Object)obj).name == "Canvas"; } internal bool <CreateAngryUIAsync>b__120_0(GameObject obj) { return ((Object)obj).name == "Canvas"; } internal void <InitializeFileWatcher>b__123_0(object sender, FileSystemEventArgs e) { string fullPath = e.FullPath; foreach (AngryBundleContainer value in angryBundles.Values) { if (IOUtils.PathEquals(fullPath, value.pathToAngryBundle)) { logger.LogWarning((object)("Bundle " + fullPath + " was updated, container notified")); value.FileChanged(); break; } } } internal void <InitializeFileWatcher>b__123_1(object sender, RenamedEventArgs e) { string fullPath = e.FullPath; foreach (AngryBundleContainer value in angryBundles.Values) { if (IOUtils.PathEquals(fullPath, value.pathToAngryBundle)) { logger.LogWarning((object)("Bundle " + fullPath + " was renamed, path updated")); value.pathToAngryBundle = fullPath; break; } } } internal void <InitializeFileWatcher>b__123_2(object sender, FileSystemEventArgs e) { string fullPath = e.FullPath; foreach (AngryBundleContainer value in angryBundles.Values) { if (IOUtils.PathEquals(fullPath, value.pathToAngryBundle)) { logger.LogWarning((object)("Bundle " + fullPath + " was deleted, unlinked")); value.pathToAngryBundle = ""; break; } } } internal void <InitializeFileWatcher>b__123_3(object sender, FileSystemEventArgs e) { string fullPath = e.FullPath; if (AngryFileUtils.TryGetAngryBundleData(fullPath, out var data, out var _) && angryBundles.TryGetValue(data.bundleGuid, out var value) && value.bundleData.bundleGuid == data.bundleGuid && !File.Exists(value.pathToAngryBundle)) { logger.LogWarning((object)("Bundle " + fullPath + " was just added, and a container with the same guid had no file linked. Linked, container notified")); value.pathToAngryBundle = fullPath; value.FileChanged(); } } internal bool <InitializeFileWatcher>b__123_8() { if ((Object)(object)currentPanel != (Object)null) { return AngrySceneManager.isInCustomLevel; } return false; } internal void <InitializeFileWatcher>b__123_9() { if (AngrySceneManager.isInCustomLevel) { instantLoadLevel.value = true; instantLoadLevelGuid.value = AngrySceneManager.currentBundleContainer.bundleData.bundleGuid; instantLoadLevelId.value = AngrySceneManager.currentLevelContainer.data.uniqueIdentifier; } PluginConfiguratorController.FlushAllConfigs(); ProcessStartInfo processStartInfo = new ProcessStartInfo { FileName = Path.Combine(Directory.GetParent(Application.dataPath).FullName, "ULTRAKILL.exe"), WorkingDirectory = Directory.GetParent(Application.dataPath).FullName, UseShellExecute = false, RedirectStandardError = true, RedirectStandardOutput = true }; string[] array = new string[7] { "DOORSTOP_DISABLE", "DOORSTOP_DLL_SEARCH_DIRS", "DOORSTOP_INITIALIZED", "DOORSTOP_INVOKE_DLL_PATH", "DOORSTOP_MANAGED_FOLDER_DIR", "DOORSTOP_MONO_LIB_PATH", "DOORSTOP_PROCESS_PATH" }; foreach (string key in array) { if (processStartInfo.EnvironmentVariables.ContainsKey(key)) { processStartInfo.EnvironmentVariables.Remove(key); } if (processStartInfo.Environment.ContainsKey(key)) { processStartInfo.Environment.Remove(key); } } Process.Start(processStartInfo); Application.Quit(); } internal void <InitializeFileWatcher>b__123_10() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown currentPanel.reloadScriptPrompt.reloadButton.onClick = new ButtonClickedEvent(); ((Component)currentPanel.reloadScriptPrompt).gameObject.SetActive(false); } internal bool <InitializeFileWatcher>b__123_12(GameObject obj) { return ((Object)obj).name == "Canvas"; } internal void <InitializeFileWatcher>b__123_6(Scene scene, LoadSceneMode mode) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 if ((int)mode != 1 && !AngrySceneManager.isInCustomLevel && !(SceneHelper.CurrentScene != "Main Menu") && instantLoadLevel.value) { instantLoadLevel.value = false; logger.LogInfo((object)"Starting custom level instantly"); ((MonoBehaviour)instance).StartCoroutine(<InitializeFileWatcher>g__LoadLevelInstantly|123_5()); } } internal void <InitializeConfig>b__124_0(string b, string a) { UpdateAllUI(); } internal void <InitializeConfig>b__124_1(bool external) { if (newLevelToggle.value) { newLevelNotifier.text = string.Join("\n", from level in newLevelNotifierLevels.value.Split('`') where !string.IsNullOrEmpty(level) select level into name select "<color=#00FF00>New level: " + name + "</color>"); ((ConfigField)newLevelNotifier).hidden = false; newLevelNotifierLevels.value = ""; } newLevelToggle.value = false; } internal bool <InitializeConfig>b__124_22(string level) { return !string.IsNullOrEmpty(level); } internal string <InitializeConfig>b__124_23(string name) { return "<color=#00FF00>New level: " + name + "</color>"; } internal void <InitializeConfig>b__124_2(bool e) { ((ConfigField)newLevelNotifier).hidden = true; } internal void <InitializeConfig>b__124_3(EnumValueChangeEvent<BundleSorting> e) { bundleSortingMode.value = e.value; SortBundles(); } internal void <InitializeConfig>b__124_25(string gamemodeName, int gamemodeIndex) { difficultyField.TriggerPostDifficultyChangeEvent(); } internal void <InitializeConfig>b__124_4(bool externally) { difficultyField.TriggerPostDifficultyChangeEvent(); } internal void <InitializeConfig>b__124_5() { openButtons.SetButtonInteractable(1, false); PluginUpdateHandler.CheckPluginUpdate(); } internal void <InitializeConfig>b__124_6() { Application.OpenURL(levelsPath); } internal void <InitializeConfig>b__124_7() { Application.OpenURL(ScriptManager.ScriptsPath); } internal void <InitializeConfig>b__124_8(KeyCodeValueChangeEvent e) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Invalid comparison between Unknown and I4 //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Invalid comparison between Unknown and I4 if ((int)e.value == 323 || (int)e.value == 324 || (int)e.value == 325) { e.canceled = true; } } internal void <InitializeConfig>b__124_9(KeyCodeValueChangeEvent e) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Invalid comparison between Unknown and I4 //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Invalid comparison between Unknown and I4 if ((int)e.value == 323 || (int)e.value == 324 || (int)e.value == 325) { e.canceled = true; } } internal void <InitializeConfig>b__124_10(CustomLevelButtonPosition pos) { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0077: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0212: 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_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)currentCustomLevelButton == (Object)null) { return; } ((Component)currentCustomLevelButton).gameObject.SetActive(true); switch (pos) { case CustomLevelButtonPosition.Disabled: ((Component)currentCustomLevelButton).gameObject.SetActive(false); break; case CustomLevelButtonPosition.Bottom: ((Component)currentCustomLevelButton).transform.localPosition = new Vector3(((Component)currentCustomLevelButton).transform.localPosition.x, -303f, ((Component)currentCustomLevelButton).transform.localPosition.z); break; case CustomLevelButtonPosition.Top: ((Component)currentCustomLevelButton).transform.localPosition = new Vector3(((Component)currentCustomLevelButton).transform.localPosition.x, 192f, ((Component)currentCustomLevelButton).transform.localPosition.z); break; } if ((Object)(object)bossRushButton != (Object)null) { if (pos == CustomLevelButtonPosition.Bottom) { currentCustomLevelButton.rect.sizeDelta = new Vector2(187.5f, 50f); ((Component)currentCustomLevelButton).transform.localPosition = new Vector3(-96.25f, ((Component)currentCustomLevelButton).transform.localPosition.y, ((Component)currentCustomLevelButton).transform.localPosition.z); bossRushButton.sizeDelta = new Vector2(187.5f, 50f); ((Component)bossRushButton).transform.localPosition = new Vector3(96.25f, -303f, 0f); } else { currentCustomLevelButton.rect.sizeDelta = new Vector2(380f, 50f); ((Component)currentCustomLevelButton).transform.localPosition = new Vector3(0f, ((Component)currentCustomLevelButton).transform.localPosition.y, ((Component)currentCustomLevelButton).transform.localPosition.z); bossRushButton.sizeDelta = new Vector2(380f, 50f); ((Component)bossRushButton).transform.localPosition = new Vector3(0f, -303f, 0f); } } } internal void <InitializeConfig>b__124_11(Color clr) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_004a: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)currentCustomLevelButton == (Object)null)) { ColorBlock colors = default(ColorBlock); ((ColorBlock)(ref colors)).colorMultiplier = 1f; ((ColorBlock)(ref colors)).fadeDuration = 0.1f; ((ColorBlock)(ref colors)).normalColor = clr; ((ColorBlock)(ref colors)).selectedColor = clr * 0.8f; ((ColorBlock)(ref colors)).highlightedColor = clr * 0.8f; ((ColorBlock)(ref colors)).pressedColor = clr * 0.5f; ((ColorBlock)(ref colors)).disabledColor = Color.gray; ((Selectable)currentCustomLevelButton.button).colors = colors; } } internal void <InitializeConfig>b__124_12(Color clr) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)currentCustomLevelButton == (Object)null)) { ((Graphic)currentCustomLevelButton.text).color = clr; } } internal void <InitializeConfig>b__124_13(BoolValueChangeEvent e) { levelUpdateNotifierToggle.value = e.value; OnlineLevelsManager.CheckLevelUpdateText(); } internal void <InitializeConfig>b__124_14(BoolValueChangeEvent e) { levelUpdateIgnoreCustomBuilds.value = e.value; OnlineLevelsManager.CheckLevelUpdateText(); } internal void <InitializeConfig>b__124_15(BoolValueChangeEvent e) { newLevelNotifierToggle.value = e.value; if (!e.value) { ((ConfigField)newLevelNotifier).hidden = true; } } internal void <InitializeConfig>b__124_17() { NotificationPanel.Open((Notification)(object)new DeleteOldBundlesNotification()); } internal void <InitializeConfig>b__124_19() { ScanForLevels(); } internal string <InitializeConfig>b__124_27(RudeLevelData data) { return data.uniqueIdentifier; } internal int <InitializeConfig>b__124_28(RudeLevelData d) { return d.prefferedLevelOrder; } internal bool <ProcessPendingRecords>b__131_0(Task task) { return ((ConfigField)sendPendingRecords).interactable = true; } internal void <PostAwake>b__134_0(BoolValueChangeEvent e) { if (e.value) { e.canceled = true; NotificationPanel.Open((Notification)(object)new LeaderboardPermissionNotification()); } } internal void <PostAwake>b__134_1(bool newVal) { ((ConfigField)leaderboardsDivision).hidden = newVal; } internal void <PostAwake>b__134_3(bool externally) { if (AngryLeaderboards.bannedModsListLoaded) { CheckForBannedMods(); } else { AngryLeaderboards.LoadBannedModsList(); } } internal void <PostAwake>b__134_4(bool externally) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown <>c__DisplayClass134_0 CS$<>8__locals0 = new <>c__DisplayClass134_0 { backButtonEvent = PluginConfiguratorController.backButton.onClick }; PluginConfiguratorController.backButton.onClick = new ButtonClickedEvent(); ((UnityEvent)PluginConfiguratorController.backButton.onClick).AddListener((UnityAction)delegate { if (folderStack.Count <= 1 || !string.IsNullOrEmpty(searchBar.value)) { ((UnityEvent)CS$<>8__locals0.backButtonEvent).Invoke(); } else { folderStack.Pop(); if (folderStack.Count != 0) { OpenFolder(folderStack.Peek()); } else { OpenFolder(null); } } }); } internal void <PostAwake>b__134_6() { searchBar.value = ""; } internal void <PostAwake>b__134_7(bool wasCanceled) { if (wasCanceled) { if (!string.IsNullOrWhiteSpace(searchBar.value)) { searchBar.value = ""; } else if (folderStack.Count <= 1) { config.rootPanel.ClosePanel(); } } } } [CompilerGenerated] private sealed class <>c__DisplayClass116_0 { public GameObject canvasObj; public Transform chapterSelect; internal void <CreateCustomLevelButtonOnMainMenuAsync>b__1() { //IL_013d: Unknown result type (might be due to invalid IL or missing references) Transform val = canvasObj.transform.Find("OptionsMenu"); if ((Object)(object)val == (Object)null) { logger.LogError((object)"Angry tried to find the options menu but failed!"); return; } ((Component)chapterSelect).gameObject.SetActive(false); ((Component)val).gameObject.SetActive(true); Transform val2 = ((Component)val).transform.Find("Navigation Rail/PluginConfiguratorButton(Clone)"); if ((Object)(object)val2 == (Object)null) { val2 = ((Component)val).transform.Find("Navigation Rail/PluginConfiguratorButton"); } if ((Object)(object)val2 == (Object)null) { logger.LogError((object)"Angry tried to find the plugin configurator button but failed!"); return; } Transform val3 = val.Find("Navigation Rail"); ButtonHighlightParent val4 = default(ButtonHighlightParent); if ((Object)(object)val3 != (Object)null && ((Component)val3).gameObject.TryGetComponent<ButtonHighlightParent>(ref val4) && (val4.buttons == null || val4.buttons.Length == 0)) { val4.Start(); val4.targetOnStart = null; } ((UnityEvent)((Component)val2).gameObject.GetComponent<Button>().onClick).Invoke(); if ((Object)(object)PluginConfiguratorController.activePanel != (Object)null) { PluginConfiguratorController.activePanel.SetActive(false); } ((Component)PluginConfiguratorController.mainPanel).gameObject.SetActive(false); config.rootPanel.OpenPanelInternally(false); config.rootPanel.currentPanel.rect.normalizedPosition = new Vector2(0f, 1f); int @int = MonoSingleton<PrefsManager>.Instance.GetInt("difficulty", 3); switch (@int) { case 0: case 1: case 2: case 3: case 4: logger.LogInfo((object)("Angry setting difficulty to " + difficultyList[@int])); difficultyField.difficultyListValueIndex = @int; break; case 5: if (ultrapainLoaded) { if (GetUltrapainDifficultySet()) { difficultyField.difficultyListValueIndex = difficultyList.IndexOf("ULTRAPAIN"); break; } logger.LogWarning((object)"Difficulty was set to UKMD, but angry does not support it. Setting to violent"); difficultyField.difficultyListValueIndex = 3; } break; default: if (heavenOrHellLoaded) { if (GetHeavenOrHellDifficultySet()) { difficultyField.difficultyListValueIndex = difficultyList.IndexOf("HEAVEN OR HELL"); break; } logger.LogWarning((object)"Unknown difficulty, defaulting to violent"); difficultyField.difficultyListValueIndex = 3; } break; } difficultyField.TriggerPostDifficultyChangeEvent(); } } [CompilerGenerated] private sealed class <>c__DisplayClass123_0 { public Task handler; internal bool <InitializeFileWatcher>b__11() { return handler.IsCompleted; } } [CompilerGenerated] private sealed class <>c__DisplayClass134_0 { public ButtonClickedEvent backButtonEvent; internal void <PostAwake>b__5() { if (folderStack.Count <= 1 || !string.IsNullOrEmpty(searchBar.value)) { ((UnityEvent)backButtonEvent).Invoke(); return; } folderStack.Pop(); if (folderStack.Count != 0) { OpenFolder(folderStack.Peek()); } else { OpenFolder(null); } } } [CompilerGenerated] private sealed class <CreateAngryUIAsync>d__120 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CreateAngryUIAsync>d__120(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: { <>1__state = -1; if ((Object)(object)currentPanel != (Object)null) { return false; } Scene activeScene = SceneManager.GetActiveScene(); GameObject val = (from obj in ((Scene)(ref activeScene)).GetRootGameObjects() where ((Object)obj).name == "Canvas" select obj).FirstOrDefault(); if ((Object)(object)val == (Object)null) { logger.LogWarning((object)"Angry tried to create main menu buttons, but root canvas was not found!"); return false; } currentPanel = Addressables.InstantiateAsync((object)"AngryLevelLoader/UI/AngryUIPanel.prefab", val.transform, false, true).WaitForCompletion().GetComponent<AngryUIPanelComponent>(); currentPanel.reloadBundlePrompt.MakeTransparent(true); return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <CreateCustomLevelButtonOnMainMenuAsync>d__116 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private <>c__DisplayClass116_0 <>8__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CreateCustomLevelButtonOnMainMenuAsync>d__116(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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) //IL_0143: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass116_0(); <>2__current = null; <>1__state = 1; return true; case 1: { <>1__state = -1; <>c__DisplayClass116_0 <>c__DisplayClass116_ = <>8__1; Scene activeScene = SceneManager.GetActiveScene(); <>c__DisplayClass116_.canvasObj = (from obj in ((Scene)(ref activeScene)).GetRootGameObjects() where ((Object)obj).name == "Canvas" select obj).FirstOrDefault(); if ((Object)(object)<>8__1.canvasObj == (Object)null) { logger.LogWarning((object)"Angry tried to create main menu buttons, but root canvas was not found!"); return false; } Transform val = <>8__1.canvasObj.transform.Find("Chapter Select/Chapters"); if ((Object)(object)val != (Object)null) { <>8__1.chapterSelect = <>8__1.canvasObj.transform.Find("Chapter Select"); GameObject obj2 = Addressables.InstantiateAsync((object)"AngryLevelLoader/UI/CustomLevels.prefab", val, false, true).WaitForCompletion(); Transform val2 = val.Find("Boss Rush Button"); if ((Object)(object)val2 != (Object)null) { bossRushButton = ((Component)val2).gameObject.GetComponent<RectTransform>(); } currentCustomLevelButton = obj2.GetComponent<AngryCustomLevelButtonComponent>(); currentCustomLevelButton.button.onClick = new ButtonClickedEvent(); ((UnityEvent)currentCustomLevelButton.button.onClick).AddListener((UnityAction)delegate { //IL_013d: Unknown result type (might be due to invalid IL or missing references) Transform val3 = <>8__1.canvasObj.transform.Find("OptionsMenu"); if ((Object)(object)val3 == (Object)null) { logger.LogError((object)"Angry tried to find the options menu but failed!"); } else { ((Component)<>8__1.chapterSelect).gameObject.SetActive(false); ((Component)val3).gameObject.SetActive(true); Transform val4 = ((Component)val3).transform.Find("Navigation Rail/PluginConfiguratorButton(Clone)"); if ((Object)(object)val4 == (Object)null) { val4 = ((Component)val3).transform.Find("Navigation Rail/PluginConfiguratorButton"); } if ((Object)(object)val4 == (Object)null) { logger.LogError((object)"Angry tried to find the plugin configurator button but failed!"); } else { Transform val5 = val3.Find("Navigation Rail"); ButtonHighlightParent val6 = default(ButtonHighlightParent); if ((Object)(object)val5 != (Object)null && ((Component)val5).gameObject.TryGetComponent<ButtonHighlightParent>(ref val6) && (val6.buttons == null || val6.buttons.Length == 0)) { val6.Start(); val6.targetOnStart = null; } ((UnityEvent)((Component)val4).gameObject.GetComponent<Button>().onClick).Invoke(); if ((Object)(object)PluginConfiguratorController.activePanel != (Object)null) { PluginConfiguratorController.activePanel.SetActive(false); } ((Component)PluginConfiguratorController.mainPanel).gameObject.SetActive(false); config.rootPanel.OpenPanelInternally(false); config.rootPanel.currentPanel.rect.normalizedPosition = new Vector2(0f, 1f); int @int = MonoSingleton<PrefsManager>.Instance.GetInt("difficulty", 3); switch (@int) { case 0: case 1: case 2: case 3: case 4: logger.LogInfo((object)("Angry setting difficulty to " + difficultyList[@int])); difficultyField.difficultyListValueIndex = @int; break; case 5: if (ultrapainLoaded) { if (GetUltrapainDifficultySet()) { difficultyField.difficultyListValueIndex = difficultyList.IndexOf("ULTRAPAIN"); } else { logger.LogWarning((object)"Difficulty was set to UKMD, but angry does not support it. Setting to violent"); difficultyField.difficultyListValueIndex = 3; } } break; default: if (heavenOrHellLoaded) { if (GetHeavenOrHellDifficultySet()) { difficultyField.difficultyListValueIndex = difficultyList.IndexOf("HEAVEN OR HELL"); } else { logger.LogWarning((object)"Unknown difficulty, defaulting to violent"); difficultyField.difficultyListValueIndex = 3; } } break; } difficultyField.TriggerPostDifficultyChangeEvent(); } } }); customLevelButtonPosition.TriggerPostValueChangeEvent(); customLevelButtonFrameColor.TriggerPostValueChangeEvent(); customLevelButtonTextColor.TriggerPostValueChangeEvent(); } else { logger.LogWarning((object)"Angry tried to find chapter select menu, but root canvas was not found!"); } return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string PLUGIN_NAME = "AngryLevelLoader"; public const string PLUGIN_GUID = "com.eternalUnion.angryLevelLoader"; public const string PLUGIN_VERSION = "3.1.1"; public const string PLUGIN_CONFIG_MIN_VERSION = "1.8.0"; public static readonly Vector3 defaultGravity = new Vector3(0f, -40f, 0f); public static string workingDir; public static string tempFolderPath; public static string dataPath; public static string levelsPath; public static string mapVarsFolderPath; public static string angryCatalogPath; public static Plugin instance; public static ManualLogSource logger; public static PluginConfigurator internalConfig; public static BoolField devMode; public static StringField lastVersion; public static StringField updateLastVersion; public static BoolField ignoreUpdates; public static StringField configDataPath; public static BoolField leaderboardToggle; public static BoolField askedPermissionForLeaderboards; public static BoolField showLeaderboardOnLevelEnd; public static BoolField showLeaderboardOnSecretLevelEnd; public static StringField pendingRecordsField; public static BoolField ignoreEpilepsyWarning; public static BoolField instantLoadLevel; public static StringField instantLoadLevelGuid; public static StringField instantLoadLevelId; public static bool ultrapainLoaded = false; public static bool heavenOrHellLoaded = false; public static Dictionary<string, RudeLevelData> idDictionary = new Dictionary<string, RudeLevelData>(); public static Dictionary<string, AngryBundleContainer> angryBundles = new Dictionary<string, AngryBundleContainer>(); public static Dictionary<string, FolderButtonField> pathToFolderMap = new Dictionary<string, FolderButtonField>(); public static Dictionary<FolderButtonField, List<AngryBundleContainer>> folderToBundleMap = new Dictionary<FolderButtonField, List<AngryBundleContainer>>(); public static Dictionary<FolderButtonField, List<FolderButtonField>> folderToFolderMap = new Dictionary<FolderButtonField, List<FolderButtonField>>(); public static Stack<FolderButtonField> folderStack = new Stack<FolderButtonField>(); internal static string[] currentSearchKeywords = new string[0]; public static Dictionary<string, long> lastPlayed = new Dictionary<string, long>(); public static Dictionary<string, long> lastUpdate = new Dictionary<string, long>(); private static char[] whitespaceSeparator = new char[1] { ' ' }; private static int numOfOldBundles = 0; private static string[] validImageExts = new string[3] { ".jpg", ".jpeg", ".png" }; public static int selectedDifficulty = 3; public static DifficultyField difficultyField; internal static List<string> difficultyList = new List<string> { "HARMLESS", "LENIENT", "STANDARD", "VIOLENT", "BRUTAL" }; internal static List<string> gamemodeList = new List<string> { "None", "No Monsters", "No Monsters/Weapons" }; public static Harmony harmony; public static PluginConfigurator config; public static ConfigHeader levelUpdateNotifier; public static ConfigHeader newLevelNotifier; public static StringField newLevelNotifierLevels; public static BoolField newLevelToggle; public static ConfigHeader errorText; public static ConfigHeader levelBundlesHeader; public static SearchBarField searchBar; public static ConfigDivision folderDivision; public static ConfigDivision bundleDivision; public static ConfigHeader searchInfo; public static ConfigDivision leaderboardsDivision; public static ConfigPanel bannedModsPanel; public static ConfigHeader bannedModsText; public static ConfigPanel pendingRecords; public static ButtonField sendPendingRecords; public static ConfigHeader pendingRecordsStatus; public static ConfigHeader pendingRecordsInfo; public static ButtonField changelogButton; public static ButtonArrayField openButtons; public static KeyCodeField reloadFileKeybind; public static KeyCodeField reloadScriptKeybind; public static EnumField<CustomLevelButtonPosition> customLevelButtonPosition; public static ColorField customLevelButtonFrameColor; public static ColorField customLevelButtonTextColor; public static BoolField refreshCatalogOnBoot; public static BoolField checkForUpdates; public static BoolField levelUpdateNotifierToggle; public static BoolField levelUpdateIgnoreCustomBuilds; public static BoolField newLevelNotifierToggle; public static List<string> scriptCertificateIgnore = new List<string>(); public static StringMultilineField scriptCertificateIgnoreField; public static BoolField useDevelopmentBranch; public static BoolField useLocalServer; public static BoolField scriptUpdateIgnoreCustom; public static EnumField<BundleSorting> bundleSortingMode; public static EnumField<DefaultLeaderboardCategory> defaultLeaderboardCategory; public static EnumField<DefaultLeaderboardDifficulty> defaultLeaderboardDifficulty; public static EnumField<DefaultLeaderboardFilter> defaultLeaderboardFilter; private const string CUSTOM_LEVEL_BUTTON_ASSET_PATH = "AngryLevelLoader/UI/CustomLevels.prefab"; private static AngryCustomLevelButtonComponent currentCustomLevelButton; private static RectTransform bossRushButton; private const string ANGRY_UI_PANEL_ASSET_PATH = "AngryLevelLoader/UI/AngryUIPanel.prefab"; public static AngryUIPanelComponent currentPanel; internal static FileSystemWatcher levelsWatcher; internal static FileSystemWatcher scriptsWatcher; private static Task pendingRecordsTask = null; private float lastPress; public static bool NoMonsters { get { if (difficultyField.gamemodeListValueIndex != 1) { return difficultyField.gamemodeListValueIndex == 2; } return true; } } public static bool NoWeapons => difficultyField.gamemodeListValueIndex == 2; public static void LoadLastPlayedMap() { lastPlayed.Clear(); string lastPlayedMapPath = AngryPaths.LastPlayedMapPath; if (!File.Exists(lastPlayedMapPath)) { return; } using StreamReader streamReader = new StreamReader(File.Open(lastPlayedMapPath, FileMode.Open, FileAccess.Read)); while (!streamReader.EndOfStream) { string key = streamReader.ReadLine(); if (streamReader.EndOfStream) { logger.LogWarning((object)"Invalid end of last played map file"); break; } string text = streamReader.ReadLine(); if (long.TryParse(text, out var result)) { lastPlayed[key] = result; } else { logger.LogInfo((object)("Invalid last played time '" + text + "'")); } } } public static void UpdateLastPlayed(AngryBundleContainer bundle) { string bundleGuid = bundle.bundleData.bundleGuid; if (bundleGuid.Length != 32) { return; } if (bundleSortingMode.value == BundleSorting.LastPlayed) { ((ConfigField)bundle.rootPanel).siblingIndex = 0; } long value = ((DateTimeOffset)DateTime.UtcNow).ToUnixTimeSeconds(); lastPlayed[bundleGuid] = value; string lastPlayedMapPath = AngryPaths.LastPlayedMapPath; IOUtils.TryCreateDirectoryForFile(lastPlayedMapPath); using StreamWriter streamWriter = new StreamWriter(File.Open(lastPlayedMapPath, FileMode.OpenOrCreate, FileAccess.Write)); streamWriter.BaseStream.Seek(0L, SeekOrigin.Begin); streamWriter.BaseStream.SetLength(0L); foreach (KeyValuePair<string, long> item in lastPlayed) { streamWriter.WriteLine(item.Key); streamWriter.WriteLine(item.Value.ToString()); } } public static void LoadLastUpdateMap() { lastUpdate.Clear(); string lastUpdateMapPath = AngryPaths.LastUpdateMapPath; if (!File.Exists(lastUpdateMapPath)) { return; } using StreamReader streamReader = new StreamReader(File.Open(lastUpdateMapPath, FileMode.Open, FileAccess.Read)); while (!streamReader.EndOfStream) { string key = streamReader.ReadLine(); if (streamReader.EndOfStream) { logger.LogWarning((object)"Invalid end of last played map file"); break; } string text = streamReader.ReadLine(); if (long.TryParse(text, out var result)) { lastUpdate[key] = result; } else { logger.LogInfo((object)("Invalid last played time '" + text + "'")); } } } public static void UpdateLastUpdate(AngryBundleContainer bundle) { string bundleGuid = bundle.bundleData.bundleGuid; if (bundleGuid.Length != 32) { return; } if (bundleSortingMode.value == BundleSorting.LastUpdate) { ((ConfigField)bundle.rootPanel).siblingIndex = 0; } long value = ((DateTimeOffset)DateTime.UtcNow).ToUnixTimeSeconds(); lastUpdate[bundleGuid] = value; string lastUpdateMapPath = AngryPaths.LastUpdateMapPath; IOUtils.TryCreateDirectoryForFile(lastUpdateMapPath); using StreamWriter streamWriter = new StreamWriter(File.Open(lastUpdateMapPath, FileMode.OpenOrCreate, FileAccess.Write)); streamWriter.BaseStream.Seek(0L, SeekOrigin.Begin); streamWriter.BaseStream.SetLength(0L); foreach (KeyValuePair<string, long> item in lastUpdate) { streamWriter.WriteLine(item.Key); streamWriter.WriteLine(item.Value.ToString()); } } public static AngryBundleContainer GetAngryBundleByGuid(string guid) { return angryBundles.Values.Where((AngryBundleContainer bundle) => bundle.bundleData != null && bundle.bundleData.bundleGuid == guid).FirstOrDefault(); } internal static void OpenFolder(FolderButtonField folderField) { if (folderField == null) { folderField = pathToFolderMap["/"]; } List<AngryBundleContainer> list = folderToBundleMap[folderField]; List<FolderButtonField> list2 = folderToFolderMap[folderField]; foreach (AngryBundleContainer value3 in angryBundles.Values) { ((ConfigField)value3.rootPanel).hidden = true; } foreach (FolderButtonField value4 in pathToFolderMap.Values) { ((ConfigField)value4).hidden = true; } foreach (AngryBundleContainer item in list) { if (item.bundleData != null) { ((ConfigField)item.rootPanel).hidden = false; } } foreach (FolderButtonField item2 in list2) { Stack<FolderButtonField> stack = new Stack<FolderButtonField>(); stack.Push(item2); while (stack.Count != 0) { FolderButtonField key = stack.Pop(); if (folderToBundleMap.TryGetValue(key, out var value) && value.Where((AngryBundleContainer bundle) => bundle.bundleData != null).Any()) { ((ConfigField)item2).hidden = false; break; } if (!folderToFolderMap.TryGetValue(key, out var value2)) { continue; } foreach (FolderButtonField item3 in value2) { stack.Push(item3); } } } if (folderField == pathToFolderMap["/"]) { levelBundlesHeader.text = "Level Bundles"; return; } levelBundlesHeader.text = "Level Bundles <color=grey>" + pathToFolderMap.Where((KeyValuePair<string, FolderButtonField> e) => e.Value == folderField).FirstOrDefault().Key + "</color>"; } private static void UpdateBundleSearch(string newVal) { string[] array = (from keyword in newVal.Split(whitespaceSeparator, StringSplitOptions.RemoveEmptyEntries) select keyword.ToLower()).ToArray(); if (array.Length == currentSearchKeywords.Length && array.SequenceEqual(currentSearchKeywords)) { return; } currentSearchKeywords = array; if (currentSearchKeywords.Length == 0) { ((ConfigField)folderDivision).hidden = false; ((ConfigField)searchInfo).hidden = true; foreach (AngryBundleContainer value in angryBundles.Values) { value.ResetSearch(); } OpenFolder(folderStack.Peek()); return; } ((ConfigField)folderDivision).hidden = true; ((ConfigField)searchInfo).hidden = false; int num = 0; int num2 = 0; foreach (AngryBundleContainer value2 in angryBundles.Values) { if (value2.rootPanel.forceHidden) { continue; } if (value2.bundleData == null) { ((ConfigField)value2.rootPanel).hidden = true; continue; } bool flag = value2.ApplySearch(currentSearchKeywords); ((ConfigField)value2.rootPanel).hidden = !flag; num2++; if (flag) { num++; } } levelBundlesHeader.text = "Level Bundles"; searchInfo.text = $"Showing {num} of {num2} bundles"; } public static void ProcessPath(string path, string folder) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown if (!pathToFolderMap.TryGetValue(folder, out var folderField)) { folderField = new FolderButtonField((ConfigPanel)(object)folderDivision); folderField.folderName = Path.GetFileName(folder); folderField.onPressed.AddListener((UnityAction)delegate { OpenFolder(folderField); folderStack.Push(folderField); }); pathToFolderMap[folder] = folderField; folderToBundleMap[folderField] = new List<AngryBundleContainer>(); folderToFolderMap[folderField] = new List<FolderButtonField>(); string text = folder; FolderButtonField item = folderField; while (text != "/") { string text2 = Path.GetDirectoryName(text).Replace('\\', '/'); bool flag = true; if (!pathToFolderMap.TryGetValue(text2, out var parentFolder)) { flag = false; parentFolder = new FolderButtonField((ConfigPanel)(object)folderDivision); parentFolder.folderName = Path.GetFileName(text2); parentFolder.onPressed.AddListener((UnityAction)delegate { OpenFolder(parentFolder); folderStack.Push(parentFolder); }); pathToFolderMap[text2] = parentFolder; folderToBundleMap[parentFolder] = new List<AngryBundleContainer>(); folderToFolderMap[parentFolder] = new List<FolderButtonField>(); } if (!folderToFolderMap.TryGetValue(parentFolder, out var value)) { value = new List<FolderButtonField>(); folderToFolderMap[parentFolder] = value; } value.Add(item); if (flag) { break; } item = parentFolder; text = text2; } } if (!folderToBundleMap.TryGetValue(folderField, out var value2)) { value2 = new List<AngryBundleContainer>(); folderToBundleMap[folderField] = value2; } if (AngryFileUtils.TryGetAngryBundleData(path, out var data, out var error)) { if (angryBundles.TryGetValue(data.bundleGuid, out var value3)) { if (File.Exists(value3.pathToAngryBundle) && !IOUtils.PathEquals(path, value3.pathToAngryBundle)) { logger.LogError((object)("Duplicate angry files. Original: " + Path.GetFileName(value3.pathToAngryBundle) + ". Duplicate: " + Path.GetFileName(path))); if (!string.IsNullOrEmpty(errorText.text)) { ConfigHeader obj = errorText; obj.text += "\n"; } ConfigHeader val = errorText; val.text = val.text + "<color=red>Error loading " + Path.GetFileName(path) + "</color> Duplicate file, original is " + Path.GetFileName(value3.pathToAngryBundle); return; } bool num = !IOUtils.PathEquals(value3.pathToAngryBundle, path); value3.pathToAngryBundle = path; ((ConfigField)value3.rootPanel).interactable = true; value3.rootPanel.forceHidden = false; ((ConfigField)value3.rootPanel).hidden = false; if (num) { value3.UpdateScenes(forceReload: false, lazyLoad: false); } value2.Add(value3); if (data.bundleVersion < 6) { value3.rootPanel.forceHidden = true; numOfOldBundles++; } return; } AngryBundleContainer angryBundleContainer = new AngryBundleContainer(path, data); angryBundles[data.bundleGuid] = angryBundleContainer; value2.Add(angryBundleContainer); angryBundleContainer.UpdateOrder(); try { if (angryBundleContainer.finalRankScore.value < 0) { logger.LogWarning((object)"Final rank score for the bundle not cached, skipping lazy reload"); angryBundleContainer.UpdateScenes(forceReload: false, lazyLoad: false); } else { angryBundleContainer.UpdateScenes(forceReload: false, lazyLoad: true); } } catch (Exception arg) { logger.LogWarning((object)$"Exception thrown while loading level bundle: {arg}"); if (!string.IsNullOrEmpty(errorText.text)) { ConfigHeader obj2 = errorText; obj2.text += "\n"; } ConfigHeader obj3 = errorText; obj3.text = obj3.text + "<color=red>Error loading " + Path.GetFileNameWithoutExtension(path) + "</color>. Check the logs for more information"; } if (data.bundleVersion < 6) { angryBundleContainer.rootPanel.forceHidden = true; numOfOldBundles++; } } else if (AngryFileUtils.IsV1LegacyFile(path)) { if (!string.IsNullOrEmpty(errorText.text)) { ConfigHeader obj4 = errorText; obj4.text += "\n"; } ConfigHeader obj5 = errorText; obj5.text = obj5.text + "<color=yellow>" + Path.GetFileName(path) + " is a V1 legacy file. Support for legacy files were dropped after 2.5.0</color>"; } else { logger.LogError((object)$"Could not load the bundle at {path}\n{error}"); if (!string.IsNullOrEmpty(errorText.text)) { ConfigHeader obj6 = errorText; obj6.text += "\n"; } ConfigHeader obj7 = errorText; obj7.text = obj7.text + "<color=yellow>Failed to load " + Path.GetFileNameWithoutExtension(path) + "</color>"; } } public static void ScanForLevels() { numOfOldBundles = 0; errorText.text = ""; currentSearchKeywords = new string[0]; ((ConfigField)folderDivision).hidden = false; foreach (AngryBundleContainer value2 in angryBundles.Values) { value2.ResetSearch(); } searchBar.SetValueWithoutNotify(""); if (!Directory.Exists(levelsPath)) { logger.LogWarning((object)("Could not find the Levels folder at " + levelsPath)); errorText.text = "<color=red>Error: </color>Levels folder not found"; return; } if (!pathToFolderMap.TryGetValue("/", out var value)) { value = new FolderButtonField(config.rootPanel); ((ConfigField)value).hidden = true; pathToFolderMap["/"] = value; folderToBundleMap[value] = new List<AngryBundleContainer>(); folderToFolderMap[value] = new List<FolderButtonField>(); } foreach (List<AngryBundleContainer> value3 in folderToBundleMap.Values) { value3.Clear(); } foreach (IOUtils.SubFileInfo item in IOUtils.GetAllFilesRecursive(levelsPath)) { if (item.filePath.EndsWith(".angry")) { ProcessPath(item.filePath, item.subFolder); } } foreach (KeyValuePair<string, FolderButtonField> item2 in pathToFolderMap) { if (item2.Value == value) { continue; } string path2 = Path.Combine(levelsPath, item2.Key.Substring(1)); if (Directory.Exists(path2)) { string text = (from path in Directory.GetFiles(path2) where validImageExts.Contains<string>(Path.GetExtension(path)) select path).FirstOrDefault(); if (!string.IsNullOrEmpty(text)) { item2.Value.CreateIcon(text); continue; } } item2.Value.CreateIcon(new FolderEnumerator(item2.Value)); } if (numOfOldBundles != 0) { if (!string.IsNullOrEmpty(errorText.text)) { ConfigHeader obj = errorText; obj.text += "\n"; } ConfigHeader obj2 = errorText; obj2.text += $"<color=yellow>Hidden {numOfOldBundles} old angry file(s). These files can be deleted at the bottom of the settings page.</color>"; } OpenFolder(value); folderStack.Clear(); folderStack.Push(value); OnlineLevelsManager.UpdateUI(); } public static void SortBundles() { int num = 0; if (bundleSortingMode.value == BundleSorting.Alphabetically) { foreach (AngryBundleContainer item in angryBundles.Values.OrderBy((AngryBundleContainer b) => b.bundleData.bundleName)) { ((ConfigField)item.rootPanel).siblingIndex = num++; } return; } if (bundleSortingMode.value == BundleSorting.Author) { foreach (AngryBundleContainer item2 in angryBundles.Values.OrderBy((AngryBundleContainer b) => b.bundleData.bundleAuthor)) { ((ConfigField)item2.rootPanel).siblingIndex = num++; } return; } if (bundleSortingMode.value == BundleSorting.LastPlayed) { long value2; foreach (AngryBundleContainer item3 in angryBundles.Values.OrderByDescending((AngryBundleContainer b) => lastPlayed.TryGetValue(b.bundleData.bundleGuid, out value2) ? value2 : 0)) { ((ConfigField)item3.rootPanel).siblingIndex = num++; } return; } if (bundleSortingMode.value != BundleSorting.LastUpdate) { return; } long value; foreach (AngryBundleContainer item4 in angryBundles.Values.OrderByDescending((AngryBundleContainer b) => lastUpdate.TryGetValue(b.bundleData.bundleGuid, out value) ? value : 0)) { ((ConfigField)item4.rootPanel).siblingIndex = num++; } } public static void UpdateAllUI() { foreach (AngryBundleContainer value in angryBundles.Values) { if (value.finalRankScore.value < 0) { value.UpdateScenes(forceReload: false, lazyLoad: false); } else { value.UpdateFinalRankUI(); } foreach (LevelContainer value2 in value.levels.Values) { value2.UpdateUI(); } } } public static bool LoadEssentialScripts() { bool result = true; if (ScriptManager.AttemptLoadScriptWithCertificate("AngryLoaderAPI.dll") == ScriptManager.LoadScriptResult.NotFound) { logger.LogError((object)"Required script AngryLoaderAPI.dll not found"); result = false; } else { ScriptManager.ForceLoadScript("AngryLoaderAPI.dll"); } if (ScriptManager.AttemptLoadScriptWithCertificate("RudeLevelScripts.dll") == ScriptManager.LoadScriptResult.NotFound) { logger.LogError((object)"Required script RudeLevelScripts.dll not found"); result = false; } else { ScriptManager.ForceLoadScript("RudeLevelScripts.dll"); } return result; } private static void DisableAllConfig() { Stack<ConfigField> stack = new Stack<ConfigField>(config.rootPanel.GetAllFields()); while (stack.Count != 0) { ConfigField val = stack.Pop(); ConfigPanel val2 = (ConfigPanel)(object)((val is ConfigPanel) ? val : null); if (val2 != null) { ConfigField[] allFields = val2.GetAllFields(); foreach (ConfigField item in allFields) { stack.Push(item); } } val.interactable = false; } } private static void RefreshCatalogOnMainMenu(Scene newScene, LoadSceneMode mode) { if (!(SceneHelper.CurrentScene != "Main Menu")) { if (refreshCatalogOnBoot.value) { OnlineLevelsManager.RefreshAsync(); } SceneManager.sceneLoaded -= RefreshCatalogOnMainMenu; } } private static bool GetUltrapainDifficultySet() { return Plugin.ultrapainDifficulty; } private static bool GetHeavenOrHellDifficultySet() { return Plugin.isHeavenOrHell; } private static void CreateCustomLevelButtonOnMainMenu() { ((MonoBehaviour)instance).StartCoroutine(CreateCustomLevelButtonOnMainMenuAsync()); } [IteratorStateMachine(typeof(<CreateCustomLevelButtonOnMainMenuAsync>d__116))] private static IEnumerator CreateCustomLevelButtonOnMainMenuAsync() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <CreateCustomLevelButtonOnMainMenuAsync>d__116(0); } private static void CreateAngryUI() { ((MonoBehaviour)instance).StartCoroutine(CreateAngryUIAsync()); } [IteratorStateMachine(typeof(<CreateAngryUIAsync>d__120))] private static IEnumerator CreateAngryUIAsync() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <CreateAngryUIAsync>d__120(0); } private static void InitializeFileWatcher() { if (levelsWatcher != null) { return; } levelsWatcher = new FileSystemWatcher(levelsPath); levelsWatcher.SynchronizingObject = CrossThreadInvoker.Instance; levelsWatcher.Changed += delegate(object sender, FileSystemEventArgs e) { string fullPath5 = e.FullPath; foreach (AngryBundleContainer value2 in angryBundles.Values) { if (IOUtils.PathEquals(fullPath5, value2.pathToAngryBundle)) { logger.LogWarning((object)("Bundle " + fullPath5 + " was updated, container notified")); value2.FileChanged(); break; } } }; levelsWatcher.Renamed += delegate(object sender, RenamedEventArgs e) { string fullPath4 = e.FullPath; foreach (AngryBundleContainer value3 in angryBundles.Values) { if (IOUtils.PathEquals(fullPath4, value3.pathToAngryBundle)) { logger.LogWarning((object)("Bundle " + fullPath4 + " was renamed, path updated")); value3.pathToAngryBundle = fullPath4; break; } } }; levelsWatcher.Deleted += delegate(object sender, FileSystemEventArgs e) { string fullPath3 = e.FullPath; foreach (AngryBundleContainer value4 in angryBundles.Values) { if (IOUtils.PathEquals(fullPath3, value4.pathToAngryBundle)) { logger.LogWarning((object)("Bundle " + fullPath3 + " was deleted, unlinked")); value4.pathToAngryBundle = ""; break; } } }; levelsWatcher.Created += delegate(object sender, FileSystemEventArgs e) { string fullPath2 = e.FullPath; if (AngryFileUtils.TryGetAngryBundleData(fullPath2, out var data, out var _) && angryBundles.TryGetValue(data.bundleGuid, out var value) && value.bundleData.bundleGuid == data.bundleGuid && !File.Exists(value.pathToAngryBundle)) { logger.LogWarning((object)("Bundle " + fullPath2 + " was just added, and a container with the same guid had no file linked. Linked, container notified")); value.pathToAngryBundle = fullPath2; value.FileChanged(); } }; levelsWatcher.Filter = "*"; levelsWatcher.IncludeSubdirectories = false; levelsWatcher.EnableRaisingEvents = true; scriptsWatcher = new FileSystemWatcher(ScriptManager.ScriptsPath); scriptsWatcher.SynchronizingObject = CrossThreadInvoker.Instance; scriptsWatcher.Changed += OnScriptChange; scriptsWatcher.Filter = "*"; scriptsWatcher.IncludeSubdirectories = false; scriptsWatcher.EnableRaisingEvents = true; SceneManager.sceneLoaded += delegate(Scene scene, LoadSceneMode mode) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 if ((int)mode != 1 && !AngrySceneManager.isInCustomLevel && !(SceneHelper.CurrentScene != "Main Menu") && instantLoadLevel.value) { instantLoadLevel.value = false; logger.LogInfo((object)"Starting custom level instantly"); ((MonoBehaviour)instance).StartCoroutine(LoadLevelInstantly()); } }; [IteratorStateMachine(typeof(<<InitializeFileWatcher>g__LoadLevelInstantly|123_5>d))] static IEnumerator LoadLevelInstantly() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <<InitializeFileWatcher>g__LoadLevelInstantly|123_5>d(0); } static void OnScriptChange(object sender, FileSystemEventArgs e) { string fullPath = e.FullPath; if (fullPath.EndsWith(".dll") && ScriptManager.ScriptChanged(Path.GetFileName(fullPath))) { logger.LogMessage((object)("Detected script change " + Path.GetFileName(fullPath))); ((MonoBehaviour)instance).StopCoroutine("ShowScriptPrompt"); ((MonoBehaviour)instance).StartCoroutine(ShowScriptPrompt()); } } [IteratorStateMachine(typeof(<<InitializeFileWatcher>g__ShowScriptPrompt|123_7>d))] static IEnumerator ShowScriptPrompt() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <<InitializeFileWatcher>g__ShowScriptPrompt|123_7>d(0); } } private static void InitializeConfig() { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Expected O, but got Unknown //IL_0140: 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) //IL_00c1: Expected O, but got Unknown //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Expected O, but got Unknown //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Expected O, but got Unknown //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Expected O, but got Unknown //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Expected O, but got Unknown //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Expected O, but got Unknown //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Expected O, but got Unknown //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Expected O, but got Unknown //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Expected O, but got Unknown //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Expected O, but got Unknown //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Expected O, but got Unknown //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Expected O, but got Unknown //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Expected O, but got Unknown //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Expected O, but got Unknown //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Expected O, but got Unknown //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Expected O, but got Unknown //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Expected O, but got Unknown //IL_057f: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Expected O, but got Unknown //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0563: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Expected O, but got Unknown //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05cd: Expected O, but got Unknown //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Expected O, but got Unknown //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Unknown result type (might be due to invalid IL or missing references) //IL_05e6: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Unknown result type (might be due to invalid IL or missing references) //IL_05f1: Expected O, but got Unknown //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Expected O, but got Unknown //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_0694: Expected O, but got Unknown //IL_06c7: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Expected O, but got Unknown //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Expected O, but got Unknown //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Expected O, but got Unknown //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0720: Unknown result type (might be due to invalid IL or missing references) //IL_0735: Unknown result type (might be due to invalid IL or missing references) //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_0756: Expected O, but got Unknown //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_0771: Expected O, but got Unknown //IL_0810: Unknown result type (might be due to invalid IL or missing references) //IL_0824: Unknown result type (might be due to invalid IL or missing references) //IL_083f: Unknown result type (might be due to invalid IL or missing references) //IL_0849: Expected O, but got Unknown //IL_085a: Unknown result type (might be due to invalid IL or missing references) //IL_0864: Expected O, but got Unknown //IL_0875: Unknown result type (might be due to invalid IL or missing references) //IL_087f: Expected O, but got Unknown //IL_0890: Unknown result type (might be due to invalid IL or missing references) //IL_089a: Expected O, but got Unknown //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_06fa: Expected O, but got Unknown //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_08ed: Expected O, but got Unknown //IL_0927: Unknown result type (might be due to invalid IL or missing references) //IL_0931: Expected O, but got Unknown //IL_0906: Unknown result type (might be due to invalid IL or missing references) //IL_090b: Unknown result type (might be due to invalid IL or missing references) //IL_0911: Expected O, but got Unknown //IL_0970: Unknown result type (might be due to invalid IL or missing references) //IL_097a: Expected O, but got Unknown //IL_0996: Unknown result type (might be due to invalid IL or missing references) //IL_09a0: Expected O, but got Unknown //IL_094a: Unknown result type (might be due to invalid IL or missing references) //IL_094f: Unknown result type (might be due to invalid IL or missing references) //IL_0955: Expected O, but got Unknown //IL_09d6: Unknown result type (might be due to invalid IL or missing references) //IL_09ea: Unknown result type (might be due to invalid IL or missing references) //IL_0a05: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Expected O, but got Unknown //IL_0a25: Unknown result type (might be due to invalid IL or missing references) //IL_0a2f: Expected O, but got Unknown //IL_0a69: Unknown result type (might be due to invalid IL or missing references) //IL_0a6e: Unknown result type (might be due to invalid IL or missing references) //IL_0a90: Unknown result type (might be due to invalid IL or missing references) //IL_0a9a: Expected O, but got Unknown //IL_0aaa: Unknown result type (might be due to invalid IL or missing references) //IL_0abd: Unknown result type (might be due to invalid IL or missing references) //IL_0ac7: Expected O, but got Unknown //IL_0ada: Unknown result type (might be due to invalid IL or missing references) //IL_0ae4: Expected O, but got Unknown //IL_0af4: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_09be: Unknown result type (might be due to invalid IL or missing references) //IL_09c4: Expected O, but got Unknown //IL_0b5e: Unknown result type (might be due to invalid IL or missing references) //IL_0b63: Unknown result type (might be due to invalid IL or missing references) //IL_0b71: Unknown result type (might be due to invalid IL or missing references) //IL_0b7b: Expected O, but got Unknown //IL_0b0d: Unknown result type (might be due to invalid IL or missing references) //IL_0b12: Unknown result type (might be due to invalid IL or missing references) //IL_0b18: Expected O, but got Unknown //IL_0bba: Unknown result type (might be due to invalid IL or missing references) //IL_0bc0: Expected O, but got Unknown //IL_0b95: Unknown result type (might be due to invalid IL or missing references) //IL_0b9a: Unknown result type (might be due to invalid IL or missing references) //IL_0ba0: Expected O, but got Unknown //IL_0bdb: Unknown result type (might be due to invalid IL or missing references) //IL_0be8: Unknown result type (might be due to invalid IL or missing references) //IL_0bf2: Expected O, but got Unknown //IL_0c02: Unknown result type (might be due to invalid IL or missing references) //IL_0c08: Expected O, but got Unknown //IL_0c1f: Unknown result type (might be due to invalid IL or missing references) //IL_0c29: Expected O, but got Unknown //IL_0c39: Unknown result type (might be due to invalid IL or missing references) //IL_0c47: Unknown result type (might be due to invalid IL or missing references) //IL_0c57: Unknown result type (might be due to invalid IL or missing references) //IL_0c61: Expected O, but got Unknown //IL_0c6b: Unknown result type (might be due to invalid IL or missing references) //IL_0c75: Expected O, but got Unknown //IL_0c7d: Unknown result type (might be due to invalid IL or missing references) //IL_0c87: Expected O, but got Unknown //IL_0c8e: Unknown result type (might be due to invalid IL or missing references) //IL_0c98: Expected O, but got Unknown //IL_0caa: Unknown result type (might be due to invalid IL or missing references) //IL_0cb4: Expected O, but got Unknown //IL_0cc5: Unknown result type (might be due to invalid IL or missing references) //IL_0ccf: Expected O, but got Unknown //IL_0cf2: Unknown result type (might be due to invalid IL or missing references) //IL_0cfc: Expected O, but got Unknown //IL_0d0b: Unknown result type (might be due to invalid IL or missing references) //IL_0d15: Expected O, but got Unknown //IL_0d26: Unknown result type (might be due to invalid IL or missing references) //IL_0d30: Expected O, but got Unknown //IL_0d35: Unknown result type (might be due to invalid IL or missing references) if (config != null) { return; } config = PluginConfigurator.Create("Angry Level Loader", "com.eternalUnion.angryLevelLoader"); PluginConfigurator obj = config; object obj2 = <>c.<>9__124_0; if (obj2 == null) { PostPresetChangeEvent val = delegate { UpdateAllUI(); }; <>c.<>9__124_0 = val; obj2 = (object)val; } obj.postPresetChangeEvent += (PostPresetChangeEvent)obj2; config.SetIconWithURL("file://" + Path.Combine(workingDir, "plugin-icon.png")); newLevelToggle = new BoolField(config.rootPanel, "", "v_newLevelToggle", false); ((ConfigField)newLevelToggle).hidden = true; ConfigPanel rootPanel = config.rootPanel; object obj3 = <>c.<>9__124_1; if (obj3 == null) { OpenPanelEventDelegate val2 = delegate { if (newLevelToggle.value) { newLevelNotifier.text = string.Join("\n", from level in newLevelNotifierLevels.value.Split('`') where !string.IsNullOrEmpty(level) select level into name select "<color=#00FF00>New level: " + name + "</color>"); ((ConfigField)newLevelNotifier).hidden = false; newLevelNotifierLevels.value = ""; } newLevelToggle.value = false; }; <>c.<>9__124_1 = val2; obj3 = (object)val2; } rootPanel.onPannelOpenEvent += (OpenPanelEventDelegate)obj3; newLevelNotifier = new ConfigHeader(config.rootPanel, "<color=#00FF00>New levels are available!</color>", 16); ((ConfigField)newLevelNotifier).hidden = true; levelUpdateNotifier = new ConfigHeader(config.rootPanel, "<color=#00FF00>Level updates available!</color>", 16); ((ConfigField)levelUpdateNotifier).hidden = true; OnlineLevelsManager.onlineLevelsPanel = new ConfigPanel(internalConfig.rootPanel, "Online Levels", "b_onlineLevels", (PanelFieldType)1); new ConfigBridge((ConfigField)(object)OnlineLevelsManager.onlineLevelsPanel, config.rootPanel); OnlineLevelsManager.onlineLevelsPanel.SetIconWithURL("file://" + Path.Combine(workingDir, "online-icon.png")); ConfigPanel onlineLevelsPanel = OnlineLevelsManager.onlineLevelsPanel; object obj4 = <>c.<>9__124_2; if (obj4 == null) { OpenPanelEventDelegate val3 = delegate { ((ConfigField)newLevelNotifier).hidden = true; }; <>c.<>9__124_2 = val3; obj4 = (object)val3; } onlineLevelsPanel.onPannelOpenEvent += (OpenPanelEventDelegate)obj4; OnlineLevelsManager.Init(); leaderboardsDivision = new ConfigDivision(config.rootPanel, "leaderboardsDivision"); ((ConfigField)leaderboardsDivision).hidden = !leaderboardToggle.value; bannedModsPanel = new ConfigPanel((ConfigPanel)(object)leaderboardsDivision, "Leaderboard banned mods", "bannedModsPanel", (PanelFieldType)1); bannedModsPanel.SetIconWithURL("file://" + Path.Combine(workingDir, "banned-mods-icon.png")); ((ConfigField)bannedModsPanel).hidden = true; bannedModsText = new ConfigHeader(bannedModsPanel, "", 24, (TextAnchor)3); pendingRecords = new ConfigPanel((ConfigPanel)(object)leaderboardsDivision, "Pending records", "pendingRecords", (PanelFieldType)1); pendingRecords.SetIconWithURL("file://" + Path.Combine(workingDir, "pending.png")); sendPendingRecords = new ButtonField(pendingRecords, "Send Pending Records", "sendPendingRecordsButton"); ButtonField obj5 = sendPendingRecords; object obj6 = <>O.<1>__ProcessPendingRecords; if (obj6 == null) { OnClick val4 = ProcessPendingRecords; <>O.<1>__ProcessPendingRecords = val4; obj6 = (object)val4; } obj5.onClick += (OnClick)obj6; pendingRecordsStatus = new ConfigHeader(pendingRecords, "", 20, (TextAnchor)3); new ConfigSpace(pendingRecords, 5f); pendingRecordsInfo = new ConfigHeader(pendingRecords, "", 18, (TextAnchor)3); UpdatePendingRecordsUI(); difficultyField = new DifficultyField(config.rootPanel); bundleSortingMode = new EnumField<BundleSorting>(internalConfig.rootPanel, "Bundle sorting", "s_bundleSortingMode", BundleSorting.LastPlayed); bundleSortingMode.onValueChange += delegate(EnumValueChangeEvent<BundleSorting> e) { bundleSortingMode.value = e.value; SortBundles(); }; bundleSortingMode.SetEnumDisplayName(BundleSorting.LastPlayed, "Last Played"); bundleSortingMode.SetEnumDisplayName(BundleSorting.LastUpdate, "Last Update"); new ConfigBridge((ConfigField)(object)bundleSortingMode, config.rootPanel); ConfigHeader difficultyOverrideWarning = new ConfigHeader(config.rootPanel, "Difficulty is overridden by gamemode\nWarning: Some levels may not be compatible with gamemodes", 18); difficultyOverrideWarning.textColor = Color.yellow; ((ConfigField)difficultyOverrideWarning).hidden = true; DifficultyField obj7 = difficultyField; obj7.postDifficultyChange = (PostStringListValueChangeEvent)Delegate.Combine((Delegate?)(object)obj7.postDifficultyChange, (Delegate?)(PostStringListValueChangeEvent)delegate(string difficultyName, int difficultyIndex) { selectedDifficulty = Array.IndexOf(difficultyList.ToArray(), difficultyName); if (selectedDifficulty == -1) { logger.LogWarning((object)"Invalid difficulty, setting to violent"); selectedDifficulty = 3; difficultyField.difficultyListValue = "VIOLENT"; } else if (difficultyName == "ULTRAPAIN") { selectedDifficulty = 100; } else if (difficultyName == "HEAVEN OR HELL") { selectedDifficulty = 101; } if (difficultyField.gam
plugins/AngryLevelLoader/AngryUiComponents.dll
Decompiled 3 days agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("AngryUiComponents")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+6e986bb6ae04fcaed5311f603b6e92a7a1d74c0b")] [assembly: AssemblyProduct("AngryUiComponents")] [assembly: AssemblyTitle("AngryUiComponents")] [assembly: AssemblyVersion("1.0.0.0")] namespace AngryUiComponents; public class AngryCustomLevelButtonComponent : MonoBehaviour { public RectTransform rect; public Button button; public Image background; public TextMeshProUGUI text; } public class AngryDeleteBundleNotificationComponent : MonoBehaviour { public Text body; public Text bundleName; public Image bundleIcon; public Button cancelButton; public Button deleteButton; public Text deleteText; } public class AngryDeleteOldBundlesNotificationComponent : MonoBehaviour { public Text body; public Button cancelButton; public Text cancelButtonText; public Button deleteButton; public Text deleteButtonText; public GameObject loadingCircle; public Text deletionProgress; public Text deletionLog; } public class AngryDifficultyFieldComponent : MonoBehaviour { public CanvasGroup group; public Dropdown difficultyList; public Dropdown gamemodeList; } public class AngryEpilepsyWarningNotificationComponent : MonoBehaviour { public Button cancelButton; public Button continueButton; public Text continueButtonText; public Button continueAndIgnoreButton; public Text continueAndIgnoreButtonText; } public class AngryFolderButtonComponent : MonoBehaviour { public TextMeshProUGUI folderName; public Button folderButton; public RawImage folderIcon; } public class AngryLeaderboardNotificationComponent : MonoBehaviour { public Text header; public Dropdown category; public Dropdown difficulty; public Dropdown group; public GameObject localUserRecordContainer; public RawImage localUserPfp; public Text localUserRank; public Text localUserName; public Text localUserTime; public GameObject recordEnabler; public Transform recordContainer; public AngryLeaderboardRecordEntryComponent recordTemplate; public GameObject pageText; public Button nextPage; public Button prevPage; public InputField pageInput; public Button closeButton; public GameObject refreshCircle; public Text failMessage; public Button refreshButton; public GameObject reportToggle; public GameObject reportFormToggle; public GameObject reportResultToggle; public Text reportBody; public GameObject reportLoadCircle; public Toggle inappropriateName; public Toggle inappropriatePicture; public Toggle cheatedScore; public Toggle reportValidation; public Button reportCancel; public Button reportSend; public Button reportReturn; } public class AngryLeaderboardPermissionNotificationComponent : MonoBehaviour { public Button cancelButton; public Button okButton; } public class AngryLeaderboardRecordEntryComponent : MonoBehaviour { public Text rank; public Text username; public Text time; public RawImage profile; public Button reportButton; } public class AngryLevelFieldComponent : MonoBehaviour { private class OnDisableCallback : MonoBehaviour { public Action callback; private void OnDisable() { if (callback != null) { callback(); } } } [CompilerGenerated] private sealed class <>c__DisplayClass41_0 { public Action cb; internal void <ResetButtonCoroutine>b__0() { if (cb != null) { cb(); } } } [CompilerGenerated] private sealed class <ResetButtonCoroutine>d__41 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Action cb; public Button btn; public TextMeshProUGUI txt; private <>c__DisplayClass41_0 <>8__1; private int <i>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ResetButtonCoroutine>d__41(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass41_0(); <>8__1.cb = cb; ((Selectable)btn).interactable = false; <i>5__2 = 3; break; case 1: <>1__state = -1; <i>5__2--; break; } if (<i>5__2 >= 1) { ((TMP_Text)txt).text = $"Are you sure? ({<i>5__2})"; <>2__current = (object)new WaitForSecondsRealtime(1f); <>1__state = 1; return true; } ((TMP_Text)txt).text = "<color=red>Are you sure?</color>"; ((Selectable)btn).interactable = true; btn.onClick = new ButtonClickedEvent(); ((UnityEvent)btn.onClick).AddListener((UnityAction)delegate { if (<>8__1.cb != null) { <>8__1.cb(); } }); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public Text levelHeader; public Image fieldImage; public RectTransform statContainer; public Image statContainerImage; public Text[] headers; public Text timeText; public Text killText; public Text styleText; public Text secretsText; public Text secretsHeader; public GameObject secretsIconContainer; public Image[] secretsIcons; public GameObject settingsPanel; public Button openSettingsButton; public Button closeSettingsButton; public Button resetStatsButton; public TextMeshProUGUI resetStatsText; public Button resetSecretsButton; public TextMeshProUGUI resetSecretsText; public Button resetChallengeButton; public TextMeshProUGUI resetChallengeText; public Button resetLevelVarsButton; public TextMeshProUGUI resetLevelVarsText; public Button resetBundleVarsButton; public TextMeshProUGUI resetBundleVarsText; public Button resetUserVarsButton; public TextMeshProUGUI resetUserVarsText; public Action onResetStats; public Action onResetSecrets; public Action onResetChallenge; public Action onResetLevelVars; public Action onResetBundleVars; public Action onResetUserVars; public Image finalRankContainerImage; public Text finalRankText; public RectTransform challengeContainer; public Image challengeContainerImage; public Text challengeText; public Image levelThumbnail; public Button levelButton; public Button leaderboardsButton; private void Awake() { settingsPanel.AddComponent<OnDisableCallback>().callback = delegate { ((MonoBehaviour)this).StopAllCoroutines(); }; ResetSettingsButtons(); } public void ResetSettingsButtons() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown resetStatsButton.onClick = new ButtonClickedEvent(); ((UnityEvent)resetStatsButton.onClick).AddListener(new UnityAction(OnResetStats)); resetSecretsButton.onClick = new ButtonClickedEvent(); ((UnityEvent)resetSecretsButton.onClick).AddListener(new UnityAction(OnResetSecrets)); resetChallengeButton.onClick = new ButtonClickedEvent(); ((UnityEvent)resetChallengeButton.onClick).AddListener(new UnityAction(OnResetChallenge)); resetLevelVarsButton.onClick = new ButtonClickedEvent(); ((UnityEvent)resetLevelVarsButton.onClick).AddListener(new UnityAction(OnResetLevelVars)); resetBundleVarsButton.onClick = new ButtonClickedEvent(); ((UnityEvent)resetBundleVarsButton.onClick).AddListener(new UnityAction(OnResetBundleVars)); resetUserVarsButton.onClick = new ButtonClickedEvent(); ((UnityEvent)resetUserVarsButton.onClick).AddListener(new UnityAction(onResetUserVars.Invoke)); } public void OnResetStats() { ((Selectable)resetStatsButton).interactable = false; ((MonoBehaviour)this).StartCoroutine(ResetButtonCoroutine(resetStatsButton, resetStatsText, onResetStats)); } public void OnResetSecrets() { ((Selectable)resetSecretsButton).interactable = false; ((MonoBehaviour)this).StartCoroutine(ResetButtonCoroutine(resetSecretsButton, resetSecretsText, onResetSecrets)); } public void OnResetChallenge() { ((Selectable)resetChallengeButton).interactable = false; ((MonoBehaviour)this).StartCoroutine(ResetButtonCoroutine(resetChallengeButton, resetChallengeText, onResetChallenge)); } public void OnResetLevelVars() { ((Selectable)resetLevelVarsButton).interactable = false; ((MonoBehaviour)this).StartCoroutine(ResetButtonCoroutine(resetLevelVarsButton, resetLevelVarsText, onResetLevelVars)); } public void OnResetBundleVars() { ((Selectable)resetBundleVarsButton).interactable = false; ((MonoBehaviour)this).StartCoroutine(ResetButtonCoroutine(resetBundleVarsButton, resetBundleVarsText, onResetBundleVars)); } [IteratorStateMachine(typeof(<ResetButtonCoroutine>d__41))] private IEnumerator ResetButtonCoroutine(Button btn, TextMeshProUGUI txt, Action cb) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ResetButtonCoroutine>d__41(0) { btn = btn, txt = txt, cb = cb }; } } public class AngryLevelUpdateNotificationComponent : MonoBehaviour { public Text body; public Button cancel; public Button update; } public class AngryOnlineLevelFieldComponent : MonoBehaviour { public RawImage thumbnail; public Text infoText; public Button changelog; public Button install; public Button update; public Button cancel; public Button upvoteButton; public Image upvoteImage; public Button downvoteButton; public Image downvoteImage; public Text votes; public RectTransform downloadContainer; public Text progressText; public RectTransform progressBar; } public class AngryPluginChangelogNotificationComponent : MonoBehaviour { public Text header; public Text text; public Button cancel; public Button ignoreUpdate; } public class AngryReloadBundlePromptComponent : MonoBehaviour { public CanvasGroup division; public AudioSource audio; public Text text; public Button ignoreButton; public Button reloadButton; private bool transparent; private const float TARGET_ALPHA = 0.6f; public void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown ignoreButton.onClick = new ButtonClickedEvent(); ((UnityEvent)ignoreButton.onClick).AddListener((UnityAction)delegate { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown reloadButton.onClick = new ButtonClickedEvent(); ((Component)this).gameObject.SetActive(false); }); } public void MakeTransparent(bool instant) { transparent = true; if (instant) { division.alpha = 0.6f; } } public void MakeOpaque(bool instant) { transparent = false; if (instant) { division.alpha = 1f; } } public void Update() { if (transparent && division.alpha != 0.6f) { division.alpha = Mathf.MoveTowards(division.alpha, 0.6f, Time.unscaledDeltaTime * 2f); } else if (!transparent && division.alpha != 1f) { division.alpha = Mathf.MoveTowards(division.alpha, 1f, Time.unscaledDeltaTime * 2f); } } } public class AngryReloadScriptPromptComponent : MonoBehaviour { public CanvasGroup division; public AudioSource audio; public Text text; public Button ignoreButton; public Button reloadButton; private bool transparent; private const float TARGET_ALPHA = 0.6f; public void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown ignoreButton.onClick = new ButtonClickedEvent(); ((UnityEvent)ignoreButton.onClick).AddListener((UnityAction)delegate { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown reloadButton.onClick = new ButtonClickedEvent(); ((Component)this).gameObject.SetActive(false); }); } public void MakeTransparent(bool instant) { transparent = true; if (instant) { division.alpha = 0.6f; } } public void MakeOpaque(bool instant) { transparent = false; if (instant) { division.alpha = 1f; } } public void Update() { if (transparent && division.alpha != 0.6f) { division.alpha = Mathf.MoveTowards(division.alpha, 0.6f, Time.unscaledDeltaTime * 2f); } else if (!transparent && division.alpha != 1f) { division.alpha = Mathf.MoveTowards(division.alpha, 1f, Time.unscaledDeltaTime * 2f); } } } public class AngryResetUserMapVarNotificationComponent : MonoBehaviour { public GameObject notFoundText; public AngryResetUserMapVarNotificationElementComponent template; public Button exitButton; public AngryResetUserMapVarNotificationElementComponent CreateTemplate() { GameObject obj = Object.Instantiate<GameObject>(((Component)template).gameObject, ((Component)template).transform.parent); obj.SetActive(true); return obj.GetComponent<AngryResetUserMapVarNotificationElementComponent>(); } } public class AngryResetUserMapVarNotificationElementComponent : MonoBehaviour { [CompilerGenerated] private sealed class <>c__DisplayClass5_0 { public Action cb; internal void <ResetButtonCoroutine>b__0() { if (cb != null) { cb(); } } } [CompilerGenerated] private sealed class <ResetButtonCoroutine>d__5 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Action cb; public Button btn; public TextMeshProUGUI txt; private <>c__DisplayClass5_0 <>8__1; private int <i>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ResetButtonCoroutine>d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass5_0(); <>8__1.cb = cb; ((Selectable)btn).interactable = false; <i>5__2 = 3; break; case 1: <>1__state = -1; <i>5__2--; break; } if (<i>5__2 >= 1) { ((TMP_Text)txt).text = $"Are you sure? ({<i>5__2})"; <>2__current = (object)new WaitForSecondsRealtime(1f); <>1__state = 1; return true; } ((TMP_Text)txt).text = "<color=red>Are you sure?</color>"; ((Selectable)btn).interactable = true; btn.onClick = new ButtonClickedEvent(); ((UnityEvent)btn.onClick).AddListener((UnityAction)delegate { if (<>8__1.cb != null) { <>8__1.cb(); } }); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public TextMeshProUGUI id; public Button resetButton; public TextMeshProUGUI resetButtonText; public Action onReset; public void SetButton() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown ((TMP_Text)resetButtonText).text = "Reset"; resetButton.onClick = new ButtonClickedEvent(); ((UnityEvent)resetButton.onClick).AddListener((UnityAction)delegate { ((MonoBehaviour)this).StartCoroutine(ResetButtonCoroutine(resetButton, resetButtonText, onReset)); }); } [IteratorStateMachine(typeof(<ResetButtonCoroutine>d__5))] private IEnumerator ResetButtonCoroutine(Button btn, TextMeshProUGUI txt, Action cb) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ResetButtonCoroutine>d__5(0) { btn = btn, txt = txt, cb = cb }; } } public class AngryScriptUpdateNotificationComponent : MonoBehaviour { public Transform content; public Button cancel; public Button update; public Button continueButton; } public class AngryScriptWarningNotificationComponent : MonoBehaviour { public Text header; public Text body; public Button topButton; public Text topButtonText; public Button leftButton; public Text leftButtonText; public Button rightButton; public Text rightButtonText; } public class AngryUIPanelComponent : MonoBehaviour { public AngryReloadBundlePromptComponent reloadBundlePrompt; public AngryReloadScriptPromptComponent reloadScriptPrompt; }
plugins/AngryLevelLoader/RudeLevelScripts.Essentials.dll
Decompiled 3 days agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using UnityEngine; using UnityEngine.Events; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("RudeLevelScripts.Essentials")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+6e986bb6ae04fcaed5311f603b6e92a7a1d74c0b")] [assembly: AssemblyProduct("RudeLevelScripts.Essentials")] [assembly: AssemblyTitle("RudeLevelScripts.Essentials")] [assembly: AssemblyVersion("1.0.0.0")] namespace RudeLevelScript { public class FinalRoomTarget : MonoBehaviour { [Tooltip("If a valid Unique ID of a Rude Level Data is written, the level will be loaded. This ID can be in other bundles. If the id is invalid or the level is not available, returns to the main menu")] public string targetLevelUniqueId = ""; } [CreateAssetMenu] public class RudeLevelData : ScriptableObject { [SerializeField] [Tooltip("Scene which belongs to the data")] public Object targetScene; [SerializeField] [HideInInspector] public string[] requiredDllNames; [HideInInspector] public string scenePath = ""; [Header("Level Locator")] [Tooltip("This ID is used to reference the level externally, such as final pit targets or activasion scripts. This field must not match any other data's id even accross bundles. Strong naming suggested, such as including author name in the id")] public string uniqueIdentifier = ""; [Space(10f)] [Header("Level Info")] [Tooltip("Name which will be displayed on angry")] public string levelName = ""; [Tooltip("If the level is secret and uses FirstRoomSecret variant, set to true. Enabling this field will disable rank and challenge panel on angry side")] public bool isSecretLevel; [Tooltip("Order of the level in angry. Lower valued levels are at the top")] public int prefferedLevelOrder; [Tooltip("Sprite containing the level thumbnail. Label the sprite as well")] public Sprite levelPreviewImage; [Space(10f)] [Tooltip("Enablind this field will hide the level from angry until accessed by a final pit. Implemented for secret levels")] public bool hideIfNotPlayed; [Tooltip("The level IDs required to be completed before the level can be played. If one of the level ID's are not completed, level will be locked")] public string[] requiredCompletedLevelIdsForUnlock; [Space(10f)] public bool levelChallengeEnabled; public string levelChallengeText = ""; [Tooltip("Set exactly to the number of secret bonuses in the level")] public int secretCount; public bool doNotHideLevelPreviewWhenNotCompleted; } } namespace RudeLevelScripts { public class RudeMapVarHandler : MonoBehaviour { [Header("This is the id of the file to register the list of MapVars below with. Keep in mind, fileID's are not bundle or level specific.", order = 0)] [Header("With this in mind, please use an id that is unique to you.", order = 1)] public string fileID; [Space(10f)] [Header("Every MapVar key you list here will be registered to be set/read from the provided fileID. ", order = 2)] [Header("For any MapVarSetter components that use keys in this list,", order = 3)] [Header("their persistence setting will be ignored and it will only read/write to the provided fileID.", order = 4)] public List<string> varList; private const int MAX_FILE_NAME_LENGTH = 48; public bool IsValid() { if (string.IsNullOrEmpty(fileID) || string.IsNullOrWhiteSpace(fileID)) { Debug.LogError((object)("(" + ((Object)this).name + ") RudeMapVarHandler.fileID is empty, null, or whitespace.")); return false; } if (fileID.IndexOfAny(Path.GetInvalidFileNameChars()) != -1) { Debug.LogError((object)("(" + ((Object)this).name + ") RudeMapVarHandler.fileID contains invalid characters.")); return false; } if (fileID.Length > 48) { Debug.LogError((object)string.Format("({0}) {1}.{2} is too long. Max length is {3} characters.", ((Object)this).name, "RudeMapVarHandler", "fileID", 48)); return false; } return true; } private void OnValidate() { if (fileID == null) { fileID = Guid.NewGuid().ToString(); } char[] invalidFileNameChars = Path.GetInvalidFileNameChars(); if (fileID.IndexOfAny(invalidFileNameChars) != -1) { Debug.LogError((object)"RudeMapVarHandler: fileID of RudeMapVarHandler contains invalid characters."); for (int i = 0; i < invalidFileNameChars.Length; i++) { fileID = fileID.Replace(invalidFileNameChars[i], '_'); } } if (fileID.Length > 48) { fileID = fileID.Substring(0, Mathf.Min(fileID.Length, 48)); } } } } namespace RudeLevelScripts.Essentials { public class ExecuteOnSceneLoad : MonoBehaviour { [Tooltip("Lower value ExecuteOnSceneLoad are executed first")] public int relativeExecutionOrder; public UnityEvent onSceneLoad; public void Execute() { if (onSceneLoad != null) { onSceneLoad.Invoke(); } } } public class IgnoreSecret : MonoBehaviour { } [CreateAssetMenu] public class RudeBundleData : ScriptableObject { [Tooltip("Will be shown on the angry bundle list")] public string bundleName; [Tooltip("Will be shown below the bundle name")] public string author; [Tooltip("Icon shown right next to the level name. Must be in png format. If not square, gets cropped")] public Sprite levelIcon; [Tooltip("Flag this field if the bundle contains levels that contains seizure inducing elements")] public bool epilepsyWarning; } }
plugins/AngryLevelLoader/Scripts/AngryLoaderAPI.dll
Decompiled 3 days agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using AngryLevelLoader; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("AngryLoaderAPI")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+2ed167fd86898929f4ec4cbc693237a4b2467ce7")] [assembly: AssemblyProduct("AngryLoaderAPI")] [assembly: AssemblyTitle("AngryLoaderAPI")] [assembly: AssemblyVersion("1.0.0.0")] namespace AngryLoaderAPI; public static class BundleInterface { public static bool BundleExists(string bundleGuid) { return RudeBundleInterface.BundleExists(bundleGuid); } public static string GetBundleBuildHash(string bundleGuid) { return RudeBundleInterface.GetBundleBuildHash(bundleGuid); } } public static class LevelInterface { public static char INCOMPLETE_LEVEL_CHAR = RudeLevelInterface.INCOMPLETE_LEVEL_CHAR; public static char GetLevelRank(string levelId) { return RudeLevelInterface.GetLevelRank(levelId); } public static bool GetLevelChallenge(string levelId) { return RudeLevelInterface.GetLevelChallenge(levelId); } public static bool GetLevelSecret(string levelId, int secretIndex) { return RudeLevelInterface.GetLevelSecret(levelId, secretIndex); } public static string GetCurrentLevelId() { return RudeLevelInterface.GetCurrentLevelId(); } }
plugins/AngryLevelLoader/Scripts/RudeLevelScripts.dll
Decompiled 3 days agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AngryLoaderAPI; using RudeLevelScript; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("RudeLevelScripts")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+2ed167fd86898929f4ec4cbc693237a4b2467ce7")] [assembly: AssemblyProduct("RudeLevelScripts")] [assembly: AssemblyTitle("RudeLevelScripts")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace RudeLevelScript { [Serializable] public class LayerInfo { public string layerName = ""; public string[] layerLevels = new string[0]; } public class FirstRoomSpawner : MonoBehaviour, ISerializationCallbackReceiver { [HideInInspector] internal class PlayerForcedMovement : MonoBehaviour { public NewMovement player; private Rigidbody rb; public static float defaultMoveForce = 67f; public float force = defaultMoveForce; public void Awake() { if ((Object)(object)player == (Object)null) { player = MonoSingleton<NewMovement>.Instance; } rb = ((Component)player).GetComponent<Rigidbody>(); rb.useGravity = false; } public void LateUpdate() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) rb.velocity = new Vector3(0f, force, 0f); } public void DestroyComp() { rb.useGravity = true; Object.Destroy((Object)(object)this); } } [HideInInspector] private class LocalMoveTowards : MonoBehaviour { public Vector3 targetLocalPosition; public bool active; public float speed = 10f; public void Update() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) if (active) { ((Component)this).transform.localPosition = Vector3.MoveTowards(((Component)this).transform.localPosition, targetLocalPosition, Time.deltaTime * speed); if (((Component)this).transform.localPosition == targetLocalPosition) { Object.Destroy((Object)(object)this); } } } public void Activate() { active = true; } } [HideInInspector] private class CustomHellmapCursor : MonoBehaviour { public Vector2 targetPosition; public Image targetImage; public AudioSource aud; private bool white = true; private RectTransform rect; private void Start() { rect = ((Component)this).GetComponent<RectTransform>(); ((MonoBehaviour)this).Invoke("FlashImage", 0.075f); } private void Update() { //IL_000c: 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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) rect.anchoredPosition = Vector2.MoveTowards(rect.anchoredPosition, targetPosition, Time.deltaTime * 4f * Vector3.Distance(Vector2.op_Implicit(rect.anchoredPosition), Vector2.op_Implicit(targetPosition))); } private void FlashImage() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (white) { white = false; ((Graphic)targetImage).color = new Color(0f, 0f, 0f, 0f); if (!((Component)this).gameObject.activeSelf) { return; } aud.Play(); } else { white = true; ((Graphic)targetImage).color = Color.white; } if (((Component)this).gameObject.activeInHierarchy) { ((MonoBehaviour)this).Invoke("FlashImage", 0.075f); } } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__36_5; public static Func<GameObject, Transform> <>9__37_1; public static Func<GameObject, OnLevelStart> <>9__37_2; public static Func<GameObject, bool> <>9__37_4; internal void <ConvertToAscendingFirstRoom>b__36_5() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MonoSingleton<StatsManager>.instance.spawnPos = ((Component)MonoSingleton<NewMovement>.instance).transform.position; } internal Transform <Spawn>b__37_1(GameObject go) { return go.transform; } internal OnLevelStart <Spawn>b__37_2(GameObject go) { return go.GetComponent<OnLevelStart>(); } internal bool <Spawn>b__37_4(GameObject o) { return ((Object)o).name == "Canvas"; } } [Tooltip("Player will be moved to this position if the room is not ascending variant. If null, default position is used")] public Transform playerSpawnPos; [Tooltip("If set to true, room will not be deleted. Else, it will be replaced in game")] public bool doNotReplace; [Header("Replace Settings")] [Tooltip("Enabling this field causes room to be spawned as the secret variant")] public bool secretRoom; [Tooltip("Enabling this field causes room to be spawned as the prime variant")] public bool primeRoom; [Tooltip("Enabling this field causes room to be spawned as the encore variant")] public bool encoreRoom; [HideInInspector] [Tooltip("Enabling this field causes the whole room to be converted into the ascending variant where the player is spawned at the bottom and ascends upwards instead of falling")] public bool convertToUpwardRoom; [HideInInspector] [Tooltip("This clip will be played when the trap door closes beneath the player for ascending rooms")] public AudioClip upwardRoomDoorCloseClip; [HideInInspector] [Tooltip("If bottom part of the ascending room collides with out of bounds triggers, this list can temporarely disable them while the player is ascending")] public List<GameObject> upwardRoomOutOfBoundsToDisable; [Header("Player Fields")] [Space(10f)] public CameraClearFlags cameraFillMode = (CameraClearFlags)2; public Color backgroundColor = Color.black; [Header("Level Fields")] [Space(10f)] [Tooltip("If set to true, level title will be displayed when the door is opened")] public bool displayLevelTitle = true; [Tooltip("If set to true, music will start when the door is opened")] public bool startMusic = true; [Header("Hellmap")] [Tooltip("Enable the layer and level map when the player spawn")] [Space(10f)] public bool enableHellMap; [Tooltip("Sound clip which is played for each beep while falling")] public AudioClip hellmapBeepClip; [Tooltip("Each layer has a layer name and number of levels. For limbo the header is LIMBO and levels are [1-1, 1-2, 1-3, 1-4]")] public List<LayerInfo> layersAndLevels = new List<LayerInfo>(); [HideInInspector] public List<int> levelSizes = new List<int>(); [HideInInspector] public List<string> layerNames = new List<string>(); [HideInInspector] public List<string> levelNames = new List<string>(); [Tooltip("Which layer the cursor starts from. First layer is 0 and at the top")] public int layerIndexToStartFrom; [Tooltip("Which level in the layer the cursor starts from. The first level is 0 and is just below the layer title (the uppermost level)")] public int levelIndexToStartFrom; [Tooltip("Which layer the cursor ends at. First layer is 0 and at the top")] public int layerIndexToEndAt; [Tooltip("Which level in the layer the cursor ends at. The first level is 0 and is just below the layer title (the uppermost level)")] public int levelIndexToEndAt; private bool spawned; public static float upDisablePos = 60f; public static float doorClosePos = 10f; public static float doorCloseSpeed = 10f; public static float actDelay = 0.5f; public static float ascendingPlayerSpawnPos = -55f; public void OnBeforeSerialize() { levelSizes.Clear(); layerNames.Clear(); levelNames.Clear(); for (int i = 0; i < layersAndLevels.Count; i++) { layerNames.Add(layersAndLevels[i].layerName); levelSizes.Add(layersAndLevels[i].layerLevels.Length); levelNames.AddRange(layersAndLevels[i].layerLevels); } } public void Deserialize() { layersAndLevels.Clear(); int num = 0; for (int i = 0; i < levelSizes.Count; i++) { LayerInfo layerInfo = new LayerInfo(); layerInfo.layerName = layerNames[i]; int num2 = levelSizes[i]; layerInfo.layerLevels = new string[num2]; for (int j = 0; j < num2; j++) { layerInfo.layerLevels[j] = levelNames[num++]; } layersAndLevels.Add(layerInfo); } } public void OnAfterDeserialize() { } private static Text MakeText(Transform parent) { //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) //IL_0011: 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) GameObject val = new GameObject(); ((Transform)val.AddComponent<RectTransform>()).SetParent(parent); val.transform.localScale = Vector3.one; return val.AddComponent<Text>(); } private static RectTransform MakeRect(Transform parent) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) RectTransform obj = new GameObject().AddComponent<RectTransform>(); ((Transform)obj).SetParent(parent); return obj; } public static void ConvertToAscendingFirstRoom(GameObject firstRoom, AudioClip doorCloseAud, List<GameObject> toEnable, List<GameObject> toDisable, bool doNotReplace) { //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_032f: 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_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Expected O, but got Unknown //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Expected O, but got Unknown //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Expected O, but got Unknown //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0462: 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_0481: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: 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_04f1: Expected O, but got Unknown //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Expected O, but got Unknown //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Expected O, but got Unknown //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Expected O, but got Unknown //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Expected O, but got Unknown //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Expected O, but got Unknown //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Expected O, but got Unknown //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05c2: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Expected O, but got Unknown Transform val = firstRoom.transform.Find("Room"); if (!doNotReplace) { Transform obj = val.Find("Pit (3)"); ((Component)obj).transform.localPosition = new Vector3(0f, 2f, 41.72f); ((Component)obj).transform.localRotation = Quaternion.Euler(0f, 0f, 180f); Object.Destroy((Object)(object)((Component)((Component)val).transform.Find("Room/Ceiling")).gameObject); Transform val2 = ((Component)val).transform.Find("Room/Floor"); GameObject gameObject = ((Component)val2.GetChild(0)).gameObject; GameObject obj2 = Object.Instantiate<GameObject>(gameObject, val2); obj2.transform.localPosition = new Vector3(-15f, 9.7f, 20.28f); obj2.transform.localRotation = Quaternion.identity; GameObject obj3 = Object.Instantiate<GameObject>(gameObject, val2); obj3.transform.localPosition = new Vector3(5f, 9.7f, 20.28f); obj3.transform.localRotation = Quaternion.identity; GameObject obj4 = Object.Instantiate<GameObject>(gameObject, val2); obj4.transform.localPosition = new Vector3(-5f, 9.7f, 0.2f); obj4.transform.localRotation = Quaternion.Euler(0f, -90f, 0f); GameObject obj5 = Object.Instantiate<GameObject>(gameObject, val2); obj5.transform.localPosition = new Vector3(5f, 9.7f, 10.28f); obj5.transform.localRotation = Quaternion.identity; ((Renderer)obj5.GetComponent<MeshRenderer>()).materials = (Material[])(object)new Material[2] { Utils.metalDec20, Utils.metalDec20 }; GameObject obj6 = Object.Instantiate<GameObject>(gameObject, val2); obj6.transform.localPosition = new Vector3(-15f, 9.7f, 10.28f); obj6.transform.localRotation = Quaternion.identity; ((Renderer)obj6.GetComponent<MeshRenderer>()).materials = (Material[])(object)new Material[2] { Utils.metalDec20, Utils.metalDec20 }; GameObject obj7 = Object.Instantiate<GameObject>(gameObject, val2); obj7.transform.localPosition = new Vector3(-5f, -0.3f, 20.28f); obj7.transform.localRotation = Quaternion.Euler(0f, -90f, -180f); } Transform child = val.Find("Decorations").GetChild(12); child.localPosition = new Vector3(-5f, 2f, 52f); LocalMoveTowards floorMover = ((Component)child).gameObject.AddComponent<LocalMoveTowards>(); floorMover.targetLocalPosition = new Vector3(-5f, 2f, 42f); floorMover.speed = doorCloseSpeed; AudioSource floorTileAud = ((Component)child).gameObject.AddComponent<AudioSource>(); floorTileAud.playOnAwake = false; floorTileAud.loop = false; floorTileAud.clip = doorCloseAud; PlayerActivator act = firstRoom.GetComponentsInChildren<PlayerActivator>().First(); ((Component)act).gameObject.SetActive(false); NewMovement instance = MonoSingleton<NewMovement>.instance; ((Component)instance).transform.localPosition = new Vector3(((Component)instance).transform.localPosition.x, ascendingPlayerSpawnPos, ((Component)instance).transform.localPosition.z); PlayerForcedMovement focedMov = ((Component)instance).gameObject.AddComponent<PlayerForcedMovement>(); GameObject val3 = new GameObject(); val3.transform.SetParent(((Component)act).transform.parent); val3.transform.localPosition = new Vector3(0f, upDisablePos, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = new Vector3(80f, 0.2f, 80f); val3.layer = ((Component)act).gameObject.layer; ((Collider)val3.AddComponent<BoxCollider>()).isTrigger = true; ObjectActivator obj8 = val3.AddComponent<ObjectActivator>(); obj8.dontActivateOnEnable = true; obj8.oneTime = true; obj8.events = new UltrakillEvent(); obj8.events.onActivate = new UnityEvent(); obj8.events.onActivate.AddListener((UnityAction)delegate { focedMov.DestroyComp(); }); GameObject val4 = new GameObject(); val4.transform.SetParent(((Component)act).transform.parent); val4.transform.localPosition = new Vector3(0f, doorClosePos, 0f); val4.transform.localRotation = Quaternion.identity; val4.transform.localScale = new Vector3(80f, 0.2f, 80f); val4.layer = ((Component)act).gameObject.layer; ((Collider)val4.AddComponent<BoxCollider>()).isTrigger = true; ObjectActivator obj9 = val4.AddComponent<ObjectActivator>(); obj9.dontActivateOnEnable = true; obj9.oneTime = true; obj9.events = new UltrakillEvent(); obj9.events.onActivate = new UnityEvent(); obj9.events.onActivate.AddListener((UnityAction)delegate { floorMover.Activate(); }); obj9.events.onActivate.AddListener((UnityAction)delegate { floorTileAud.Play(); }); obj9.events.onActivate.AddListener((UnityAction)delegate { foreach (GameObject item in toEnable) { item.SetActive(true); } foreach (GameObject item2 in toDisable) { item2.SetActive(false); } }); ObjectActivator obj10 = val4.AddComponent<ObjectActivator>(); obj10.dontActivateOnEnable = true; obj10.oneTime = true; obj10.events = new UltrakillEvent(); obj10.events.onActivate = new UnityEvent(); obj10.events.onActivate.AddListener((UnityAction)delegate { ((Component)act).gameObject.SetActive(true); }); UnityEvent onActivate = obj10.events.onActivate; object obj11 = <>c.<>9__36_5; if (obj11 == null) { UnityAction val5 = delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MonoSingleton<StatsManager>.instance.spawnPos = ((Component)MonoSingleton<NewMovement>.instance).transform.position; }; <>c.<>9__36_5 = val5; obj11 = (object)val5; } onActivate.AddListener((UnityAction)obj11); obj10.delay = actDelay; } public void Spawn() { //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: 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_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0305: 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_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_0511: 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_0533: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05bc: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_063f: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_09f8: Unknown result type (might be due to invalid IL or missing references) //IL_09fd: Unknown result type (might be due to invalid IL or missing references) //IL_0a06: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Unknown result type (might be due to invalid IL or missing references) //IL_0a3b: Unknown result type (might be due to invalid IL or missing references) //IL_0a44: Unknown result type (might be due to invalid IL or missing references) //IL_0a69: Unknown result type (might be due to invalid IL or missing references) //IL_0a6e: Unknown result type (might be due to invalid IL or missing references) //IL_0a6f: Unknown result type (might be due to invalid IL or missing references) //IL_0a76: Unknown result type (might be due to invalid IL or missing references) //IL_0a88: Unknown result type (might be due to invalid IL or missing references) //IL_0a9d: Unknown result type (might be due to invalid IL or missing references) //IL_0ab7: Unknown result type (might be due to invalid IL or missing references) //IL_0ac2: Unknown result type (might be due to invalid IL or missing references) //IL_0acd: Unknown result type (might be due to invalid IL or missing references) //IL_0b2e: Unknown result type (might be due to invalid IL or missing references) //IL_0b30: Unknown result type (might be due to invalid IL or missing references) //IL_0b68: Unknown result type (might be due to invalid IL or missing references) //IL_0b72: Expected O, but got Unknown //IL_06c4: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_0740: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_0746: Unknown result type (might be due to invalid IL or missing references) //IL_074d: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_07f6: Unknown result type (might be due to invalid IL or missing references) //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_0816: Unknown result type (might be due to invalid IL or missing references) //IL_0821: Unknown result type (might be due to invalid IL or missing references) //IL_0836: Unknown result type (might be due to invalid IL or missing references) //IL_0840: Unknown result type (might be due to invalid IL or missing references) //IL_087f: Unknown result type (might be due to invalid IL or missing references) //IL_0884: Unknown result type (might be due to invalid IL or missing references) //IL_0885: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_089f: Unknown result type (might be due to invalid IL or missing references) //IL_08b8: Unknown result type (might be due to invalid IL or missing references) //IL_08df: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_091d: Unknown result type (might be due to invalid IL or missing references) //IL_0922: Unknown result type (might be due to invalid IL or missing references) //IL_0923: Unknown result type (might be due to invalid IL or missing references) //IL_092a: Unknown result type (might be due to invalid IL or missing references) //IL_093c: Unknown result type (might be due to invalid IL or missing references) //IL_0951: Unknown result type (might be due to invalid IL or missing references) //IL_096a: Unknown result type (might be due to invalid IL or missing references) //IL_0975: Unknown result type (might be due to invalid IL or missing references) if (spawned) { return; } GameObject onLevelStartObj = null; bool flag = (Object)(object)MonoSingleton<OnLevelStart>.Instance != (Object)null; if (!flag) { Transform val = ((Component)this).gameObject.transform.Find("OnLevelStart"); if ((Object)(object)val != (Object)null) { flag = (Object)(object)((Component)val).GetComponent<OnLevelStart>() != (Object)null; onLevelStartObj = ((Component)val).gameObject; } } else { onLevelStartObj = ((Component)MonoSingleton<OnLevelStart>.Instance).gameObject; } GameObject val2 = ((Component)this).gameObject; GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)(secretRoom ? "FirstRoom Secret" : (primeRoom ? "FirstRoom Prime" : (encoreRoom ? "Assets/Prefabs/Levels/Special Rooms/FirstRoom Encore.prefab" : "FirstRoom")))).WaitForCompletion(); Scene activeScene; if (!doNotReplace) { val2 = Object.Instantiate<GameObject>(val3, ((Component)this).transform.parent); if (flag) { Transform? obj = val2.transform.Find("OnLevelStart"); if (obj == null) { activeScene = SceneManager.GetActiveScene(); obj = (from go in ((Scene)(ref activeScene)).GetRootGameObjects() where ((Object)go).name == "OnLevelStart" && (Object)(object)go.transform != (Object)(object)onLevelStartObj select go.transform).FirstOrDefault(); } Transform val4 = obj; if ((Object)(object)val4 != (Object)null) { Object.Destroy((Object)(object)((Component)val4).gameObject); } if ((Object)(object)onLevelStartObj != (Object)null) { onLevelStartObj.transform.SetParent(val2.transform); } } } else { GameObject val5 = Object.Instantiate<GameObject>(val3, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform.parent); Object.Destroy((Object)(object)((Component)val5.transform.Find("Room")).gameObject); if (flag) { Transform val6 = val5.transform.Find("OnLevelStart"); if ((Object)(object)val6 != (Object)null) { Object.Destroy((Object)(object)((Component)val6).gameObject); } else { activeScene = SceneManager.GetActiveScene(); OnLevelStart val7 = (from go in ((Scene)(ref activeScene)).GetRootGameObjects() select go.GetComponent<OnLevelStart>() into ls where (Object)(object)ls != (Object)null && (Object)(object)((Component)ls).gameObject != (Object)(object)onLevelStartObj select ls).FirstOrDefault(); if ((Object)(object)val7 != (Object)null) { Object.Destroy((Object)(object)((Component)val7).gameObject); } } } } MeshCollider[] componentsInChildren = val2.GetComponentsInChildren<MeshCollider>(); MeshFilter val9 = default(MeshFilter); foreach (MeshCollider val8 in componentsInChildren) { if (((Component)val8).gameObject.TryGetComponent<MeshFilter>(ref val9)) { val9.mesh = val8.sharedMesh; } } Transform transform = ((Component)MonoSingleton<NewMovement>.instance).transform; ((Component)transform).transform.parent = val2.transform; val2.transform.position = ((Component)this).transform.position; val2.transform.rotation = ((Component)this).transform.rotation; ((Component)transform).transform.parent = null; Quaternion rotation = ((Component)this).transform.rotation; Utils.SetPlayerWorldRotation(Quaternion.Euler(0f, ((Quaternion)(ref rotation)).eulerAngles.y, 0f)); if ((Object)(object)playerSpawnPos != (Object)null) { ((Component)transform).transform.parent = ((Component)playerSpawnPos).transform.parent; ((Component)transform).transform.localPosition = playerSpawnPos.localPosition; Utils.SetPlayerWorldRotation(playerSpawnPos.rotation); ((Component)transform).transform.SetParent((Transform)null); } MonoSingleton<StatsManager>.instance.spawnPos = ((Component)transform).transform.position; try { ((Component)val2.transform.Find("Room/FinalDoor")).GetComponent<FinalDoor>(); Camera main = Camera.main; main.backgroundColor = backgroundColor; main.clearFlags = cameraFillMode; ((Component)val2.transform.Find("Room/FinalDoor/FinalDoorOpener")).GetComponent<FinalDoorOpener>().startMusic = startMusic; ((Component)val2.transform.Find("Room/FinalDoor")).GetComponent<FinalDoor>(); GameObject val10 = null; if (enableHellMap) { Deserialize(); Transform obj2 = ((Component)MonoSingleton<NewMovement>.instance).transform.Find("Canvas"); if (obj2 == null) { activeScene = SceneManager.GetActiveScene(); obj2 = (from o in ((Scene)(ref activeScene)).GetRootGameObjects() where ((Object)o).name == "Canvas" select o).First().transform; } RectTransform val11 = MakeRect(obj2); ((Object)val11).name = "Hellmap"; val10 = ((Component)val11).gameObject; Vector2 anchorMin = (val11.anchorMax = new Vector2(0.5f, 0.5f)); val11.anchorMin = anchorMin; val11.pivot = new Vector2(0.5f, 0.5f); val11.sizeDelta = new Vector2(250f, 650f); val11.anchoredPosition = Vector2.zero; ((Transform)val11).localScale = Vector3.one * 0.82244f; ((Transform)val11).SetAsFirstSibling(); RectTransform val13 = MakeRect(((Component)val11).transform); ((Object)val13).name = "Hellmap Container"; val13.anchorMin = Vector2.zero; val13.anchorMax = Vector2.one; val13.pivot = new Vector2(0.5f, 0.5f); val13.sizeDelta = Vector2.zero; val13.anchoredPosition = Vector2.zero; ((Transform)val13).localScale = Vector3.one; float num = 0f; Stack<RectTransform> stack = new Stack<RectTransform>(); foreach (LayerInfo layersAndLevel in layersAndLevels) { RectTransform obj3 = MakeRect((Transform)(object)val13); anchorMin = (obj3.anchorMax = new Vector2(0f, 1f)); obj3.anchorMin = anchorMin; obj3.sizeDelta = new Vector2(250f, 50f); obj3.pivot = new Vector2(0f, 1f); ((Transform)obj3).localScale = Vector3.one; obj3.anchoredPosition = new Vector2(0f, (num == 0f) ? (-3.051758E-05f) : num); num -= 50f; Text obj4 = MakeText((Transform)(object)obj3); obj4.text = layersAndLevel.layerName; obj4.fontSize = 36; obj4.font = Utils.gameFont; obj4.alignment = (TextAnchor)3; ((Graphic)obj4).color = Color.white; RectTransform component = ((Component)obj4).GetComponent<RectTransform>(); component.anchorMin = Vector2.zero; component.anchorMax = Vector2.one; component.sizeDelta = Vector2.zero; component.pivot = new Vector2(0.5f, 0.5f); ((Transform)component).localScale = Vector3.one; component.anchoredPosition = Vector2.zero; string[] layerLevels = layersAndLevel.layerLevels; foreach (string text in layerLevels) { RectTransform obj5 = MakeRect((Transform)(object)val13); anchorMin = (obj5.anchorMax = new Vector2(0f, 1f)); obj5.anchorMin = anchorMin; obj5.pivot = new Vector2(0f, 1f); ((Transform)obj5).localScale = Vector3.one; obj5.anchoredPosition = new Vector2(60f, num); obj5.sizeDelta = new Vector2(125f, 45f); num -= 50f; RectTransform obj6 = MakeRect(((Component)obj5).transform); anchorMin = (obj6.anchorMax = new Vector2(0.5f, 0.5f)); obj6.anchorMin = anchorMin; obj6.sizeDelta = new Vector2(25f, 9f); obj6.anchoredPosition = Vector2.zero; ((Transform)obj6).localScale = new Vector3(5f, 5f, 5f); Image obj7 = ((Component)obj6).gameObject.AddComponent<Image>(); obj7.type = (Type)1; obj7.sprite = Utils.levelPanel; obj7.pixelsPerUnitMultiplier = 1f; Text obj8 = MakeText(((Component)obj5).transform); obj8.text = text; obj8.font = Utils.gameFont; obj8.fontSize = 32; obj8.alignment = (TextAnchor)4; ((Graphic)obj8).color = Color.black; RectTransform component2 = ((Component)obj8).gameObject.GetComponent<RectTransform>(); component2.anchorMin = Vector2.zero; component2.anchorMax = Vector2.one; component2.pivot = new Vector2(0.5f, 0.5f); component2.sizeDelta = Vector2.zero; component2.anchoredPosition = new Vector2(0f, 0f); ((Transform)component2).localScale = Vector3.one; } if (layersAndLevel.layerLevels.Length != 0) { RectTransform val17 = MakeRect((Transform)(object)val13); anchorMin = (val17.anchorMax = new Vector2(0.5f, 1f)); val17.anchorMin = anchorMin; val17.pivot = new Vector2(0.5f, 0f); val17.anchoredPosition = new Vector2(-95f, num + 25f); val17.sizeDelta = new Vector2(3f, (float)layersAndLevel.layerLevels.Length * 50f - 27.5f); ((Transform)val17).localScale = Vector3.one; ((Component)val17).gameObject.AddComponent<Image>(); for (int j = 0; j < layersAndLevel.layerLevels.Length; j++) { RectTransform obj9 = MakeRect((Transform)(object)val17); anchorMin = (obj9.anchorMax = new Vector2(0.5f, 0f)); obj9.anchorMin = anchorMin; obj9.pivot = new Vector2(0f, 0.5f); obj9.sizeDelta = new Vector2(20f, 3f); obj9.anchoredPosition = new Vector2(-1.5f, (float)j * 50f); ((Transform)obj9).localScale = Vector3.one; ((Component)obj9).gameObject.AddComponent<Image>(); } stack.Push(val17); } } while (stack.Count != 0) { ((Transform)stack.Pop()).SetAsLastSibling(); } Vector2 anchoredPosition = ((Component)((Transform)val13).GetChild(GetChildIndexFromLayerAndLevel(layerIndexToStartFrom, levelIndexToStartFrom))).GetComponent<RectTransform>().anchoredPosition; ((Vector2)(ref anchoredPosition))..ctor(210f, anchoredPosition.y - 22.5f); Vector2 anchoredPosition2 = ((Component)((Transform)val13).GetChild(GetChildIndexFromLayerAndLevel(layerIndexToEndAt, levelIndexToEndAt))).GetComponent<RectTransform>().anchoredPosition; ((Vector2)(ref anchoredPosition2))..ctor(210f, anchoredPosition2.y - 22.5f); RectTransform obj10 = MakeRect((Transform)(object)val11); anchorMin = (obj10.anchorMax = new Vector2(0f, 1f)); obj10.anchorMin = anchorMin; obj10.pivot = new Vector2(0.5f, 0.5f); obj10.sizeDelta = new Vector2(35f, 35f); ((Transform)obj10).rotation = Quaternion.Euler(0f, 0f, 90f); ((Transform)obj10).localScale = Vector3.one; obj10.anchoredPosition = anchoredPosition; AudioSource val21 = ((Component)obj10).gameObject.AddComponent<AudioSource>(); val21.playOnAwake = false; val21.loop = false; val21.clip = hellmapBeepClip; val21.volume = 0.1f; Image val22 = ((Component)obj10).gameObject.AddComponent<Image>(); val22.sprite = Utils.hellmapArrow; CustomHellmapCursor customHellmapCursor = ((Component)obj10).gameObject.AddComponent<CustomHellmapCursor>(); customHellmapCursor.targetPosition = anchoredPosition2; customHellmapCursor.aud = val21; customHellmapCursor.targetImage = val22; ObjectActivator obj11 = ((Component)UnityUtils.GetComponentInChildrenRecursive<PlayerActivator>(val2.transform)).gameObject.AddComponent<ObjectActivator>(); obj11.dontActivateOnEnable = true; obj11.oneTime = true; obj11.events = new UltrakillEvent(); obj11.events.toDisActivateObjects = (GameObject[])(object)new GameObject[1] { ((Component)val11).gameObject }; } if (!convertToUpwardRoom) { return; } foreach (GameObject item in upwardRoomOutOfBoundsToDisable) { item.SetActive(false); } List<GameObject> list = new List<GameObject>(); if ((Object)(object)val10 != (Object)null) { list.Add(val10); } List<GameObject> list2 = new List<GameObject>(); list2.AddRange(upwardRoomOutOfBoundsToDisable); ConvertToAscendingFirstRoom(val2, upwardRoomDoorCloseClip, list2, list, doNotReplace); } catch (Exception ex) { throw ex; } finally { spawned = true; } int GetChildIndexFromLayerAndLevel(int layer, int level) { int num2 = 0; for (int k = 0; k < layer; k++) { num2 += 1 + levelSizes[k]; } return num2 + 1 + level; } } public void Awake() { Spawn(); } public void Start() { if ((Object)(object)MonoSingleton<OnLevelStart>.Instance != (Object)null) { MonoSingleton<OnLevelStart>.Instance.levelNameOnStart = displayLevelTitle; } else { Debug.LogWarning((object)"Could not find OnLevelStart"); } if (!doNotReplace) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class RudeLevelChallengeChecker : MonoBehaviour { public string targetLevelId; public UltrakillEvent onSuccess; public UltrakillEvent onFailure; public bool activateOnEnable = true; public void OnEnable() { if (activateOnEnable) { Activate(); } } public void Activate() { if (LevelInterface.GetLevelChallenge(targetLevelId)) { if (onSuccess != null) { onSuccess.Invoke(""); } } else if (onFailure != null) { onFailure.Invoke(""); } } } public enum LevelRanks { NotCompleted, Completed, CompletedWithCheats, CompletedWithoutCheats, D, AtLeastD, AtMostD, C, AtLeastC, AtMostC, B, AtLeastB, AtMostB, A, AtLeastA, AtMostA, S, AtLeastS, AtMostS, P } public class RudeLevelRankChecker : MonoBehaviour { public string targetLevelUniqueId = ""; public LevelRanks requiredFinalRank = LevelRanks.Completed; public UltrakillEvent OnSuccess; public UltrakillEvent OnFail; public bool activateOnEnable = true; public void OnEnable() { if (activateOnEnable) { Activate(); } } public static int GetRankScore(char rank) { return rank switch { 'D' => 1, 'C' => 2, 'B' => 3, 'A' => 4, 'S' => 5, 'P' => 6, _ => -1, }; } public void Activate() { char levelRank = LevelInterface.GetLevelRank(targetLevelUniqueId); int rankScore = GetRankScore(levelRank); bool flag = false; switch (requiredFinalRank) { case LevelRanks.NotCompleted: flag = levelRank == '-'; break; case LevelRanks.Completed: flag = levelRank != '-'; break; case LevelRanks.CompletedWithCheats: flag = levelRank == ' '; break; case LevelRanks.CompletedWithoutCheats: flag = levelRank != ' ' && levelRank != '-'; break; case LevelRanks.D: flag = levelRank == 'D'; break; case LevelRanks.C: flag = levelRank == 'C'; break; case LevelRanks.B: flag = levelRank == 'B'; break; case LevelRanks.A: flag = levelRank == 'A'; break; case LevelRanks.S: flag = levelRank == 'S'; break; case LevelRanks.P: flag = levelRank == 'P'; break; case LevelRanks.AtLeastD: flag = rankScore >= GetRankScore('D'); break; case LevelRanks.AtMostD: flag = rankScore <= GetRankScore('D'); break; case LevelRanks.AtLeastC: flag = rankScore >= GetRankScore('C'); break; case LevelRanks.AtMostC: flag = rankScore <= GetRankScore('C'); break; case LevelRanks.AtLeastB: flag = rankScore >= GetRankScore('B'); break; case LevelRanks.AtMostB: flag = rankScore <= GetRankScore('B'); break; case LevelRanks.AtLeastA: flag = rankScore >= GetRankScore('A'); break; case LevelRanks.AtMostA: flag = rankScore <= GetRankScore('A'); break; case LevelRanks.AtLeastS: flag = rankScore >= GetRankScore('S'); break; case LevelRanks.AtMostS: flag = rankScore <= GetRankScore('S'); break; } if (flag) { if (OnSuccess != null) { OnSuccess.Invoke(""); } } else if (OnFail != null) { OnFail.Invoke(""); } } } public class RudeLevelSecretChecker : MonoBehaviour { public string targetLevelId = ""; public int targetSecretIndex; public UltrakillEvent onSuccess; public UltrakillEvent onFailure; public bool activateOnEnable = true; public void OnEnable() { if (activateOnEnable) { Activate(); } } public void Activate() { if (LevelInterface.GetLevelSecret(targetLevelId, targetSecretIndex)) { if (onSuccess != null) { onSuccess.Invoke(""); } } else if (onFailure != null) { onFailure.Invoke(""); } } } public static class Utils { private static Font _gameFont; private static Sprite _levelPanel; private static Sprite _hellmapArrow; private static Material _metalDec20; public static Font gameFont { get { //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)_gameFont == (Object)null) { _gameFont = Addressables.LoadAssetAsync<Font>((object)"Assets/Fonts/VCR_OSD_MONO_1.001.ttf").WaitForCompletion(); } return _gameFont; } } public static Sprite levelPanel { get { //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)_levelPanel == (Object)null) { _levelPanel = Addressables.LoadAssetAsync<Sprite>((object)"Assets/Textures/UI/meter.png").WaitForCompletion(); } return _levelPanel; } } public static Sprite hellmapArrow { get { //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)_hellmapArrow == (Object)null) { _hellmapArrow = Addressables.LoadAssetAsync<Sprite>((object)"Assets/Textures/UI/arrow.png").WaitForCompletion(); } return _hellmapArrow; } } public static Material metalDec20 { get { //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)_metalDec20 == (Object)null) { _metalDec20 = Addressables.LoadAssetAsync<Material>((object)"Assets/Materials/Environment/Metal/Metal Decoration 20.mat").WaitForCompletion(); } return _metalDec20; } } public static void SetPlayerWorldRotation(Quaternion newRotation) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) ((Component)MonoSingleton<CameraController>.Instance).transform.rotation = newRotation; float x = ((Component)MonoSingleton<CameraController>.Instance).transform.localEulerAngles.x; float rotationX = x; if (x <= 90f && x >= 0f) { rotationX = 0f - x; } else if (x >= 270f && x <= 360f) { rotationX = Mathf.Lerp(0f, 90f, Mathf.InverseLerp(360f, 270f, x)); } Quaternion rotation = ((Component)MonoSingleton<CameraController>.Instance).transform.rotation; float y = ((Quaternion)(ref rotation)).eulerAngles.y; MonoSingleton<CameraController>.Instance.rotationX = rotationX; MonoSingleton<CameraController>.Instance.rotationY = y; } } public static class UnityUtils { [CompilerGenerated] private sealed class <GetComponentsInChildrenRecursive>d__0<T> : IEnumerable<object>, IEnumerable, IEnumerator<object>, IEnumerator, IDisposable where T : Component { private int <>1__state; private object <>2__current; private int <>l__initialThreadId; private Transform parent; public Transform <>3__parent; private IEnumerator <>7__wrap1; private Transform <child>5__3; private IEnumerator <>7__wrap3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GetComponentsInChildrenRecursive>d__0(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if ((uint)(num - -4) <= 1u || (uint)(num - 1) <= 1u) { try { if (num == -4 || num == 2) { try { } finally { <>m__Finally2(); } } } finally { <>m__Finally1(); } } <>7__wrap1 = null; <child>5__3 = null; <>7__wrap3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>7__wrap1 = parent.GetEnumerator(); <>1__state = -3; goto IL_00fd; case 1: <>1__state = -3; goto IL_008c; case 2: { <>1__state = -4; goto IL_00dc; } IL_00fd: if (<>7__wrap1.MoveNext()) { <child>5__3 = (Transform)<>7__wrap1.Current; T val = default(T); if (((Component)<child>5__3).TryGetComponent<T>(ref val)) { <>2__current = val; <>1__state = 1; return true; } goto IL_008c; } <>m__Finally1(); <>7__wrap1 = null; return false; IL_008c: <>7__wrap3 = GetComponentsInChildrenRecursive<T>(<child>5__3).GetEnumerator(); <>1__state = -4; goto IL_00dc; IL_00dc: if (<>7__wrap3.MoveNext()) { T val2 = (T)<>7__wrap3.Current; <>2__current = val2; <>1__state = 2; return true; } <>m__Finally2(); <>7__wrap3 = null; <child>5__3 = null; goto IL_00fd; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>7__wrap1 is IDisposable disposable) { disposable.Dispose(); } } private void <>m__Finally2() { <>1__state = -3; if (<>7__wrap3 is IDisposable disposable) { disposable.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<object> IEnumerable<object>.GetEnumerator() { <GetComponentsInChildrenRecursive>d__0<T> <GetComponentsInChildrenRecursive>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <GetComponentsInChildrenRecursive>d__ = this; } else { <GetComponentsInChildrenRecursive>d__ = new <GetComponentsInChildrenRecursive>d__0<T>(0); } <GetComponentsInChildrenRecursive>d__.parent = <>3__parent; return <GetComponentsInChildrenRecursive>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<object>)this).GetEnumerator(); } } [IteratorStateMachine(typeof(<GetComponentsInChildrenRecursive>d__0<>))] public static IEnumerable GetComponentsInChildrenRecursive<T>(Transform parent) where T : Component { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GetComponentsInChildrenRecursive>d__0<T>(-2) { <>3__parent = parent }; } public static T GetComponentInChildrenRecursive<T>(Transform parent) where T : Component { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown T result = default(T); foreach (Transform item in parent) { Transform val = item; if (((Component)val).TryGetComponent<T>(ref result)) { return result; } T componentInChildrenRecursive = GetComponentInChildrenRecursive<T>(val); if ((Object)(object)componentInChildrenRecursive != (Object)null) { return componentInChildrenRecursive; } } return default(T); } } } namespace RudeLevelScripts { public class AscendingFinalRoom : MonoBehaviour { private void OnTriggerEnter(Collider other) { GameObject gameObject = ((Component)MonoSingleton<NewMovement>.instance).gameObject; if ((Object)(object)((Component)other).gameObject == (Object)(object)gameObject && Object.op_Implicit((Object)(object)MonoSingleton<NewMovement>.Instance) && MonoSingleton<NewMovement>.Instance.hp > 0) { gameObject.AddComponent<FirstRoomSpawner.PlayerForcedMovement>().force = 100f; } } } public class EnemyInfoPageDataLoader : MonoBehaviour { [CompilerGenerated] private sealed class <LoadDataAndDestroyAsync>d__6 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public EnemyInfoPageDataLoader <>4__this; private AsyncOperationHandle<SpawnableObjectsDatabase> <handle>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <LoadDataAndDestroyAsync>d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) <handle>5__2 = default(AsyncOperationHandle<SpawnableObjectsDatabase>); <>1__state = -2; } private bool MoveNext() { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; EnemyInfoPageDataLoader enemyInfoPageDataLoader = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; if (enemyInfoPageDataLoader._taskStarted) { return false; } enemyInfoPageDataLoader._taskStarted = true; if ((Object)(object)database == (Object)null) { <handle>5__2 = Addressables.LoadAssetAsync<SpawnableObjectsDatabase>((object)"Assets/Data/Bestiary Database.asset"); <>2__current = <handle>5__2; <>1__state = 1; return true; } break; case 1: <>1__state = -1; database = <handle>5__2.Result; <handle>5__2 = default(AsyncOperationHandle<SpawnableObjectsDatabase>); break; } if ((Object)(object)enemyInfoPageDataLoader.target == (Object)null) { enemyInfoPageDataLoader.target = ((Component)enemyInfoPageDataLoader).GetComponent<EnemyInfoPage>(); } enemyInfoPageDataLoader.target.objects = Object.Instantiate<SpawnableObjectsDatabase>(database); if (enemyInfoPageDataLoader.additionalEnemies != null && enemyInfoPageDataLoader.additionalEnemies.Count != 0) { List<SpawnableObject> list = enemyInfoPageDataLoader.target.objects.enemies.ToList(); list.AddRange(enemyInfoPageDataLoader.additionalEnemies); enemyInfoPageDataLoader.target.objects.enemies = list.ToArray(); } Object.Destroy((Object)(object)enemyInfoPageDataLoader); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public EnemyInfoPage target; public List<SpawnableObject> additionalEnemies; private static SpawnableObjectsDatabase database; private bool _taskStarted; public void Awake() { LoadDataAndDestroy(); } public void LoadDataAndDestroy() { ((MonoBehaviour)this).StartCoroutine(LoadDataAndDestroyAsync()); } [IteratorStateMachine(typeof(<LoadDataAndDestroyAsync>d__6))] private IEnumerator LoadDataAndDestroyAsync() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LoadDataAndDestroyAsync>d__6(0) { <>4__this = this }; } } internal static class GameObjectExtensions { public static bool TryGetComponentInChildren<T>(this GameObject obj, out T result) where T : Component { result = obj.GetComponentInChildren<T>(); return (Object)(object)result != (Object)null; } } public class FirstRoomGameControllerLoader : MonoBehaviour { public void RunAndDestroy() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) if (((Component)this).gameObject.TryGetComponentInChildren<PlayerTracker>(out PlayerTracker result) && (Object)(object)result.platformerPlayerPrefab == (Object)null) { result.platformerPlayerPrefab = Addressables.LoadAssetAsync<GameObject>((object)"Assets/Prefabs/Player/PlatformerController.prefab").WaitForCompletion(); } if (((Component)this).gameObject.TryGetComponentInChildren<SandboxSaver>(out SandboxSaver result2) && (Object)(object)result2.objects == (Object)null) { result2.objects = Addressables.LoadAssetAsync<SpawnableObjectsDatabase>((object)"Assets/Data/Sandbox/Spawnable Objects Database.asset").WaitForCompletion(); } if (((Component)this).gameObject.TryGetComponentInChildren<TimeController>(out TimeController result3) && (Object)(object)result3.parryLight == (Object)null) { result3.parryLight = Addressables.LoadAssetAsync<GameObject>((object)"Assets/Particles/ParryLight.prefab").WaitForCompletion(); } } } }