Decompiled source of RMLModSettings v1.3.3
plugins/RMLModSettings/RMLModSettings.dll
Decompiled 2 months 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.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; using System.Threading.Tasks.Sources; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.NET.Common; using BepInExResoniteShim; using BepisLocaleLoader; using BepisModSettings; using BepisModSettings.DataFeeds; using BepisResoniteWrapper; using Elements.Core; using FrooxEngine; using FrooxEngine.UIX; using FrooxEngine.Weaver; using HarmonyLib; using ProtoFlux.Runtimes.Execution.Nodes.FrooxEngine.Variables; using Renderite.Shared; using ResoniteModLoader; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(/*Could not decode attribute arguments.*/)] [assembly: TargetFramework(".NETCoreApp,Version=v10.0", FrameworkDisplayName = ".NET 10.0")] [assembly: AssemblyCompany("NepuShiro")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.3.3.0")] [assembly: AssemblyInformationalVersion("1.3.3+8e8f80bb64bca70565d9e6934fae0fc1a49bebb7")] [assembly: AssemblyProduct("RML Mod Settings")] [assembly: AssemblyTitle("RMLModSettings")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/NepuShiro/RMLModSettings")] [assembly: AssemblyVersion("1.3.3.0")] [module: RefSafetyRules(11)] [CompilerGenerated] internal sealed class <>z__ReadOnlySingleElementList<T> : global::System.Collections.IEnumerable, global::System.Collections.ICollection, global::System.Collections.IList, global::System.Collections.Generic.IEnumerable<T>, global::System.Collections.Generic.IReadOnlyCollection<T>, global::System.Collections.Generic.IReadOnlyList<T>, global::System.Collections.Generic.ICollection<T>, global::System.Collections.Generic.IList<T> { private sealed class Enumerator : global::System.IDisposable, global::System.Collections.IEnumerator, global::System.Collections.Generic.IEnumerator<T> { object global::System.Collections.IEnumerator.Current => _item; T global::System.Collections.Generic.IEnumerator<T>.Current => _item; public Enumerator(T item) { _item = item; } bool global::System.Collections.IEnumerator.MoveNext() { if (!_moveNextCalled) { return _moveNextCalled = true; } return false; } void global::System.Collections.IEnumerator.Reset() { _moveNextCalled = false; } void global::System.IDisposable.Dispose() { } } int global::System.Collections.ICollection.Count => 1; bool global::System.Collections.ICollection.IsSynchronized => false; object global::System.Collections.ICollection.SyncRoot => this; object? global::System.Collections.IList.this[int index] { get { //IL_0003: Unknown result type (might be due to invalid IL or missing references) if (index != 0) { throw new IndexOutOfRangeException(); } return _item; } set { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } } bool global::System.Collections.IList.IsFixedSize => true; bool global::System.Collections.IList.IsReadOnly => true; int global::System.Collections.Generic.IReadOnlyCollection<T>.Count => 1; T global::System.Collections.Generic.IReadOnlyList<T>.this[int index] { get { //IL_0003: Unknown result type (might be due to invalid IL or missing references) if (index != 0) { throw new IndexOutOfRangeException(); } return _item; } } int global::System.Collections.Generic.ICollection<T>.Count => 1; bool global::System.Collections.Generic.ICollection<T>.IsReadOnly => true; T global::System.Collections.Generic.IList<T>.this[int index] { get { //IL_0003: Unknown result type (might be due to invalid IL or missing references) if (index != 0) { throw new IndexOutOfRangeException(); } return _item; } set { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } } public <>z__ReadOnlySingleElementList(T item) { _item = item; } global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { return new Enumerator(_item); } void global::System.Collections.ICollection.CopyTo(global::System.Array array, int index) { array.SetValue((object)_item, index); } int global::System.Collections.IList.Add(object? value) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } void global::System.Collections.IList.Clear() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } bool global::System.Collections.IList.Contains(object? value) { return EqualityComparer<T>.Default.Equals(_item, (T)value); } int global::System.Collections.IList.IndexOf(object? value) { if (!EqualityComparer<T>.Default.Equals(_item, (T)value)) { return -1; } return 0; } void global::System.Collections.IList.Insert(int index, object? value) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } void global::System.Collections.IList.Remove(object? value) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } void global::System.Collections.IList.RemoveAt(int index) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } global::System.Collections.Generic.IEnumerator<T> global::System.Collections.Generic.IEnumerable<T>.GetEnumerator() { return new Enumerator(_item); } void global::System.Collections.Generic.ICollection<T>.Add(T item) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } void global::System.Collections.Generic.ICollection<T>.Clear() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } bool global::System.Collections.Generic.ICollection<T>.Contains(T item) { return EqualityComparer<T>.Default.Equals(_item, item); } void global::System.Collections.Generic.ICollection<T>.CopyTo(T[] array, int arrayIndex) { array[arrayIndex] = _item; } bool global::System.Collections.Generic.ICollection<T>.Remove(T item) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } int global::System.Collections.Generic.IList<T>.IndexOf(T item) { if (!EqualityComparer<T>.Default.Equals(_item, item)) { return -1; } return 0; } void global::System.Collections.Generic.IList<T>.Insert(int index, T item) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } void global::System.Collections.Generic.IList<T>.RemoveAt(int index) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } } namespace RMLModSettings; public static class ConfigHelpers { [CompilerGenerated] private sealed class <>c__DisplayClass9_0<T> where T : unmanaged, global::System.Enum { public ModConfiguration config; public ModConfigurationKey configKey; internal void <GenerateNullableEnumItemsAsyncMethod>b__0(IField<bool> field) { ((MethodBase)AccessTools.Method(typeof(ConfigHelpers), "SyncWithNullableConfigKeyHasValue", (global::System.Type[])null, (global::System.Type[])null).MakeGenericMethod(new global::System.Type[1] { typeof(T) })).Invoke((object)null, new object[3] { field, config, configKey }); } } [CompilerGenerated] private sealed class <GenerateNullableEnumItemsAsyncMethod>d__9<T> : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine where T : unmanaged, global::System.Enum { public int <>1__state; public AsyncIteratorMethodBuilder <>t__builder; public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd; private DataFeedItem <>2__current; private bool <>w__disposeMode; private int <>l__initialThreadId; private ModConfiguration config; public ModConfiguration <>3__config; private ModConfigurationKey configKey; public ModConfigurationKey <>3__configKey; private string key; public string <>3__key; private global::System.Collections.Generic.IReadOnlyList<string> path; public global::System.Collections.Generic.IReadOnlyList<string> <>3__path; private global::System.Collections.Generic.IReadOnlyList<string> groupKeys; public global::System.Collections.Generic.IReadOnlyList<string> <>3__groupKeys; private InternalLocale internalLocale; public InternalLocale <>3__internalLocale; private <>c__DisplayClass9_0<T> <>8__1; private string[] <nullableGroupKeys>5__2; private TaskAwaiter <>u__1; DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GenerateNullableEnumItemsAsyncMethod>d__9(int <>1__state) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) <>t__builder = AsyncIteratorMethodBuilder.Create(); this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } private void MoveNext() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_018e: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; try { TaskAwaiter val2; DataFeedGroup val4; switch (num) { default: if (<>w__disposeMode) { break; } num = (<>1__state = -1); <>8__1 = new <>c__DisplayClass9_0<T>(); <>8__1.config = config; <>8__1.configKey = configKey; <>2__current = null; val2 = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter(); if (!((TaskAwaiter)(ref val2)).IsCompleted) { num = (<>1__state = 0); <>u__1 = val2; <GenerateNullableEnumItemsAsyncMethod>d__9<T> <GenerateNullableEnumItemsAsyncMethod>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <GenerateNullableEnumItemsAsyncMethod>d__9<T>>(ref val2, ref <GenerateNullableEnumItemsAsyncMethod>d__); return; } goto IL_00d0; case 0: val2 = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); goto IL_00d0; case -4: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } <nullableGroupKeys>5__2 = Enumerable.ToArray<string>(Enumerable.Concat<string>((global::System.Collections.Generic.IEnumerable<string>)groupKeys, (global::System.Collections.Generic.IEnumerable<string>)new <>z__ReadOnlySingleElementList<string>(key + ".NullableGroup"))); DataFeedToggle val3 = new DataFeedToggle(); ((DataFeedItem)val3).InitBase(key + ".HasValue", path, (global::System.Collections.Generic.IReadOnlyList<string>)<nullableGroupKeys>5__2, LocaleString.op_Implicit("?"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); ((DataFeedValueElement<bool>)(object)val3).InitSetupValue((Action<IField<bool>>)delegate(IField<bool> field) { ((MethodBase)AccessTools.Method(typeof(ConfigHelpers), "SyncWithNullableConfigKeyHasValue", (global::System.Type[])null, (global::System.Type[])null).MakeGenericMethod(new global::System.Type[1] { typeof(T) })).Invoke((object)null, new object[3] { field, <>8__1.config, <>8__1.configKey }); }); <>2__current = (DataFeedItem)(object)val3; num = (<>1__state = -5); goto IL_02e5; } case -5: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } DataFeedEnum<T> val = (DataFeedEnum<T>)((MethodBase)GenerateEnumItemsAsync.MakeGenericMethod(new global::System.Type[1] { typeof(T) })).Invoke((object)null, new object[6] { key, path, <nullableGroupKeys>5__2, internalLocale, <>8__1.config, <>8__1.configKey }); <>2__current = (DataFeedItem)(object)val; num = (<>1__state = -6); goto IL_02e5; } case -6: { num = (<>1__state = -1); _ = <>w__disposeMode; break; } IL_00d0: ((TaskAwaiter)(ref val2)).GetResult(); val4 = new DataFeedGroup(); ((DataFeedItem)val4).InitBase(key + ".NullableGroup", path, groupKeys, internalLocale.Key, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); <>2__current = (DataFeedItem)(object)val4; num = (<>1__state = -4); goto IL_02e5; } } catch (global::System.Exception exception) { <>1__state = -2; <>8__1 = null; <nullableGroupKeys>5__2 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetException(exception); return; } <>1__state = -2; <>8__1 = null; <nullableGroupKeys>5__2 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetResult(false); return; IL_02e5: <>v__promiseOfValueOrEnd.SetResult(true); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { } [DebuggerHidden] global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>.GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken)) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) <GenerateNullableEnumItemsAsyncMethod>d__9<T> <GenerateNullableEnumItemsAsyncMethod>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = -3; <>t__builder = AsyncIteratorMethodBuilder.Create(); <>w__disposeMode = false; <GenerateNullableEnumItemsAsyncMethod>d__ = this; } else { <GenerateNullableEnumItemsAsyncMethod>d__ = new <GenerateNullableEnumItemsAsyncMethod>d__9<T>(-3); } <GenerateNullableEnumItemsAsyncMethod>d__.key = <>3__key; <GenerateNullableEnumItemsAsyncMethod>d__.path = <>3__path; <GenerateNullableEnumItemsAsyncMethod>d__.groupKeys = <>3__groupKeys; <GenerateNullableEnumItemsAsyncMethod>d__.internalLocale = <>3__internalLocale; <GenerateNullableEnumItemsAsyncMethod>d__.config = <>3__config; <GenerateNullableEnumItemsAsyncMethod>d__.configKey = <>3__configKey; return <GenerateNullableEnumItemsAsyncMethod>d__; } [DebuggerHidden] global::System.Threading.Tasks.ValueTask<bool> global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.MoveNextAsync() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask<bool>); } <>v__promiseOfValueOrEnd.Reset(); <GenerateNullableEnumItemsAsyncMethod>d__9<T> <GenerateNullableEnumItemsAsyncMethod>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<GenerateNullableEnumItemsAsyncMethod>d__9<T>>(ref <GenerateNullableEnumItemsAsyncMethod>d__); short version = <>v__promiseOfValueOrEnd.Version; if ((int)<>v__promiseOfValueOrEnd.GetStatus(version) == 1) { return new global::System.Threading.Tasks.ValueTask<bool>(<>v__promiseOfValueOrEnd.GetResult(version)); } return new global::System.Threading.Tasks.ValueTask<bool>((IValueTaskSource<bool>)this, version); } [DebuggerHidden] bool IValueTaskSource<bool>.GetResult(short token) { return <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] void IValueTaskSource.GetResult(short token) { <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] global::System.Threading.Tasks.ValueTask global::System.IAsyncDisposable.DisposeAsync() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) if (<>1__state >= -1) { throw new NotSupportedException(); } if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask); } <>w__disposeMode = true; <>v__promiseOfValueOrEnd.Reset(); <GenerateNullableEnumItemsAsyncMethod>d__9<T> <GenerateNullableEnumItemsAsyncMethod>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<GenerateNullableEnumItemsAsyncMethod>d__9<T>>(ref <GenerateNullableEnumItemsAsyncMethod>d__); return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version); } } internal static readonly MethodInfo GenerateEnumItemsAsync = AccessTools.Method(typeof(ConfigHelpers), "GenerateEnumItemsAsyncMethod", (global::System.Type[])null, (global::System.Type[])null); internal static readonly MethodInfo GenerateNullableEnumItemsAsync = AccessTools.Method(typeof(ConfigHelpers), "GenerateNullableEnumItemsAsyncMethod", (global::System.Type[])null, (global::System.Type[])null); internal static readonly MethodInfo GenerateValueField = AccessTools.Method(typeof(ConfigHelpers), "GenerateValueFieldMethod", (global::System.Type[])null, (global::System.Type[])null); private static Dictionary<ModConfigurationKey, FieldInfo> ConfigKeyFields = new Dictionary<ModConfigurationKey, FieldInfo>(); public static void SetupConfigKeyFieldInfo(ResoniteModBase mod) { CollectionExtensions.Do<FieldInfo>(Enumerable.Where<FieldInfo>((global::System.Collections.Generic.IEnumerable<FieldInfo>)AccessTools.GetDeclaredFields(((object)mod).GetType()), (Func<FieldInfo, bool>)((FieldInfo field) => global::System.Attribute.GetCustomAttribute((MemberInfo)(object)field, typeof(AutoRegisterConfigKeyAttribute)) != null)), (Action<FieldInfo>)delegate(FieldInfo x) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown ModConfigurationKey val = (ModConfigurationKey)x.GetValue((object)(x.IsStatic ? null : mod)); ConfigKeyFields[val] = x; }); } public static bool TryGetConfigKeyFieldInfo(ModConfigurationKey key, out FieldInfo field) { return ConfigKeyFields.TryGetValue(key, ref field); } public static string GetModId(this ResoniteModBase mod) { return ("rml." + mod.Author + "." + mod.Name).ToLower().Replace(" ", "."); } internal static DataFeedToggle GenerateToggle(string key, global::System.Collections.Generic.IReadOnlyList<string> path, global::System.Collections.Generic.IReadOnlyList<string> groupKeys, InternalLocale internalLocale, ModConfiguration config, ModConfigurationKey configKey) { //IL_0016: 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_002a: 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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0052: Expected O, but got Unknown DataFeedToggle val = new DataFeedToggle(); ((DataFeedItem)val).InitBase(key + ".Toggle", path, groupKeys, internalLocale.Key, internalLocale.Description, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); ((DataFeedValueElement<bool>)val).InitSetupValue((Action<IField<bool>>)delegate(IField<bool> field) { field.SyncWithConfigKey<bool>(config, configKey); }); return val; } internal static DataFeedItem GenerateValueFieldMethod<T>(string key, global::System.Collections.Generic.IReadOnlyList<string> path, global::System.Collections.Generic.IReadOnlyList<string> groupKeys, InternalLocale internalLocale, ModConfiguration config, ModConfigurationKey configKey) { //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) DataFeedHelpers.TryInjectNewTemplateType(configKey.ValueType()); if (TryGetConfigKeyFieldInfo(configKey, out var field)) { RangeAttribute rangeAttribute = CustomAttributeExtensions.GetCustomAttribute<RangeAttribute>((MemberInfo)(object)field); if (rangeAttribute != null) { DataFeedSlider<T> obj = new DataFeedSlider<T>(); ((DataFeedItem)obj).InitBase($"{key}.{configKey.ValueType()}", path, groupKeys, internalLocale.Key, internalLocale.Description, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); ((DataFeedClampedValueField<T>)(object)obj).InitSetup((Action<IField<T>>)delegate(IField<T> field2) { field2.SyncWithConfigKey<T>(config, configKey); }, (Action<IField<T>>)delegate(IField<T> min) { ((IField)min).BoxedValue = rangeAttribute.Min; }, (Action<IField<T>>)delegate(IField<T> max) { ((IField)max).BoxedValue = rangeAttribute.Max; }); return (DataFeedItem)(object)obj; } } DataFeedValueField<T> obj2 = new DataFeedValueField<T>(); ((DataFeedItem)obj2).InitBase($"{key}.{configKey.ValueType()}", path, groupKeys, internalLocale.Key, internalLocale.Description, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); ((DataFeedValueElement<T>)(object)obj2).InitSetupValue((Action<IField<T>>)delegate(IField<T> field2) { field2.SyncWithConfigKey<T>(config, configKey); }); return (DataFeedItem)(object)obj2; } [AsyncIteratorStateMachine(typeof(<GenerateNullableEnumItemsAsyncMethod>d__9<>))] private static global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> GenerateNullableEnumItemsAsyncMethod<T>(string key, global::System.Collections.Generic.IReadOnlyList<string> path, global::System.Collections.Generic.IReadOnlyList<string> groupKeys, InternalLocale internalLocale, ModConfiguration config, ModConfigurationKey configKey) where T : unmanaged, global::System.Enum { return new <GenerateNullableEnumItemsAsyncMethod>d__9<T>(-2) { <>3__key = key, <>3__path = path, <>3__groupKeys = groupKeys, <>3__internalLocale = internalLocale, <>3__config = config, <>3__configKey = configKey }; } private static void SyncWithConfigKey<T>(this IField<T> field, ModConfiguration config, ModConfigurationKey configKey) { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown object obj; try { obj = config.GetValue(configKey) ?? ((object)default(T)); } catch { obj = default(T); } ((IValue<T>)(object)field).Value = (T)obj; ((IField)(object)field).SetupChangedHandlers(FieldChanged, configKey, new OnChangedHandler(KeyChanged)); void FieldChanged(IChangeable _) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown config.Set(configKey, (object)((IValue<T>)(object)field).Value, (string)null); ((IWorldElement)field).World.RunSynchronously((Action)delegate { object obj3; try { obj3 = config.GetValue(configKey); } catch { obj3 = default(T); } ((IValue<T>)(object)field).Value = (T)obj3; }, false, (IUpdatable)null, false); } void KeyChanged(object newValue) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown if (!object.Equals((object)((IValue<T>)(object)field).Value, newValue)) { ((IWorldElement)field).World.RunSynchronously((Action)delegate { ((IValue<T>)(object)field).Value = (T)(newValue ?? ((object)default(T))); }, false, (IUpdatable)null, false); } } } private static DataFeedEnum<T> GenerateEnumItemsAsyncMethod<T>(string key, global::System.Collections.Generic.IReadOnlyList<string> path, global::System.Collections.Generic.IReadOnlyList<string> groupKeys, InternalLocale internalLocale, ModConfiguration config, ModConfigurationKey configKey) where T : unmanaged, global::System.Enum { //IL_002a: 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) DataFeedEnum<T> obj = new DataFeedEnum<T>(); ((DataFeedItem)obj).InitBase(key + ".Enum", path, groupKeys, internalLocale.Key, internalLocale.Description, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); ((DataFeedValueElement<T>)(object)obj).InitSetupValue((Action<IField<T>>)delegate(IField<T> field) { field.SyncWithConfigKey<T>(config, configKey); }); return obj; } private static void SyncWithNullableConfigKeyHasValue<T>(this IField<bool> field, ModConfiguration config, ModConfigurationKey<T?> configKey) where T : struct { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown ((IValue<bool>)(object)field).Value = config.GetValue<T?>(configKey).HasValue; ((IField)(object)field).SetupChangedHandlers(FieldChanged, (ModConfigurationKey)(object)configKey, new OnChangedHandler(KeyChanged)); void FieldChanged(IChangeable _) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown T? value = (((IValue<bool>)(object)field).Value ? new T?(default(T)) : ((T?)null)); if (((IValue<bool>)(object)field).Value != configKey.Value.HasValue) { configKey.Value = value; ((IWorldElement)field).World.RunSynchronously((Action)delegate { field.SetWithoutChangedHandler(configKey.Value.HasValue, FieldChanged); }, false, (IUpdatable)null, false); } } void KeyChanged(object newValue) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown bool hasValue = ((T?)newValue).HasValue; if (((IValue<bool>)(object)field).Value != hasValue) { ((IWorldElement)field).World.RunSynchronously((Action)delegate { field.SetWithoutChangedHandler(hasValue, FieldChanged); }, false, (IUpdatable)null, false); } } } private static void SetWithoutChangedHandler<T>(this IField<T> field, T value, Action<IChangeable> changedHandler) { ((IChangeable)field).Changed -= changedHandler; ((IValue<T>)(object)field).Value = value; ((IChangeable)field).Changed += changedHandler; } private static void SetupChangedHandlers(this IField field, Action<IChangeable> fieldChangedHandler, ModConfigurationKey configKey, OnChangedHandler keyChangedHandler) { Component parent = WorldElementExtensions.FindNearestParent<Component>((IWorldElement)(object)field, (Predicate<Component>)null); ((IChangeable)field).Changed += fieldChangedHandler; configKey.OnChanged += keyChangedHandler; ((ComponentBase<Component>)(object)parent).Destroyed += ParentDestroyedHandler; void ParentDestroyedHandler(IDestroyable _) { ((ComponentBase<Component>)(object)parent).Destroyed -= ParentDestroyedHandler; configKey.OnChanged -= keyChangedHandler; ((IChangeable)field).Changed -= fieldChangedHandler; } } public static bool IsEmpty(ModConfiguration config) { if (config != null && ((global::System.Collections.Generic.ICollection<ModConfigurationKey>)config.ConfigurationItemDefinitions).Count != 0) { return Enumerable.All<ModConfigurationKey>((global::System.Collections.Generic.IEnumerable<ModConfigurationKey>)config.ConfigurationItemDefinitions, (Func<ModConfigurationKey, bool>)((ModConfigurationKey configIn) => !Plugin.ShowHidden.Value && configIn.InternalAccessOnly)); } return true; } } [ResonitePlugin("NepuShiro.RMLModSettings", "RML Mod Settings", "1.3.3", "NepuShiro", "https://github.com/NepuShiro/RMLModSettings")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BasePlugin { [HarmonyPatch] private class AssemblyPostProcessorPatch { private static MethodBase TargetMethod() { return (MethodBase)(object)AccessTools.Method(typeof(AssemblyPostProcessor), "Process", new global::System.Type[3] { typeof(string), typeof(string).MakeByRefType(), typeof(string) }, (global::System.Type[])null); } private static global::System.Exception Finalizer(global::System.Exception __exception) { IOException ex = (IOException)(object)((__exception is IOException) ? __exception : null); if (ex != null && ((global::System.Exception)(object)ex).Message.Contains("ResoniteModLoader.dll") && ((global::System.Exception)(object)ex).Message.Contains("being used by another process")) { Log.LogError((object)("Suppressed IOException: " + ((global::System.Exception)(object)ex).Message)); return null; } return __exception; } } [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public IButton btn; public ValueMultiDriver<bool> vmd; public string modId; public Action <>9__2; internal void <ResetConfigs>b__2() { LocaleHelper.SetLocalized(btn.LabelTextField, "Settings.RML.Mods.ResetConfig", (string)null, (Dictionary<string, object>)null); } internal bool <ResetConfigs>b__0(ResoniteModBase mod) { return mod.GetModId() == modId; } } [CompilerGenerated] private sealed class <>c__DisplayClass10_1 { [StructLayout((LayoutKind)3)] private struct <<ResetConfigs>b__1>d : IAsyncStateMachine { public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; public <>c__DisplayClass10_1 <>4__this; private TaskAwaiter <>u__1; private void MoveNext() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00ba: Expected O, but got Unknown int num = <>1__state; <>c__DisplayClass10_1 <>c__DisplayClass10_ = <>4__this; try { TaskAwaiter val; if (num != 0) { val = global::System.Threading.Tasks.Task.Delay(2000, <>c__DisplayClass10_.token).GetAwaiter(); if (!((TaskAwaiter)(ref val)).IsCompleted) { num = (<>1__state = 0); <>u__1 = val; ((AsyncTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <<ResetConfigs>b__1>d>(ref val, ref this); return; } } else { val = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); } ((TaskAwaiter)(ref val)).GetResult(); if (_resetPressed) { IButton obj = <>c__DisplayClass10_.CS$<>8__locals1.btn; Action obj2 = <>c__DisplayClass10_.CS$<>8__locals1.<>9__2; if (obj2 == null) { <>c__DisplayClass10_0 <>c__DisplayClass10_2 = <>c__DisplayClass10_.CS$<>8__locals1; Action val2 = delegate { LocaleHelper.SetLocalized(<>c__DisplayClass10_.CS$<>8__locals1.btn.LabelTextField, "Settings.RML.Mods.ResetConfig", (string)null, (Dictionary<string, object>)null); }; Action val3 = val2; <>c__DisplayClass10_2.<>9__2 = val2; obj2 = val3; } ((IComponentBase)obj).RunSynchronously(obj2, false); _resetPressed = false; if (<>c__DisplayClass10_.CS$<>8__locals1.vmd != null) { ((SyncField<bool>)(object)<>c__DisplayClass10_.CS$<>8__locals1.vmd.Value).Value = _resetPressed; } } } catch (global::System.Exception exception) { <>1__state = -2; ((AsyncTaskMethodBuilder)(ref <>t__builder)).SetException(exception); return; } <>1__state = -2; ((AsyncTaskMethodBuilder)(ref <>t__builder)).SetResult(); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { ((AsyncTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine); } } public CancellationToken token; public <>c__DisplayClass10_0 CS$<>8__locals1; [AsyncStateMachine(typeof(<<ResetConfigs>b__1>d))] internal global::System.Threading.Tasks.Task? <ResetConfigs>b__1() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) <<ResetConfigs>b__1>d <<ResetConfigs>b__1>d = default(<<ResetConfigs>b__1>d); <<ResetConfigs>b__1>d.<>t__builder = AsyncTaskMethodBuilder.Create(); <<ResetConfigs>b__1>d.<>4__this = this; <<ResetConfigs>b__1>d.<>1__state = -1; ((AsyncTaskMethodBuilder)(ref <<ResetConfigs>b__1>d.<>t__builder)).Start<<<ResetConfigs>b__1>d>(ref <<ResetConfigs>b__1>d); return ((AsyncTaskMethodBuilder)(ref <<ResetConfigs>b__1>d.<>t__builder)).Task; } } [CompilerGenerated] private sealed class <>c__DisplayClass4_0 { public DataFeedLabel noResults; internal void <RmlSettingsEnumerate>b__4(IField<bool> x) { ((IValue<bool>)(object)x).Value = false; Slot val = default(Slot); if (DataFeedHelpers.TryFindClosestSlot((IWorldElement)(object)x, ref val)) { DataFeedHelpers.EnsureSpace(val, DynamicVariableHelper.ProcessName(((DataFeedItem)noResults).ItemKey)); DataFeedHelpers.CreateDynField<bool>(val, "Visible", x); DataFeedHelpers.CreateValVar<string>(val, "Name", ((DataFeedItem)noResults).ItemKey); } } } [CompilerGenerated] private sealed class <>c__DisplayClass4_1 { public Button btn; internal void <RmlSettingsEnumerate>b__5(IButton _, ButtonEventData _) { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown Slot obj = ((Component)btn).Slot.FindParent((Predicate<Slot>)((Slot x2) => x2.Name == "Reset Button"), -1); Store<bool> val = ((obj != null) ? obj.GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false) : null); if (val == null || !((SyncField<bool>)(object)val.Value).Value || ((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Count == 0) { return; } ManualLogSource log = Log; bool flag = default(bool); BepInExDebugLogInterpolatedStringHandler val2 = new BepInExDebugLogInterpolatedStringHandler(18, 0, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("Saving All Configs"); } log.LogDebug(val2); CollectionExtensions.Do<ResoniteModBase>(ModLoader.Mods(), (Action<ResoniteModBase>)delegate(ResoniteModBase x3) { if (x3 != null) { ModConfiguration configuration = x3.GetConfiguration(); if (configuration != null) { configuration.Save(false); } } }); } } [CompilerGenerated] private sealed class <>c__DisplayClass4_2 { public bool isEmpty; public ResoniteModBase mod; public string modGuid; public string modName; public string modDesc; internal void <RmlSettingsEnumerate>b__8(IField<bool> x) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) Slot val = default(Slot); if (!DataFeedHelpers.TryFindClosestSlot((IWorldElement)(object)x, ref val)) { return; } if (isEmpty) { Button component = ((ContainerWorker<Component>)(object)val).GetComponent<Button>((Predicate<Button>)null, false); if (component != null) { SyncList<ColorDriver> colorDrivers = ((InteractionElement)component).ColorDrivers; if (colorDrivers != null && ((SyncElementList<ColorDriver>)(object)colorDrivers).Count == 2) { ColorDriver obj = ((SyncElementList<ColorDriver>)(object)((InteractionElement)component).ColorDrivers)[0]; ((SyncField<colorX>)(object)obj.NormalColor).Value = Sub.ORANGE; ((SyncField<colorX>)(object)obj.HighlightColor).Value = Dark.ORANGE; } } } DataFeedHelpers.EnsureSpace(val, DynamicVariableHelper.ProcessName(modGuid)); DataFeedHelpers.CreateDynField<bool>(val, "Visible", x); DataFeedHelpers.CreateValVar<string>(val, "Name", modName); DataFeedHelpers.CreateValVar<string>(val, "Description", modDesc); DataFeedHelpers.CreateValVar<string>(val, "ID", modGuid); DataFeedHelpers.CreateValVar<string>(val, "Version", mod.Version); DataFeedHelpers.CreateValVar<string>(val, "Author", mod.Author); } } [CompilerGenerated] private sealed class <>c__DisplayClass5_0 { public string modId; public ResoniteModBase mod; public Uri uri; internal bool <RmlSettingsConfigsEnumerate>b__0(ResoniteModBase mod) { return mod.GetModId() == modId; } internal void <RmlSettingsConfigsEnumerate>b__1(IField<string> field) { ((IValue<string>)(object)field).Value = modId; } internal void <RmlSettingsConfigsEnumerate>b__3(IField<string> field) { ((IValue<string>)(object)field).Value = mod.Author; } internal void <RmlSettingsConfigsEnumerate>b__2(IField<string> field) { ((IValue<string>)(object)field).Value = mod.Version; } internal void <RmlSettingsConfigsEnumerate>b__4(SyncDelegate<Action> syncDelegate) { Slot val = ((syncDelegate != null) ? ((SyncElement)syncDelegate).Slot : null); if (val != null) { ((SyncField<Uri>)(object)((ContainerWorker<Component>)(object)val).AttachComponent<Hyperlink>(true, (Action<Hyperlink>)null).URL).Value = uri; } } } [CompilerGenerated] private sealed class <>c__DisplayClass6_0 { public Action<SyncDelegate<Action>> oldAction; public string modId; public ButtonEventHandler <>9__3; public ButtonEventHandler <>9__11; internal void <EnumerateConfigs>b__0(SyncDelegate<Action> a) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_0044: Expected O, but got Unknown oldAction?.Invoke(a); Button componentInChildren = ((SyncElement)a).Slot.GetComponentInChildren<Button>((Predicate<Button>)null, false, false); if (componentInChildren == null) { return; } ButtonEventHandler obj = <>9__3; if (obj == null) { ButtonEventHandler val = delegate(IButton b, ButtonEventData _) { Slot obj2 = ((IComponent)b).Slot.FindParent((Predicate<Slot>)((Slot x) => x.Name == "Reset Button"), -1); Store<bool> val3 = ((obj2 != null) ? obj2.GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false) : null); if (val3 != null && ((SyncField<bool>)(object)val3.Value).Value) { ResetConfigSection(modId, "Configs"); } }; ButtonEventHandler val2 = val; <>9__3 = val; obj = val2; } componentInChildren.LocalPressed += obj; } internal void <EnumerateConfigs>b__3(IButton b, ButtonEventData _) { Slot obj = ((IComponent)b).Slot.FindParent((Predicate<Slot>)((Slot x) => x.Name == "Reset Button"), -1); Store<bool> val = ((obj != null) ? obj.GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false) : null); if (val != null && ((SyncField<bool>)(object)val.Value).Value) { ResetConfigSection(modId, "Configs"); } } internal void <EnumerateConfigs>b__1(SyncDelegate<Action> syncDelegate) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0031: Expected O, but got Unknown Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false); if (component == null) { return; } ButtonEventHandler obj = <>9__11; if (obj == null) { ButtonEventHandler val = delegate { SaveConfigs(modId); }; ButtonEventHandler val2 = val; <>9__11 = val; obj = val2; } component.LocalPressed += obj; } internal void <EnumerateConfigs>b__11(IButton _, ButtonEventData _) { SaveConfigs(modId); } internal void <EnumerateConfigs>b__2(SyncDelegate<Action> syncDelegate) { //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_007a: 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_00bc: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass6_2 CS$<>8__locals13 = new <>c__DisplayClass6_2 { CS$<>8__locals1 = this, btn = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot)?.GetComponent<Button>((Predicate<Button>)null, false) }; if (CS$<>8__locals13.btn != null) { CS$<>8__locals13.valueDriver = ((ContainerWorker<Component>)(object)((Component)CS$<>8__locals13.btn).Slot).GetComponent<ValueMultiDriver<bool>>((Predicate<ValueMultiDriver<bool>>)null, false); if (CS$<>8__locals13.valueDriver != null && ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals13.valueDriver.Drives).Count > 0) { SetColor(0, new colorX(0.36f, 0.2f, 0.23f, 1f, (ColorProfile)1)); SetColor(1, new colorX(1f, 0.46f, 0.46f, 1f, (ColorProfile)1)); SetColor(3, new colorX(0.88f, 0.88f, 0.88f, 1f, (ColorProfile)1)); } CS$<>8__locals13.btn.LocalPressed += (ButtonEventHandler)delegate(IButton b, ButtonEventData _) { ResetConfigs(b, CS$<>8__locals13.CS$<>8__locals1.modId, CS$<>8__locals13.valueDriver); }; } void SetColor(int index, colorX color) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass6_3 CS$<>8__locals14 = new <>c__DisplayClass6_3(); if (index < ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals13.valueDriver.Drives).Count) { CS$<>8__locals14.drive = ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals13.valueDriver.Drives)[index]; BooleanValueDriver<colorX> component = ((ContainerWorker<Component>)(object)((Component)CS$<>8__locals13.btn).Slot).GetComponent<BooleanValueDriver<colorX>>((Predicate<BooleanValueDriver<colorX>>)((BooleanValueDriver<colorX> x) => (object)x.State == ((SyncRef<IField<bool>>)(object)CS$<>8__locals14.drive).Target), false); if (component != null) { ((SyncField<colorX>)(object)component.TrueValue).Value = color; } } } } } [CompilerGenerated] private sealed class <>c__DisplayClass6_1 { public LocaleString descKey2; internal void <EnumerateConfigs>b__5(IField<string> x) { ((IValue<string>)(object)x).Value = LocaleLoader.GetFormattedLocaleString(descKey2.content); } } [CompilerGenerated] private sealed class <>c__DisplayClass6_2 { public ValueMultiDriver<bool> valueDriver; public Button btn; public <>c__DisplayClass6_0 CS$<>8__locals1; internal void <EnumerateConfigs>b__12(IButton b, ButtonEventData _) { ResetConfigs(b, CS$<>8__locals1.modId, valueDriver); } } [CompilerGenerated] private sealed class <>c__DisplayClass6_3 { public FieldDrive<bool> drive; internal bool <EnumerateConfigs>b__14(BooleanValueDriver<colorX> x) { return (object)x.State == ((SyncRef<IField<bool>>)(object)drive).Target; } } [CompilerGenerated] private sealed class <EnumerateConfigs>d__6 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine { public int <>1__state; public AsyncIteratorMethodBuilder <>t__builder; public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd; private DataFeedItem <>2__current; private bool <>w__disposeMode; private int <>l__initialThreadId; private global::System.Collections.Generic.IReadOnlyList<string> path; public global::System.Collections.Generic.IReadOnlyList<string> <>3__path; private ModConfiguration config; public ModConfiguration <>3__config; private <>c__DisplayClass6_0 <>8__1; private List<string> <added>5__2; private string[] <groupKeys>5__3; private global::System.Collections.Generic.IEnumerator<ModConfigurationKey> <>7__wrap3; private global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> <>7__wrap4; private object <>7__wrap5; private int <>7__wrap6; private ValueTaskAwaiter<bool> <>u__1; private ValueTaskAwaiter <>u__2; DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <EnumerateConfigs>d__6(int <>1__state) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) <>t__builder = AsyncIteratorMethodBuilder.Create(); this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } private void MoveNext() { //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: 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_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_0807: Unknown result type (might be due to invalid IL or missing references) //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //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_098e: Unknown result type (might be due to invalid IL or missing references) //IL_0995: Expected O, but got Unknown //IL_09b0: Unknown result type (might be due to invalid IL or missing references) //IL_09bd: Unknown result type (might be due to invalid IL or missing references) //IL_090f: Unknown result type (might be due to invalid IL or missing references) //IL_0915: Expected O, but got Unknown //IL_092f: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Unknown result type (might be due to invalid IL or missing references) //IL_0728: Unknown result type (might be due to invalid IL or missing references) //IL_072d: 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_0662: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_08a5: Unknown result type (might be due to invalid IL or missing references) //IL_08ab: Expected O, but got Unknown //IL_08c0: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Expected O, but got Unknown //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0330: 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_0488: Expected O, but got Unknown //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Expected O, but got Unknown int num = <>1__state; try { switch (num) { default: { if (<>w__disposeMode) { break; } num = (<>1__state = -1); <>8__1 = new <>c__DisplayClass6_0(); <>8__1.modId = path[1]; DataFeedResettableGroup val2 = DataFeedHelpers.DataFeedCollapseResettableGroup("Configs", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleString.op_Implicit("Configs"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); <>8__1.oldAction = val2.ResetAction; val2.InitResetAction((Action<SyncDelegate<Action>>)delegate(SyncDelegate<Action> a) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_0044: Expected O, but got Unknown <>8__1.oldAction?.Invoke(a); Button componentInChildren = ((SyncElement)a).Slot.GetComponentInChildren<Button>((Predicate<Button>)null, false, false); if (componentInChildren != null) { ButtonEventHandler obj5 = <>8__1.<>9__3; if (obj5 == null) { ButtonEventHandler val15 = delegate(IButton b, ButtonEventData _) { Slot obj6 = ((IComponent)b).Slot.FindParent((Predicate<Slot>)((Slot x) => x.Name == "Reset Button"), -1); Store<bool> val17 = ((obj6 != null) ? obj6.GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false) : null); if (val17 != null && ((SyncField<bool>)(object)val17.Value).Value) { ResetConfigSection(<>8__1.modId, "Configs"); } }; ButtonEventHandler val16 = val15; <>8__1.<>9__3 = val15; obj5 = val16; } componentInChildren.LocalPressed += obj5; } }); <>2__current = (DataFeedItem)(object)val2; num = (<>1__state = -4); goto IL_0ab3; } case -4: num = (<>1__state = -1); if (<>w__disposeMode) { break; } <added>5__2 = new List<string>(); <>7__wrap3 = ((global::System.Collections.Generic.IEnumerable<ModConfigurationKey>)config.ConfigurationItemDefinitions).GetEnumerator(); goto case -9; case -9: case -8: case -7: case -6: case -5: case 0: case 1: { try { ValueTaskAwaiter val4; object obj4; switch (num) { case -5: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto default; case -6: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto default; case -7: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto default; case -8: case 0: try { ValueTaskAwaiter<bool> val13; if (num != -8) { if (num != 0) { goto IL_064c; } val13 = <>u__1; <>u__1 = default(ValueTaskAwaiter<bool>); num = (<>1__state = -1); goto IL_06b7; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_064c; } goto end_IL_05df; IL_064c: <>2__current = null; val13 = <>7__wrap4.MoveNextAsync().GetAwaiter(); if (!val13.IsCompleted) { num = (<>1__state = 0); <>u__1 = val13; <EnumerateConfigs>d__6 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <EnumerateConfigs>d__6>(ref val13, ref <EnumerateConfigs>d__); return; } goto IL_06b7; IL_06b7: if (val13.GetResult()) { DataFeedItem current2 = <>7__wrap4.Current; current2.InitVisible((Action<IField<bool>>)delegate(IField<bool> x) { ((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value; }); <>2__current = current2; num = (<>1__state = -8); goto IL_0ab3; } end_IL_05df:; } catch (object obj3) { <>7__wrap5 = obj3; } if (<>7__wrap4 != null) { <>2__current = null; val4 = ((global::System.IAsyncDisposable)<>7__wrap4).DisposeAsync().GetAwaiter(); if (!((ValueTaskAwaiter)(ref val4)).IsCompleted) { num = (<>1__state = 1); <>u__2 = val4; <EnumerateConfigs>d__6 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <EnumerateConfigs>d__6>(ref val4, ref <EnumerateConfigs>d__); return; } goto IL_0744; } goto IL_074b; case 1: val4 = <>u__2; <>u__2 = default(ValueTaskAwaiter); num = (<>1__state = -1); goto IL_0744; case -9: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto default; default: { object obj = default(object); while (((global::System.Collections.IEnumerator)<>7__wrap3).MoveNext()) { ModConfigurationKey current = <>7__wrap3.Current; <>c__DisplayClass6_1 CS$<>8__locals10 = new <>c__DisplayClass6_1(); bool internalAccessOnly = current.InternalAccessOnly; if (!Plugin.ShowHidden.Value && internalAccessOnly) { continue; } global::System.Type type = current.ValueType(); string text = "Configs." + current.Name; string text2 = (<added>5__2.Contains(text) ? (text + <added>5__2.Count) : text); <added>5__2.Add(text2); string text3; if (current.TryComputeDefault(ref obj)) { if (obj == null) { text3 = "<i>Null</i>"; } else { string text4 = obj.ToString(); text3 = (string.IsNullOrEmpty(text4) ? "<i>Empty String</i>" : ((!(type == typeof(string)) && !(type == typeof(Uri))) ? text4 : ("\"" + text4 + "\""))); } } else { text3 = "<i>Couldn't Compute Default</i>"; } LocaleString val5 = LocaleString.op_Implicit(internalAccessOnly ? ("<color=hero.yellow>" + current.Name + "</color>") : current.Name); LocaleString val6 = LocaleString.op_Implicit(current.Description + "\n\nDefault: " + text3); CS$<>8__locals10.descKey2 = LocaleString.op_Implicit(current.Description); LocaleString val7 = LocaleString.op_Implicit($"{current.Name} : {type}"); InternalLocale val8 = new InternalLocale(val5, val6); string[] array = new string[1] { "Configs" }; if (type == typeof(dummy)) { DataFeedIndicator<string> val9 = new DataFeedIndicator<string>(); ((DataFeedItem)val9).InitBase(text2, path, (global::System.Collections.Generic.IReadOnlyList<string>)array, val5, CS$<>8__locals10.descKey2, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val9.InitSetupValue((Action<IField<string>>)delegate(IField<string> x) { ((IValue<string>)(object)x).Value = LocaleLoader.GetFormattedLocaleString(CS$<>8__locals10.descKey2.content); }, (string)null); ((DataFeedItem)val9).InitVisible((Action<IField<bool>>)delegate(IField<bool> x) { ((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value; }); <>2__current = (DataFeedItem)(object)val9; num = (<>1__state = -5); } else if (type == typeof(bool)) { DataFeedToggle val10 = ConfigHelpers.GenerateToggle(text2, path, array, val8, config, current); ((DataFeedItem)val10).InitVisible((Action<IField<bool>>)delegate(IField<bool> x) { ((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value; }); <>2__current = (DataFeedItem)(object)val10; num = (<>1__state = -6); } else if (type.IsEnum) { DataFeedItem val11; try { val11 = (DataFeedItem)((MethodBase)ConfigHelpers.GenerateEnumItemsAsync.MakeGenericMethod(new global::System.Type[1] { type })).Invoke((object)null, new object[6] { text2, path, array, val8, config, current }); } catch (global::System.Exception ex) { Log.LogError((object)ex); val11 = (DataFeedItem)(object)new DataFeedValueField<dummy>(); val11.InitBase(text2, path, (global::System.Collections.Generic.IReadOnlyList<string>)array, val7, val6, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); } val11.InitVisible((Action<IField<bool>>)delegate(IField<bool> x) { ((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value; }); <>2__current = val11; num = (<>1__state = -7); } else { if (ReflectionExtensions.IsNullable(type)) { global::System.Type type2 = type.GetGenericArguments()[0]; if (!type2.IsEnum) { continue; } global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable; try { asyncEnumerable = (global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>)((MethodBase)ConfigHelpers.GenerateNullableEnumItemsAsync.MakeGenericMethod(new global::System.Type[1] { type2 })).Invoke((object)null, new object[6] { text2, path, array, val8, config, current }); } catch (global::System.Exception ex2) { Log.LogError((object)ex2); DataFeedValueField<dummy> obj2 = new DataFeedValueField<dummy>(); ((DataFeedItem)obj2).InitBase(text2, path, (global::System.Collections.Generic.IReadOnlyList<string>)array, val7, val6, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); asyncEnumerable = DataFeedHelpers.AsAsyncEnumerable((DataFeedItem)(object)obj2); } <>7__wrap4 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken)); <>7__wrap5 = null; <>7__wrap6 = 0; goto case -8; } DataFeedItem val12; try { val12 = (DataFeedItem)((MethodBase)ConfigHelpers.GenerateValueField.MakeGenericMethod(new global::System.Type[1] { type })).Invoke((object)null, new object[6] { text2, path, array, val8, config, current }); } catch (global::System.Exception ex3) { Log.LogError((object)ex3); val12 = (DataFeedItem)(object)new DataFeedValueField<dummy>(); val12.InitBase(text2, path, (global::System.Collections.Generic.IReadOnlyList<string>)array, val7, val6, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); } val12.InitVisible((Action<IField<bool>>)delegate(IField<bool> x) { ((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value; }); <>2__current = val12; num = (<>1__state = -9); } goto IL_0ab3; } break; } IL_074b: obj4 = <>7__wrap5; if (obj4 != null) { ExceptionDispatchInfo.Capture((obj4 as global::System.Exception) ?? throw obj4).Throw(); } _ = <>7__wrap6; if (<>w__disposeMode) { break; } <>7__wrap5 = null; <>7__wrap4 = null; goto default; IL_0744: ((ValueTaskAwaiter)(ref val4)).GetResult(); goto IL_074b; } } finally { if (num == -1 && <>7__wrap3 != null) { ((global::System.IDisposable)<>7__wrap3).Dispose(); } } if (<>w__disposeMode) { break; } <>7__wrap3 = null; DataFeedGroup val14 = new DataFeedGroup(); ((DataFeedItem)val14).InitBase("ActionsGroup", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.RML.Mods.Actions", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); <>2__current = (DataFeedItem)(object)val14; num = (<>1__state = -10); goto IL_0ab3; } case -10: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } <groupKeys>5__3 = new string[1] { "ActionsGroup" }; DataFeedAction val3 = new DataFeedAction(); ((DataFeedItem)val3).InitBase("SaveConfig", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupKeys>5__3, LocaleHelper.AsLocaleKey("Settings.RML.Mods.SaveConfig", (string)null, true, (Dictionary<string, object>)null), LocaleHelper.AsLocaleKey("Settings.RML.Mods.SaveConfig.Description", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val3.InitAction((Action<SyncDelegate<Action>>)delegate(SyncDelegate<Action> syncDelegate) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0031: Expected O, but got Unknown Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false); if (component != null) { ButtonEventHandler obj5 = <>8__1.<>9__11; if (obj5 == null) { ButtonEventHandler val15 = delegate { SaveConfigs(<>8__1.modId); }; ButtonEventHandler val16 = val15; <>8__1.<>9__11 = val15; obj5 = val16; } component.LocalPressed += obj5; } }); <>2__current = (DataFeedItem)(object)val3; num = (<>1__state = -11); goto IL_0ab3; } case -11: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } DataFeedAction val = new DataFeedAction(); ((DataFeedItem)val).InitBase("ResetConfig", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupKeys>5__3, LocaleHelper.AsLocaleKey("Settings.RML.Mods.ResetConfig", (string)null, true, (Dictionary<string, object>)null), LocaleHelper.AsLocaleKey("Settings.RML.Mods.ResetConfig.Description", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val.InitAction((Action<SyncDelegate<Action>>)delegate(SyncDelegate<Action> syncDelegate) { //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_007a: 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_00bc: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass6_2 CS$<>8__locals17 = new <>c__DisplayClass6_2 { CS$<>8__locals1 = <>8__1, btn = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot)?.GetComponent<Button>((Predicate<Button>)null, false) }; if (CS$<>8__locals17.btn != null) { CS$<>8__locals17.valueDriver = ((ContainerWorker<Component>)(object)((Component)CS$<>8__locals17.btn).Slot).GetComponent<ValueMultiDriver<bool>>((Predicate<ValueMultiDriver<bool>>)null, false); if (CS$<>8__locals17.valueDriver != null && ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals17.valueDriver.Drives).Count > 0) { SetColor(0, new colorX(0.36f, 0.2f, 0.23f, 1f, (ColorProfile)1)); SetColor(1, new colorX(1f, 0.46f, 0.46f, 1f, (ColorProfile)1)); SetColor(3, new colorX(0.88f, 0.88f, 0.88f, 1f, (ColorProfile)1)); } CS$<>8__locals17.btn.LocalPressed += (ButtonEventHandler)delegate(IButton b, ButtonEventData _) { ResetConfigs(b, CS$<>8__locals17.CS$<>8__locals1.modId, CS$<>8__locals17.valueDriver); }; } void SetColor(int index, colorX color) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass6_3 CS$<>8__locals18 = new <>c__DisplayClass6_3(); if (index < ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals17.valueDriver.Drives).Count) { CS$<>8__locals18.drive = ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals17.valueDriver.Drives)[index]; BooleanValueDriver<colorX> component = ((ContainerWorker<Component>)(object)((Component)CS$<>8__locals17.btn).Slot).GetComponent<BooleanValueDriver<colorX>>((Predicate<BooleanValueDriver<colorX>>)((BooleanValueDriver<colorX> x) => (object)x.State == ((SyncRef<IField<bool>>)(object)CS$<>8__locals18.drive).Target), false); if (component != null) { ((SyncField<colorX>)(object)component.TrueValue).Value = color; } } } }); <>2__current = (DataFeedItem)(object)val; num = (<>1__state = -12); goto IL_0ab3; } case -12: num = (<>1__state = -1); _ = <>w__disposeMode; break; } } catch (global::System.Exception exception) { <>1__state = -2; <>8__1 = null; <added>5__2 = null; <groupKeys>5__3 = null; <>7__wrap3 = null; <>7__wrap4 = null; <>7__wrap5 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetException(exception); return; } <>1__state = -2; <>8__1 = null; <added>5__2 = null; <groupKeys>5__3 = null; <>7__wrap3 = null; <>7__wrap4 = null; <>7__wrap5 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetResult(false); return; IL_0ab3: <>v__promiseOfValueOrEnd.SetResult(true); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { } [DebuggerHidden] global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>.GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken)) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) <EnumerateConfigs>d__6 <EnumerateConfigs>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = -3; <>t__builder = AsyncIteratorMethodBuilder.Create(); <>w__disposeMode = false; <EnumerateConfigs>d__ = this; } else { <EnumerateConfigs>d__ = new <EnumerateConfigs>d__6(-3); } <EnumerateConfigs>d__.config = <>3__config; <EnumerateConfigs>d__.path = <>3__path; return <EnumerateConfigs>d__; } [DebuggerHidden] global::System.Threading.Tasks.ValueTask<bool> global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.MoveNextAsync() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask<bool>); } <>v__promiseOfValueOrEnd.Reset(); <EnumerateConfigs>d__6 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<EnumerateConfigs>d__6>(ref <EnumerateConfigs>d__); short version = <>v__promiseOfValueOrEnd.Version; if ((int)<>v__promiseOfValueOrEnd.GetStatus(version) == 1) { return new global::System.Threading.Tasks.ValueTask<bool>(<>v__promiseOfValueOrEnd.GetResult(version)); } return new global::System.Threading.Tasks.ValueTask<bool>((IValueTaskSource<bool>)this, version); } [DebuggerHidden] bool IValueTaskSource<bool>.GetResult(short token) { return <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] void IValueTaskSource.GetResult(short token) { <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] global::System.Threading.Tasks.ValueTask global::System.IAsyncDisposable.DisposeAsync() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) if (<>1__state >= -1) { throw new NotSupportedException(); } if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask); } <>w__disposeMode = true; <>v__promiseOfValueOrEnd.Reset(); <EnumerateConfigs>d__6 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<EnumerateConfigs>d__6>(ref <EnumerateConfigs>d__); return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version); } } [CompilerGenerated] private sealed class <RmlSettingsConfigsEnumerate>d__5 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine { public int <>1__state; public AsyncIteratorMethodBuilder <>t__builder; public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd; private DataFeedItem <>2__current; private bool <>w__disposeMode; private int <>l__initialThreadId; private <>c__DisplayClass5_0 <>8__1; private global::System.Collections.Generic.IReadOnlyList<string> path; public global::System.Collections.Generic.IReadOnlyList<string> <>3__path; private string[] <metadataGroup>5__2; private TaskAwaiter <>u__1; private global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> <>7__wrap2; private object <>7__wrap3; private int <>7__wrap4; private ValueTaskAwaiter<bool> <>u__2; private ValueTaskAwaiter <>u__3; DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <RmlSettingsConfigsEnumerate>d__5(int <>1__state) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) <>t__builder = AsyncIteratorMethodBuilder.Create(); this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } private void MoveNext() { //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Expected O, but got Unknown //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_057e: Expected O, but got Unknown //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; try { TaskAwaiter val2; ValueTaskAwaiter val7; object obj; DataFeedGroup val3; ModConfiguration configuration; global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable; DataFeedIndicator<string> val8; switch (num) { default: if (<>w__disposeMode) { break; } num = (<>1__state = -1); <>8__1 = new <>c__DisplayClass5_0(); <>2__current = null; val2 = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter(); if (!((TaskAwaiter)(ref val2)).IsCompleted) { num = (<>1__state = 0); <>u__1 = val2; <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <RmlSettingsConfigsEnumerate>d__5>(ref val2, ref <RmlSettingsConfigsEnumerate>d__); return; } goto IL_00c6; case 0: val2 = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); goto IL_00c6; case -4: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto IL_0358; case -5: case 1: try { ValueTaskAwaiter<bool> val6; if (num != -5) { if (num != 1) { goto IL_0214; } val6 = <>u__2; <>u__2 = default(ValueTaskAwaiter<bool>); num = (<>1__state = -1); goto IL_027f; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_0214; } goto end_IL_01cc; IL_0214: <>2__current = null; val6 = <>7__wrap2.MoveNextAsync().GetAwaiter(); if (!val6.IsCompleted) { num = (<>1__state = 1); <>u__2 = val6; <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <RmlSettingsConfigsEnumerate>d__5>(ref val6, ref <RmlSettingsConfigsEnumerate>d__); return; } goto IL_027f; IL_027f: if (val6.GetResult()) { DataFeedItem current = <>7__wrap2.Current; <>2__current = current; num = (<>1__state = -5); goto IL_0673; } end_IL_01cc:; } catch (object obj2) { <>7__wrap3 = obj2; } if (<>7__wrap2 != null) { <>2__current = null; val7 = ((global::System.IAsyncDisposable)<>7__wrap2).DisposeAsync().GetAwaiter(); if (!((ValueTaskAwaiter)(ref val7)).IsCompleted) { num = (<>1__state = 2); <>u__3 = val7; <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <RmlSettingsConfigsEnumerate>d__5>(ref val7, ref <RmlSettingsConfigsEnumerate>d__); return; } goto IL_030c; } goto IL_0313; case 2: val7 = <>u__3; <>u__3 = default(ValueTaskAwaiter); num = (<>1__state = -1); goto IL_030c; case -6: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } <metadataGroup>5__2 = new string[1] { "Metadata" }; DataFeedIndicator<string> val9 = new DataFeedIndicator<string>(); ((DataFeedItem)val9).InitBase("Id", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.RML.Mods.Guid", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val9.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = <>8__1.modId; }, (string)null); <>2__current = (DataFeedItem)(object)val9; num = (<>1__state = -7); goto IL_0673; } case -7: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } if (string.IsNullOrWhiteSpace(<>8__1.mod.Author)) { goto IL_04c3; } DataFeedIndicator<string> val4 = new DataFeedIndicator<string>(); ((DataFeedItem)val4).InitBase("Author", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.RML.Mods.Author", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val4.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = <>8__1.mod.Author; }, (string)null); <>2__current = (DataFeedItem)(object)val4; num = (<>1__state = -8); goto IL_0673; } case -8: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto IL_04c3; case -9: { num = (<>1__state = -1); if (<>w__disposeMode || string.IsNullOrWhiteSpace(<>8__1.mod.Link) || !Uri.TryCreate(<>8__1.mod.Link, (UriKind)1, ref <>8__1.uri)) { break; } DataFeedAction val = new DataFeedAction(); ((DataFeedItem)val).InitBase("Link", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.RML.Mods.ModPage", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val.InitAction((Action<SyncDelegate<Action>>)delegate(SyncDelegate<Action> syncDelegate) { Slot val10 = ((syncDelegate != null) ? ((SyncElement)syncDelegate).Slot : null); if (val10 != null) { ((SyncField<Uri>)(object)((ContainerWorker<Component>)(object)val10).AttachComponent<Hyperlink>(true, (Action<Hyperlink>)null).URL).Value = <>8__1.uri; } }); <>2__current = (DataFeedItem)(object)val; num = (<>1__state = -10); goto IL_0673; } case -10: { num = (<>1__state = -1); _ = <>w__disposeMode; break; } IL_0313: obj = <>7__wrap3; if (obj != null) { ExceptionDispatchInfo.Capture((obj as global::System.Exception) ?? throw obj).Throw(); } _ = <>7__wrap4; if (<>w__disposeMode) { break; } <>7__wrap3 = null; <>7__wrap2 = null; goto IL_0358; IL_0358: val3 = new DataFeedGroup(); ((DataFeedItem)val3).InitBase("Metadata", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.RML.Mods.Metadata", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); <>2__current = (DataFeedItem)(object)val3; num = (<>1__state = -6); goto IL_0673; IL_00c6: ((TaskAwaiter)(ref val2)).GetResult(); <>8__1.modId = path[1]; <>8__1.mod = Enumerable.FirstOrDefault<ResoniteModBase>(ModLoader.Mods(), (Func<ResoniteModBase, bool>)((ResoniteModBase mod) => mod.GetModId() == <>8__1.modId)); if (<>8__1.mod == null) { <>w__disposeMode = true; break; } configuration = <>8__1.mod.GetConfiguration(); if (ConfigHelpers.IsEmpty(configuration)) { DataFeedLabel val5 = new DataFeedLabel(); ((DataFeedItem)val5).InitBase("NoConfigs", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.RML.Mods.NoConfigs", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); <>2__current = (DataFeedItem)(object)val5; num = (<>1__state = -4); goto IL_0673; } asyncEnumerable = EnumerateConfigs(configuration, path); <>7__wrap2 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken)); <>7__wrap3 = null; <>7__wrap4 = 0; goto case -5; IL_04c3: val8 = new DataFeedIndicator<string>(); ((DataFeedItem)val8).InitBase("Version", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.RML.Mods.Version", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val8.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = <>8__1.mod.Version; }, (string)null); <>2__current = (DataFeedItem)(object)val8; num = (<>1__state = -9); goto IL_0673; IL_030c: ((ValueTaskAwaiter)(ref val7)).GetResult(); goto IL_0313; } } catch (global::System.Exception exception) { <>1__state = -2; <>8__1 = null; <metadataGroup>5__2 = null; <>7__wrap2 = null; <>7__wrap3 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetException(exception); return; } <>1__state = -2; <>8__1 = null; <metadataGroup>5__2 = null; <>7__wrap2 = null; <>7__wrap3 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetResult(false); return; IL_0673: <>v__promiseOfValueOrEnd.SetResult(true); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { } [DebuggerHidden] global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>.GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken)) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = -3; <>t__builder = AsyncIteratorMethodBuilder.Create(); <>w__disposeMode = false; <RmlSettingsConfigsEnumerate>d__ = this; } else { <RmlSettingsConfigsEnumerate>d__ = new <RmlSettingsConfigsEnumerate>d__5(-3); } <RmlSettingsConfigsEnumerate>d__.path = <>3__path; return <RmlSettingsConfigsEnumerate>d__; } [DebuggerHidden] global::System.Threading.Tasks.ValueTask<bool> global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.MoveNextAsync() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask<bool>); } <>v__promiseOfValueOrEnd.Reset(); <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<RmlSettingsConfigsEnumerate>d__5>(ref <RmlSettingsConfigsEnumerate>d__); short version = <>v__promiseOfValueOrEnd.Version; if ((int)<>v__promiseOfValueOrEnd.GetStatus(version) == 1) { return new global::System.Threading.Tasks.ValueTask<bool>(<>v__promiseOfValueOrEnd.GetResult(version)); } return new global::System.Threading.Tasks.ValueTask<bool>((IValueTaskSource<bool>)this, version); } [DebuggerHidden] bool IValueTaskSource<bool>.GetResult(short token) { return <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] void IValueTaskSource.GetResult(short token) { <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] global::System.Threading.Tasks.ValueTask global::System.IAsyncDisposable.DisposeAsync() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) if (<>1__state >= -1) { throw new NotSupportedException(); } if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask); } <>w__disposeMode = true; <>v__promiseOfValueOrEnd.Reset(); <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<RmlSettingsConfigsEnumerate>d__5>(ref <RmlSettingsConfigsEnumerate>d__); return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version); } } [CompilerGenerated] private sealed class <RmlSettingsEnumerate>d__4 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine { public int <>1__state; public AsyncIteratorMethodBuilder <>t__builder; public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd; private DataFeedItem <>2__current; private bool <>w__disposeMode; private int <>l__initialThreadId; private global::System.Collections.Generic.IReadOnlyList<string> path; public global::System.Collections.Generic.IReadOnlyList<string> <>3__path; private <>c__DisplayClass4_0 <>8__1; private DataFeedResettableGroup <modsGroup>5__2; private string[] <loadedModsGroup>5__3; private TaskAwaiter <>u__1; private Enumerator<ValueTuple<ResoniteModBase, bool>> <>7__wrap3; DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <RmlSettingsEnumerate>d__4(int <>1__state) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) <>t__builder = AsyncIteratorMethodBuilder.Create(); this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } private void MoveNext() { //IL_05c1: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: 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_00c5: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_0506: Expected O, but got Unknown //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Expected O, but got Unknown //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Expected O, but got Unknown //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; try { TaskAwaiter val; switch (num) { default: if (<>w__disposeMode) { break; } num = (<>1__state = -1); <>8__1 = new <>c__DisplayClass4_0(); <>2__current = null; val = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter(); if (!((TaskAwaiter)(ref val)).IsCompleted) { num = (<>1__state = 0); <>u__1 = val; <RmlSettingsEnumerate>d__4 <RmlSettingsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <RmlSettingsEnumerate>d__4>(ref val, ref <RmlSettingsEnumerate>d__); return; } goto IL_00b3; case 0: val = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); goto IL_00b3; case -4: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } DataFeedGrid val4 = new DataFeedGrid(); ((DataFeedItem)val4).InitBase("ModsGrid", path, (global::System.Collections.Generic.IReadOnlyList<string>)new <>z__ReadOnlySingleElementList<string>("RMLSettingsGroup"), LocaleHelper.AsLocaleKey("Settings.RML.LoadedMods", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); DataFeedHelpers.InitSlotName((DataFeedItem)(object)<modsGroup>5__2); <>2__current = (DataFeedItem)(object)val4; num = (<>1__state = -5); goto IL_0630; } case -5: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } <loadedModsGroup>5__3 = new string[2] { "RMLSettingsGroup", "ModsGrid" }; List<ValueTuple<ResoniteModBase, bool>> val2 = Enumerable.ToList<ValueTuple<ResoniteModBase, bool>>((global::System.Collections.Generic.IEnumerable<ValueTuple<ResoniteModBase, bool>>)Enumerable.OrderBy<ValueTuple<ResoniteModBase, bool>, string>(Enumerable.Where<ValueTuple<ResoniteModBase, bool>>(Enumerable.Select<ResoniteModBase, ValueTuple<ResoniteModBase, bool>>((global::System.Collections.Generic.IEnumerable<ResoniteModBase>)new List<ResoniteModBase>(ModLoader.Mods()), (Func<ResoniteModBase, ValueTuple<ResoniteModBase, bool>>)((ResoniteModBase mod) => new ValueTuple<ResoniteModBase, bool>(mod, ConfigHelpers.IsEmpty(mod.GetConfiguration())))), (Func<ValueTuple<ResoniteModBase, bool>, bool>)((ValueTuple<ResoniteModBase, bool> x) => !x.Item2 || Plugin.ShowEmptyPages.Value)), (Func<ValueTuple<ResoniteModBase, bool>, string>)((ValueTuple<ResoniteModBase, bool> x) => x.Item1.Name), (IComparer<string>)(object)StringComparer.OrdinalIgnoreCase)); if (val2.Count == 0) { DataFeedLabel val3 = new DataFeedLabel(); ((DataFeedItem)val3).InitBase("NoMods", path, (global::System.Collections.Generic.IReadOnlyList<string>)<loadedModsGroup>5__3, LocaleHelper.AsLocaleKey("Settings.RML.Mods.NoMods", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); DataFeedHelpers.InitSlotName((DataFeedItem)(object)val3); <>2__current = (DataFeedItem)(object)val3; num = (<>1__state = -6); goto IL_0630; } <>7__wrap3 = val2.GetEnumerator(); goto case -7; } case -6: num = (<>1__state = -1); if (!<>w__disposeMode) { <>w__disposeMode = true; }