Decompiled source of RMLModSettings v1.3.2
plugins/RMLModSettings/RMLModSettings.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.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.2.0")] [assembly: AssemblyInformationalVersion("1.3.2+395eab44af828acc4856fa7e257a830d437ae02a")] [assembly: AssemblyProduct("RML Mod Settings")] [assembly: AssemblyTitle("RMLModSettings")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/NepuShiro/RMLModSettings")] [assembly: AssemblyVersion("1.3.2.0")] [module: RefSafetyRules(11)] namespace RMLModSettings; public static class ConfigHelpers { [CompilerGenerated] private sealed class <>c__DisplayClass9_0<T> where T : unmanaged, global::System.Enum { public InternalLocale internalLocale; public ModConfigurationKey configKey; internal void <GenerateNullableEnumItemsAsyncMethod>b__0(IField<bool> field) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) FeedItemInterface componentInParents = WorldElementExtensions.FindNearestParent<Slot>((IWorldElement)(object)field, (Predicate<Slot>)null).GetComponentInParents<FeedItemInterface>((Predicate<FeedItemInterface>)null, true, false); if (componentInParents != null) { ((SyncField<string>)(object)((ContainerWorker<Component>)(object)((Component)componentInParents).Slot).AttachComponent<Comment>(true, (Action<Comment>)null).Text).Value = internalLocale.Key.content; } ((MethodBase)AccessTools.Method(typeof(ConfigHelpers), "SyncWithNullableConfigKeyHasValue", (global::System.Type[])null, (global::System.Type[])null).MakeGenericMethod(new global::System.Type[1] { configKey.ValueType() })).Invoke((object)null, new object[1] { 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 InternalLocale internalLocale; public InternalLocale <>3__internalLocale; 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 <>c__DisplayClass9_0<T> <>8__1; private string[] <nullableGroupKeys>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 <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_00bc: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024c: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_02df: 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) int num = <>1__state; try { TaskAwaiter val4; ValueTaskAwaiter val; DataFeedGroup val5; switch (num) { default: if (!<>w__disposeMode) { num = (<>1__state = -1); <>8__1 = new <>c__DisplayClass9_0<T>(); <>8__1.internalLocale = internalLocale; <>8__1.configKey = configKey; <>2__current = null; val4 = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter(); if (!((TaskAwaiter)(ref val4)).IsCompleted) { num = (<>1__state = 0); <>u__1 = val4; <GenerateNullableEnumItemsAsyncMethod>d__9<T> <GenerateNullableEnumItemsAsyncMethod>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <GenerateNullableEnumItemsAsyncMethod>d__9<T>>(ref val4, ref <GenerateNullableEnumItemsAsyncMethod>d__); return; } goto IL_00d8; } goto end_IL_0007; case 0: val4 = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); goto IL_00d8; case -4: num = (<>1__state = -1); if (!<>w__disposeMode) { <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 val2 = new DataFeedToggle(); ((DataFeedItem)val2).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)val2).InitSetupValue((Action<IField<bool>>)delegate(IField<bool> field) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) FeedItemInterface componentInParents = WorldElementExtensions.FindNearestParent<Slot>((IWorldElement)(object)field, (Predicate<Slot>)null).GetComponentInParents<FeedItemInterface>((Predicate<FeedItemInterface>)null, true, false); if (componentInParents != null) { ((SyncField<string>)(object)((ContainerWorker<Component>)(object)((Component)componentInParents).Slot).AttachComponent<Comment>(true, (Action<Comment>)null).Text).Value = <>8__1.internalLocale.Key.content; } ((MethodBase)AccessTools.Method(typeof(ConfigHelpers), "SyncWithNullableConfigKeyHasValue", (global::System.Type[])null, (global::System.Type[])null).MakeGenericMethod(new global::System.Type[1] { <>8__1.configKey.ValueType() })).Invoke((object)null, new object[1] { <>8__1.configKey }); }); <>2__current = (DataFeedItem)(object)val2; num = (<>1__state = -5); goto IL_047c; } goto end_IL_0007; case -5: num = (<>1__state = -1); if (!<>w__disposeMode) { global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable = (global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>)((MethodBase)GenerateEnumItemsAsync.MakeGenericMethod(new global::System.Type[1] { typeof(T) })).Invoke((object)null, new object[3] { path, <nullableGroupKeys>5__2, <>8__1.configKey }); if (asyncEnumerable != null) { <>7__wrap2 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken)); <>7__wrap3 = null; <>7__wrap4 = 0; goto case -6; } } goto end_IL_0007; case -6: case 1: try { ValueTaskAwaiter<bool> val3; if (num != -6) { if (num != 1) { goto IL_02af; } val3 = <>u__2; <>u__2 = default(ValueTaskAwaiter<bool>); num = (<>1__state = -1); goto IL_031a; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_02af; } goto end_IL_0267; IL_02af: <>2__current = null; val3 = <>7__wrap2.MoveNextAsync().GetAwaiter(); if (!val3.IsCompleted) { num = (<>1__state = 1); <>u__2 = val3; <GenerateNullableEnumItemsAsyncMethod>d__9<T> <GenerateNullableEnumItemsAsyncMethod>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <GenerateNullableEnumItemsAsyncMethod>d__9<T>>(ref val3, ref <GenerateNullableEnumItemsAsyncMethod>d__); return; } goto IL_031a; IL_031a: if (val3.GetResult()) { DataFeedItem current = <>7__wrap2.Current; <>2__current = current; num = (<>1__state = -6); goto IL_047c; } end_IL_0267:; } catch (object obj) { <>7__wrap3 = obj; } if (<>7__wrap2 == null) { break; } <>2__current = null; val = ((global::System.IAsyncDisposable)<>7__wrap2).DisposeAsync().GetAwaiter(); if (!((ValueTaskAwaiter)(ref val)).IsCompleted) { num = (<>1__state = 2); <>u__3 = val; <GenerateNullableEnumItemsAsyncMethod>d__9<T> <GenerateNullableEnumItemsAsyncMethod>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <GenerateNullableEnumItemsAsyncMethod>d__9<T>>(ref val, ref <GenerateNullableEnumItemsAsyncMethod>d__); return; } goto IL_03a7; case 2: { val = <>u__3; <>u__3 = default(ValueTaskAwaiter); num = (<>1__state = -1); goto IL_03a7; } IL_03a7: ((ValueTaskAwaiter)(ref val)).GetResult(); break; IL_00d8: ((TaskAwaiter)(ref val4)).GetResult(); val5 = new DataFeedGroup(); ((DataFeedItem)val5).InitBase(key + ".NullableGroup", path, groupKeys, <>8__1.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)val5; num = (<>1__state = -4); goto IL_047c; } object obj2 = <>7__wrap3; if (obj2 != null) { ExceptionDispatchInfo.Capture((obj2 as global::System.Exception) ?? throw obj2).Throw(); } _ = <>7__wrap4; if (!<>w__disposeMode) { <>7__wrap3 = null; <>7__wrap2 = null; } end_IL_0007:; } catch (global::System.Exception exception) { <>1__state = -2; <>8__1 = null; <nullableGroupKeys>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; <nullableGroupKeys>5__2 = null; <>7__wrap2 = null; <>7__wrap3 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetResult(false); return; IL_047c: <>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__.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, 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__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 configKey) where T : struct { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown object value = config.GetValue(configKey); ((IValue<bool>)(object)field).Value = ((T?)value).HasValue; ((IField)(object)field).SetupChangedHandlers(FieldChanged, configKey, new OnChangedHandler(KeyChanged)); void FieldChanged(IChangeable _) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown T? val = (((IValue<bool>)(object)field).Value ? new T?(default(T)) : ((T?)null)); if (((IValue<bool>)(object)field).Value == ((T?)value).HasValue) { config.Set(configKey, (object)val, (string)null); } else { ((IWorldElement)field).World.RunSynchronously((Action)delegate { field.SetWithoutChangedHandler(((T?)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 if (((IValue<bool>)(object)field).Value != ((T?)newValue).HasValue) { ((IWorldElement)field).World.RunSynchronously((Action)delegate { field.SetWithoutChangedHandler(((T?)newValue).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.2", "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; } } [Serializable] [CompilerGenerated] private sealed class <>c { [StructLayout((LayoutKind)3)] private struct <<Load>b__1_2>d : IAsyncStateMachine { public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; private <>c__DisplayClass1_0 <>8__1; private TaskAwaiter <>u__1; private void MoveNext() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; try { if (num != 0) { <>8__1 = new <>c__DisplayClass1_0(); goto IL_0073; } TaskAwaiter val = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); goto IL_006c; IL_006c: ((TaskAwaiter)(ref val)).GetResult(); goto IL_0073; IL_0073: World userspaceWorld = Userspace.UserspaceWorld; if (((userspaceWorld != null) ? userspaceWorld.LocalUserSpace : null) == null) { val = global::System.Threading.Tasks.Task.Delay(10).GetAwaiter(); if (!((TaskAwaiter)(ref val)).IsCompleted) { num = (<>1__state = 0); <>u__1 = val; ((AsyncTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <<Load>b__1_2>d>(ref val, ref this); return; } goto IL_006c; } <>8__1.w = Userspace.UserspaceWorld; <>8__1.w.RunSynchronously((Action)delegate { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) Slot obj = <>8__1.w.LocalUserSpace.AddSlot("RML Mod Settings Warning", false); UIBuilder obj2 = RadiantUI_Panel.SetupPanel(obj, LocaleString.op_Implicit("RML Mod Settings - <color=Hero.Yellow>Warning</color>"), new float2(700f, 350f), false, true); RadiantUI_Constants.SetupEditorStyle(obj2, false); obj2.VerticalLayout(4f, 0f, (Alignment?)null, (bool?)null, (bool?)null); obj2.Style.MinHeight = 48f; LocaleString val2 = LocaleString.op_Implicit("ResoniteModLoader is <color=Hero.Red>not loaded</color>, or is <color=Hero.Red>not up to date</color>.\nYou cannot use this plugin without it!"); ((SyncField<float>)(object)obj2.Text(ref val2, true, (Alignment?)null, true, (string)null).Size).Value = 32f; val2 = LocaleString.op_Implicit("Go to Latest RML"); colorX? val3 = Sub.GREEN; Hyperlink obj3 = ((ContainerWorker<Component>)(object)((Component)obj2.Button(ref val2, ref val3)).Slot).AttachComponent<Hyperlink>(true, (Action<Hyperlink>)null); ((SyncField<Uri>)(object)obj3.URL).Value = new Uri("https://github.com/resonite-modding-group/ResoniteModLoader/releases/latest"); ((SyncField<string>)(object)obj3.Reason).Value = "Opening RML Github"; SlotPositioning.PositionInFrontOfUser(obj, (float3?)float3.Backward, (float3?)null, 3f, (User)null, true, true, false); float3 localScale = obj.LocalScale; obj.LocalScale = (ref localScale) * 0.003f; }, false, (IUpdatable)null, false); } catch (global::System.Exception exception) { <>1__state = -2; <>8__1 = null; ((AsyncTaskMethodBuilder)(ref <>t__builder)).SetException(exception); return; } <>1__state = -2; <>8__1 = null; ((AsyncTaskMethodBuilder)(ref <>t__builder)).SetResult(); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { ((AsyncTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine); } } public static readonly <>c <>9 = new <>c(); public static Func<Assembly, bool> <>9__1_1; public static Func<global::System.Threading.Tasks.Task?> <>9__1_2; public static Action <>9__1_0; public static Predicate<Slot> <>9__3_6; public static Action<ResoniteModBase> <>9__3_7; public static Action<SyncDelegate<Action>> <>9__3_0; public static Func<ResoniteModBase, ValueTuple<ResoniteModBase, bool>> <>9__3_1; public static Func<ValueTuple<ResoniteModBase, bool>, bool> <>9__3_2; public static Func<ValueTuple<ResoniteModBase, bool>, string> <>9__3_3; public static Predicate<Slot> <>9__5_4; public static Action<IField<bool>> <>9__5_6; public static Action<IField<bool>> <>9__5_7; public static Action<IField<bool>> <>9__5_8; public static Action<IField<bool>> <>9__5_9; public static Action<IField<bool>> <>9__5_10; internal void <Load>b__1_0() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown if (Enumerable.Any<Assembly>((global::System.Collections.Generic.IEnumerable<Assembly>)AppDomain.CurrentDomain.GetAssemblies(), (Func<Assembly, bool>)((Assembly assembly) => assembly.GetName().Name?.Contains("ResoniteModLoader") ?? false))) { BepisPluginsPage.CustomPluginsPages += RmlSettingsEnumerate; BepisConfigsPage.CustomPluginConfigsPages += RmlSettingsConfigsEnumerate; ManualLogSource log = Log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(24, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("NepuShiro.RMLModSettings"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" is fully loaded!"); } log.LogInfo(val); } else { Log.LogFatal((object)"ResoniteModLoader is not loaded! You cannot use this plugin without it."); global::System.Threading.Tasks.Task.Run((Func<global::System.Threading.Tasks.Task>)([AsyncStateMachine(typeof(<<Load>b__1_2>d))] () => { //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) <<Load>b__1_2>d <<Load>b__1_2>d = default(<<Load>b__1_2>d); <<Load>b__1_2>d.<>t__builder = AsyncTaskMethodBuilder.Create(); <<Load>b__1_2>d.<>1__state = -1; ((AsyncTaskMethodBuilder)(ref <<Load>b__1_2>d.<>t__builder)).Start<<<Load>b__1_2>d>(ref <<Load>b__1_2>d); return ((AsyncTaskMethodBuilder)(ref <<Load>b__1_2>d.<>t__builder)).Task; })); } } internal bool <Load>b__1_1(Assembly assembly) { return assembly.GetName().Name?.Contains("ResoniteModLoader") ?? false; } [AsyncStateMachine(typeof(<<Load>b__1_2>d))] internal global::System.Threading.Tasks.Task? <Load>b__1_2() { //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) <<Load>b__1_2>d <<Load>b__1_2>d = default(<<Load>b__1_2>d); <<Load>b__1_2>d.<>t__builder = AsyncTaskMethodBuilder.Create(); <<Load>b__1_2>d.<>1__state = -1; ((AsyncTaskMethodBuilder)(ref <<Load>b__1_2>d.<>t__builder)).Start<<<Load>b__1_2>d>(ref <<Load>b__1_2>d); return ((AsyncTaskMethodBuilder)(ref <<Load>b__1_2>d.<>t__builder)).Task; } internal void <RmlSettingsEnumerate>b__3_0(SyncDelegate<Action> x) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown <>c__DisplayClass3_1 CS$<>8__locals4 = new <>c__DisplayClass3_1(); BooleanValueDriver<string> component = ((ContainerWorker<Component>)(object)((Component)((SyncElement)x).Slot.GetComponentInChildren<Text>((Predicate<Text>)null, false, false)).Slot).GetComponent<BooleanValueDriver<string>>((Predicate<BooleanValueDriver<string>>)null, false); ((SyncField<string>)(object)component.FalseValue).Value = "Settings.RML.SaveAll"; Image componentInChildren = ((Component)component).Slot.Parent.Parent.GetComponentInChildren<Image>((Predicate<Image>)null, false, false); if (componentInChildren == null) { return; } SpriteProvider val = ((ContainerWorker<Component>)(object)((Component)componentInChildren).Slot).AttachComponent<SpriteProvider>(true, (Action<SpriteProvider>)null); ((SyncRef<IAssetProvider<ITexture2D>>)(object)val.Texture).Target = (IAssetProvider<ITexture2D>)(object)SlotAssets.AttachTexture(((Component)componentInChildren).Slot, new Uri("resdb:///2f5cc6b6d4249bfdceda48fcd3df6375d47d13614e2100a8ed5a0f511ea9c01e.webp"), true, false, false, false, (TextureWrapMode)1, (int?)null); ((SyncRef<IAssetProvider<Sprite>>)(object)((ImageBase)componentInChildren).Sprite).Target = (IAssetProvider<Sprite>)(object)val; CS$<>8__locals4.btn = ((ContainerWorker<Component>)(object)((SyncElement)x).Slot).GetComponent<Button>((Predicate<Button>)null, false); if (CS$<>8__locals4.btn == null) { return; } CS$<>8__locals4.btn.LocalPressed += (ButtonEventHandler)delegate { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown Slot obj = ((Component)CS$<>8__locals4.btn).Slot.FindParent((Predicate<Slot>)((Slot val4) => val4.Name == "Reset Button"), -1); Store<bool> val2 = ((obj != null) ? obj.GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false) : null); if (val2 != null && ((SyncField<bool>)(object)val2.Value).Value && ((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Count != 0) { ManualLogSource log = Log; bool flag = default(bool); BepInExDebugLogInterpolatedStringHandler val3 = new BepInExDebugLogInterpolatedStringHandler(18, 0, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val3).AppendLiteral("Saving All Configs"); } log.LogDebug(val3); CollectionExtensions.Do<ResoniteModBase>(ModLoader.Mods(), (Action<ResoniteModBase>)delegate(ResoniteModBase val4) { if (val4 != null) { ModConfiguration configuration = val4.GetConfiguration(); if (configuration != null) { configuration.Save(false); } } }); } }; } internal bool <RmlSettingsEnumerate>b__3_6(Slot x2) { return x2.Name == "Reset Button"; } internal void <RmlSettingsEnumerate>b__3_7(ResoniteModBase x3) { if (x3 != null) { ModConfiguration configuration = x3.GetConfiguration(); if (configuration != null) { configuration.Save(false); } } } internal ValueTuple<ResoniteModBase, bool> <RmlSettingsEnumerate>b__3_1(ResoniteModBase mod) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) return new ValueTuple<ResoniteModBase, bool>(mod, ConfigHelpers.IsEmpty(mod.GetConfiguration())); } internal bool <RmlSettingsEnumerate>b__3_2(ValueTuple<ResoniteModBase, bool> x) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) if (x.Item2) { return Plugin.ShowEmptyPages.Value; } return true; } internal string <RmlSettingsEnumerate>b__3_3(ValueTuple<ResoniteModBase, bool> x) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return x.Item1.Name; } internal bool <EnumerateConfigs>b__5_4(Slot x) { return x.Name == "Reset Button"; } internal void <EnumerateConfigs>b__5_6(IField<bool> x) { ((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value; } internal void <EnumerateConfigs>b__5_7(IField<bool> x) { ((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value; } internal void <EnumerateConfigs>b__5_8(IField<bool> x) { ((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value; } internal void <EnumerateConfigs>b__5_9(IField<bool> x) { ((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value; } internal void <EnumerateConfigs>b__5_10(IField<bool> x) { ((IValue<bool>)(object)x).Value = !Plugin.DefaultCollapsed.Value; } } [CompilerGenerated] private sealed class <>c__DisplayClass1_0 { public World w; internal void <Load>b__3() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) Slot obj = w.LocalUserSpace.AddSlot("RML Mod Settings Warning", false); UIBuilder obj2 = RadiantUI_Panel.SetupPanel(obj, LocaleString.op_Implicit("RML Mod Settings - <color=Hero.Yellow>Warning</color>"), new float2(700f, 350f), false, true); RadiantUI_Constants.SetupEditorStyle(obj2, false); obj2.VerticalLayout(4f, 0f, (Alignment?)null, (bool?)null, (bool?)null); obj2.Style.MinHeight = 48f; LocaleString val = LocaleString.op_Implicit("ResoniteModLoader is <color=Hero.Red>not loaded</color>, or is <color=Hero.Red>not up to date</color>.\nYou cannot use this plugin without it!"); ((SyncField<float>)(object)obj2.Text(ref val, true, (Alignment?)null, true, (string)null).Size).Value = 32f; val = LocaleString.op_Implicit("Go to Latest RML"); colorX? val2 = Sub.GREEN; Hyperlink obj3 = ((ContainerWorker<Component>)(object)((Component)obj2.Button(ref val, ref val2)).Slot).AttachComponent<Hyperlink>(true, (Action<Hyperlink>)null); ((SyncField<Uri>)(object)obj3.URL).Value = new Uri("https://github.com/resonite-modding-group/ResoniteModLoader/releases/latest"); ((SyncField<string>)(object)obj3.Reason).Value = "Opening RML Github"; SlotPositioning.PositionInFrontOfUser(obj, (float3?)float3.Backward, (float3?)null, 3f, (User)null, true, true, false); float3 localScale = obj.LocalScale; obj.LocalScale = (ref localScale) * 0.003f; } } [CompilerGenerated] private sealed class <>c__DisplayClass3_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__DisplayClass3_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__DisplayClass3_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__DisplayClass4_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__DisplayClass5_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__DisplayClass5_2 CS$<>8__locals13 = new <>c__DisplayClass5_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__DisplayClass5_3 CS$<>8__locals14 = new <>c__DisplayClass5_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__DisplayClass5_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__DisplayClass5_2 { public ValueMultiDriver<bool> valueDriver; public Button btn; public <>c__DisplayClass5_0 CS$<>8__locals1; internal void <EnumerateConfigs>b__12(IButton b, ButtonEventData _) { ResetConfigs(b, CS$<>8__locals1.modId, valueDriver); } } [CompilerGenerated] private sealed class <>c__DisplayClass5_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 <>c__DisplayClass9_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__DisplayClass9_1 { [StructLayout((LayoutKind)3)] private struct <<ResetConfigs>b__1>d : IAsyncStateMachine { public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; public <>c__DisplayClass9_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__DisplayClass9_1 <>c__DisplayClass9_ = <>4__this; try { TaskAwaiter val; if (num != 0) { val = global::System.Threading.Tasks.Task.Delay(2000, <>c__DisplayClass9_.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__DisplayClass9_.CS$<>8__locals1.btn; Action obj2 = <>c__DisplayClass9_.CS$<>8__locals1.<>9__2; if (obj2 == null) { <>c__DisplayClass9_0 <>c__DisplayClass9_2 = <>c__DisplayClass9_.CS$<>8__locals1; Action val2 = delegate { LocaleHelper.SetLocalized(<>c__DisplayClass9_.CS$<>8__locals1.btn.LabelTextField, "Settings.RML.Mods.ResetConfig", (string)null, (Dictionary<string, object>)null); }; Action val3 = val2; <>c__DisplayClass9_2.<>9__2 = val2; obj2 = val3; } ((IComponentBase)obj).RunSynchronously(obj2, false); _resetPressed = false; if (<>c__DisplayClass9_.CS$<>8__locals1.vmd != null) { ((SyncField<bool>)(object)<>c__DisplayClass9_.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__DisplayClass9_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 <EnumerateConfigs>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 global::System.Collections.Generic.IReadOnlyList<string> path; public global::System.Collections.Generic.IReadOnlyList<string> <>3__path; private ModConfiguration modConfig; public ModConfiguration <>3__modConfig; private <>c__DisplayClass5_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__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_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_0594: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_097c: Unknown result type (might be due to invalid IL or missing references) //IL_0983: Expected O, but got Unknown //IL_099e: Unknown result type (might be due to invalid IL or missing references) //IL_09ab: Unknown result type (might be due to invalid IL or missing references) //IL_08fd: Unknown result type (might be due to invalid IL or missing references) //IL_0903: Expected O, but got Unknown //IL_091d: Unknown result type (might be due to invalid IL or missing references) //IL_092a: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Unknown result type (might be due to invalid IL or missing references) //IL_06fd: Unknown result type (might be due to invalid IL or missing references) //IL_071a: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_0727: Unknown result type (might be due to invalid IL or missing references) //IL_0654: Unknown result type (might be due to invalid IL or missing references) //IL_0659: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_0670: Unknown result type (might be due to invalid IL or missing references) //IL_0893: Unknown result type (might be due to invalid IL or missing references) //IL_0899: Expected O, but got Unknown //IL_08ae: 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_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: 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__DisplayClass5_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_0aa1; } case -4: num = (<>1__state = -1); if (<>w__disposeMode) { break; } <added>5__2 = new List<string>(); <>7__wrap3 = ((global::System.Collections.Generic.IEnumerable<ModConfigurationKey>)modConfig.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_063e; } val13 = <>u__1; <>u__1 = default(ValueTaskAwaiter<bool>); num = (<>1__state = -1); goto IL_06a9; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_063e; } goto end_IL_05d1; IL_063e: <>2__current = null; val13 = <>7__wrap4.MoveNextAsync().GetAwaiter(); if (!val13.IsCompleted) { num = (<>1__state = 0); <>u__1 = val13; <EnumerateConfigs>d__5 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <EnumerateConfigs>d__5>(ref val13, ref <EnumerateConfigs>d__); return; } goto IL_06a9; IL_06a9: 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_0aa1; } end_IL_05d1:; } 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__5 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <EnumerateConfigs>d__5>(ref val4, ref <EnumerateConfigs>d__); return; } goto IL_0736; } goto IL_073d; case 1: val4 = <>u__2; <>u__2 = default(ValueTaskAwaiter); num = (<>1__state = -1); goto IL_0736; 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__DisplayClass5_1 CS$<>8__locals10 = new <>c__DisplayClass5_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, modConfig, 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, modConfig, 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[4] { text2, path, array, 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, modConfig, 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_0aa1; } break; } IL_073d: obj4 = <>7__wrap5; if (obj4 != null) { ExceptionDispatchInfo.Capture((obj4 as global::System.Exception) ?? throw obj4).Throw(); } _ = <>7__wrap6; if (!<>w__disposeMode) { <>7__wrap5 = null; <>7__wrap4 = null; goto default; } break; IL_0736: ((ValueTaskAwaiter)(ref val4)).GetResult(); goto IL_073d; } } 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_0aa1; } 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_0aa1; } 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__DisplayClass5_2 CS$<>8__locals17 = new <>c__DisplayClass5_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__DisplayClass5_3 CS$<>8__locals18 = new <>c__DisplayClass5_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_0aa1; } 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_0aa1: <>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__5 <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__5(-3); } <EnumerateConfigs>d__.modConfig = <>3__modConfig; <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__5 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<EnumerateConfigs>d__5>(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__5 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<EnumerateConfigs>d__5>(ref <EnumerateConfigs>d__); return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version); } } [CompilerGenerated] private sealed class <RmlSettingsConfigsEnumerate>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 <>c__DisplayClass4_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__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_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__DisplayClass4_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__4 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <RmlSettingsConfigsEnumerate>d__4>(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__4 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <RmlSettingsConfigsEnumerate>d__4>(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__4 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <RmlSettingsConfigsEnumerate>d__4>(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 =