Decompiled source of NeoQOLPack v1.2.2
GDWeave/mods/NeoQOLPack/NeoQOLPack.dll
Decompiled 5 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text.Json; using System.Text.Json.Serialization; using System.Text.RegularExpressions; using System.Threading.Tasks; using GDWeave; using GDWeave.Godot; using GDWeave.Godot.Variants; using GDWeave.Modding; using NeoQOLPack.Mods; using Serilog; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(/*Could not decode attribute arguments.*/)] [assembly: TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] [assembly: AssemblyCompany("NeoQOLPack")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+1ee18b006f19bdb6f98942a0bff2fbd04ddecdf9")] [assembly: AssemblyProduct("NeoQOLPack")] [assembly: AssemblyTitle("NeoQOLPack")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace NeoQOLPack { public class Config { [JsonInclude] public bool SomeSetting = true; } public class Mod : IMod, global::System.IDisposable { [CompilerGenerated] private sealed class <GetLatestRelease>d__8 : IAsyncStateMachine { public int <>1__state; public AsyncTaskMethodBuilder<JsonDocument> <>t__builder; public ILogger logger; private string <apiUrl>5__1; private HttpClient <client>5__2; private HttpResponseMessage <response>5__3; private string <json>5__4; private HttpResponseMessage <>s__5; private string <>s__6; private HttpRequestException <e>5__7; private TaskCanceledException <e>5__8; private TaskAwaiter<IPHostEntry> <>u__1; private ConfiguredTaskAwaiter<HttpResponseMessage> <>u__2; private TaskAwaiter<string> <>u__3; private void MoveNext() { //IL_0283: Expected O, but got Unknown //IL_02a9: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; JsonDocument result; try { TaskAwaiter<IPHostEntry> awaiter; if (num != 0) { if ((uint)(num - 1) <= 1u) { goto IL_009d; } logger.Information("Getting latest release..."); <apiUrl>5__1 = "https://api.github.com/repos/neomoth/NeoQOLPatchMod/releases/latest"; awaiter = Dns.GetHostEntryAsync("api.github.com").GetAwaiter(); if (!awaiter.IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter; <GetLatestRelease>d__8 <GetLatestRelease>d__ = this; <>t__builder.AwaitUnsafeOnCompleted<TaskAwaiter<IPHostEntry>, <GetLatestRelease>d__8>(ref awaiter, ref <GetLatestRelease>d__); return; } } else { awaiter = <>u__1; <>u__1 = default(TaskAwaiter<IPHostEntry>); num = (<>1__state = -1); } awaiter.GetResult(); goto IL_009d; IL_009d: try { if ((uint)(num - 1) > 1u) { <client>5__2 = new HttpClient(); } try { TaskAwaiter<string> awaiter2; ConfiguredTaskAwaiter<HttpResponseMessage> awaiter3; if (num != 1) { if (num == 2) { awaiter2 = <>u__3; <>u__3 = default(TaskAwaiter<string>); num = (<>1__state = -1); goto IL_022d; } <client>5__2.Timeout = TimeSpan.FromSeconds(10.0); ((HttpHeaders)<client>5__2.DefaultRequestHeaders).Add("User-Agent", "C# App"); awaiter3 = <client>5__2.GetAsync(<apiUrl>5__1).ConfigureAwait(false).GetAwaiter(); if (!awaiter3.IsCompleted) { num = (<>1__state = 1); <>u__2 = awaiter3; <GetLatestRelease>d__8 <GetLatestRelease>d__ = this; <>t__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<HttpResponseMessage>, <GetLatestRelease>d__8>(ref awaiter3, ref <GetLatestRelease>d__); return; } } else { awaiter3 = <>u__2; <>u__2 = default(ConfiguredTaskAwaiter<HttpResponseMessage>); num = (<>1__state = -1); } <>s__5 = awaiter3.GetResult(); <response>5__3 = <>s__5; <>s__5 = null; <response>5__3.EnsureSuccessStatusCode(); if (<response>5__3.IsSuccessStatusCode) { awaiter2 = <response>5__3.Content.ReadAsStringAsync().GetAwaiter(); if (!awaiter2.IsCompleted) { num = (<>1__state = 2); <>u__3 = awaiter2; <GetLatestRelease>d__8 <GetLatestRelease>d__ = this; <>t__builder.AwaitUnsafeOnCompleted<TaskAwaiter<string>, <GetLatestRelease>d__8>(ref awaiter2, ref <GetLatestRelease>d__); return; } goto IL_022d; } logger.Error("Unable to connect to github."); result = null; goto end_IL_00b4; IL_022d: <>s__6 = awaiter2.GetResult(); <json>5__4 = <>s__6; <>s__6 = null; result = JsonDocument.Parse(<json>5__4, default(JsonDocumentOptions)); end_IL_00b4:; } finally { if (num < 0 && <client>5__2 != null) { ((global::System.IDisposable)<client>5__2).Dispose(); } } } catch (HttpRequestException val) { HttpRequestException val2 = val; <e>5__7 = val2; throw new global::System.Exception("Http error: " + ((global::System.Exception)(object)<e>5__7).Message); } catch (TaskCanceledException val3) { TaskCanceledException val4 = val3; <e>5__8 = val4; throw new global::System.Exception("Task cancelled: " + ((global::System.Exception)(object)<e>5__8).Message); } } catch (global::System.Exception exception) { <>1__state = -2; <apiUrl>5__1 = null; <>t__builder.SetException(exception); return; } <>1__state = -2; <apiUrl>5__1 = null; <>t__builder.SetResult(result); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { } } [CompilerGenerated] private sealed class <GetMod>d__9 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable { private int <>1__state; private Token <>2__current; private int <>l__initialThreadId; public Mod <>4__this; Token global::System.Collections.Generic.IEnumerator<Token>.Current { [DebuggerHidden] get { return <>2__current; } } object global::System.Collections.IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GetMod>d__9(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void global::System.IDisposable.Dispose() { } private bool MoveNext() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = new Token((TokenType)87, (uint?)null); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (Token)new ConstantToken((Variant)new StringVariant("/root/NeoQOLPack")); <>1__state = 2; return true; case 2: <>1__state = -1; return false; } } bool global::System.Collections.IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void global::System.Collections.IEnumerator.Reset() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } [DebuggerHidden] global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator() { <GetMod>d__9 result; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; result = this; } else { result = new <GetMod>d__9(0) { <>4__this = <>4__this }; } return result; } [DebuggerHidden] global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <GetVersion>d__7 : IAsyncStateMachine { public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; public Mod <>4__this; private string <currentDir>5__1; private string <jsonPath>5__2; private string <jsonContent>5__3; private JsonDocument <document>5__4; private JsonElement <version>5__5; private string <versionAsString>5__6; private global::System.Exception <e>5__7; private JsonDocument <githubInfoRaw>5__8; private JsonElement? <githubInfo>5__9; private string <latestVersion>5__10; private JsonDocument <>s__11; private int <newVer>5__12; private int <currVer>5__13; private Version <latest>5__14; private Version <current>5__15; private int <comparison>5__16; private global::System.Exception <e>5__17; private TaskAwaiter<JsonDocument?> <>u__1; private void MoveNext() { //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: 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_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Expected O, but got Unknown int num = <>1__state; try { JsonElement val; if (num != 0) { <>4__this.modInterface.Logger.Information("Neo's QOL Pack loaded!! :3"); try { <currentDir>5__1 = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); if (<currentDir>5__1 == null) { throw new NullReferenceException("if this gets thrown i have no fucking idea how you managed to do that."); } <jsonPath>5__2 = Path.Combine(<currentDir>5__1, "manifest.json"); if (!File.Exists(<jsonPath>5__2)) { throw new FileNotFoundException("manifest.json was not found in the mod's directory."); } <jsonContent>5__3 = File.ReadAllText(<jsonPath>5__2); <document>5__4 = JsonDocument.Parse(<jsonContent>5__3, default(JsonDocumentOptions)); val = <document>5__4.RootElement; val = ((JsonElement)(ref val)).GetProperty("Metadata"); if (!((JsonElement)(ref val)).TryGetProperty("Version", ref <version>5__5)) { throw new global::System.Exception("'version' property not found in manifest.json."); } <versionAsString>5__6 = ((JsonElement)(ref <version>5__5)).GetString(); if (<versionAsString>5__6 != null) { versionTag = "v" + <versionAsString>5__6; } <versionAsString>5__6 = null; <currentDir>5__1 = null; <jsonPath>5__2 = null; <jsonContent>5__3 = null; <document>5__4 = null; <version>5__5 = default(JsonElement); } catch (global::System.Exception ex) { <e>5__7 = ex; <>4__this.Logger.Error(<e>5__7.Message); } } try { TaskAwaiter<JsonDocument> awaiter; if (num != 0) { awaiter = GetLatestRelease(<>4__this.modInterface.Logger).GetAwaiter(); if (!awaiter.IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter; <GetVersion>d__7 <GetVersion>d__ = this; ((AsyncTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter<JsonDocument>, <GetVersion>d__7>(ref awaiter, ref <GetVersion>d__); return; } } else { awaiter = <>u__1; <>u__1 = default(TaskAwaiter<JsonDocument>); num = (<>1__state = -1); } <>s__11 = awaiter.GetResult(); <githubInfoRaw>5__8 = <>s__11; <>s__11 = null; JsonDocument obj = <githubInfoRaw>5__8; <githubInfo>5__9 = ((obj != null) ? new JsonElement?(obj.RootElement) : null); ref JsonElement? reference = ref <githubInfo>5__9; object obj2; if (!reference.HasValue) { obj2 = null; } else { val = reference.GetValueOrDefault(); val = ((JsonElement)(ref val)).GetProperty("tag_name"); obj2 = ((JsonElement)(ref val)).GetString(); } <latestVersion>5__10 = (string)obj2; <>4__this.modInterface.Logger.Information("Latest version: " + <latestVersion>5__10); if ((<latestVersion>5__10?.StartsWith("Beta")).Value) { <newVer>5__12 = int.Parse(((Capture)Regex.Match(<latestVersion>5__10, "\\d+")).Value); <currVer>5__13 = int.Parse(((Capture)Regex.Match(versionTag, "\\d+")).Value); <>4__this.injectUpdateNotice = <newVer>5__12 > <currVer>5__13; } else { string text; if (!<latestVersion>5__10.StartsWith('v')) { text = <latestVersion>5__10; } else { string text2 = <latestVersion>5__10; text = text2.Substring(1, text2.Length - 1); } <latest>5__14 = new Version(text); string text3; if (!versionTag.StartsWith('v')) { text3 = versionTag; } else { string text2 = versionTag; text3 = text2.Substring(1, text2.Length - 1); } <current>5__15 = new Version(text3); <comparison>5__16 = <latest>5__14.CompareTo(<current>5__15); <>4__this.injectUpdateNotice = <comparison>5__16 > 0; <latest>5__14 = null; <current>5__15 = null; } <githubInfoRaw>5__8 = null; <githubInfo>5__9 = null; <latestVersion>5__10 = null; } catch (global::System.Exception ex) { <e>5__17 = ex; <>4__this.modInterface.Logger.Error(<e>5__17.Message); } } catch (global::System.Exception ex) { <>1__state = -2; ((AsyncTaskMethodBuilder)(ref <>t__builder)).SetException(ex); return; } <>1__state = -2; ((AsyncTaskMethodBuilder)(ref <>t__builder)).SetResult(); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { } } public IModInterface modInterface; public Config Config; public ILogger Logger; private static string versionTag = "v0"; private static readonly string repo = "neomoth/NeoQOLPack"; private bool injectUpdateNotice = false; public Mod(IModInterface modInterface) { this.modInterface = modInterface; Config = modInterface.ReadConfig<Config>(); Logger = modInterface.Logger; GetVersion(); modInterface.RegisterScriptMod((IScriptMod)(object)new PlayerDataPatcher(this)); modInterface.RegisterScriptMod((IScriptMod)(object)new PlayerPatcher(this)); modInterface.RegisterScriptMod((IScriptMod)(object)new ShopPatcher()); modInterface.RegisterScriptMod((IScriptMod)(object)new PlayerHudPatcher(this)); modInterface.RegisterScriptMod((IScriptMod)(object)new ShopButtonPatcher(this)); modInterface.RegisterScriptMod((IScriptMod)(object)new MenuPatcher(this, versionTag)); modInterface.RegisterScriptMod((IScriptMod)(object)new OptionsMenuPatcher(this)); modInterface.RegisterScriptMod((IScriptMod)(object)new EscMenuPatcher()); modInterface.RegisterScriptMod((IScriptMod)(object)new SellAllButtonPatcher()); modInterface.RegisterScriptMod((IScriptMod)(object)new PlayerLabelPatcher()); modInterface.RegisterScriptMod((IScriptMod)(object)new InventoryItemPatcher()); if (!injectUpdateNotice) { } } [AsyncStateMachine(typeof(<GetVersion>d__7))] [DebuggerStepThrough] private global::System.Threading.Tasks.Task GetVersion() { //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) <GetVersion>d__7 <GetVersion>d__ = new <GetVersion>d__7(); <GetVersion>d__.<>t__builder = AsyncTaskMethodBuilder.Create(); <GetVersion>d__.<>4__this = this; <GetVersion>d__.<>1__state = -1; ((AsyncTaskMethodBuilder)(ref <GetVersion>d__.<>t__builder)).Start<<GetVersion>d__7>(ref <GetVersion>d__); return ((AsyncTaskMethodBuilder)(ref <GetVersion>d__.<>t__builder)).Task; } [AsyncStateMachine(typeof(<GetLatestRelease>d__8))] [DebuggerStepThrough] private static async global::System.Threading.Tasks.Task<JsonDocument?> GetLatestRelease(ILogger logger) { //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) logger.Information("Getting latest release..."); string apiUrl = "https://api.github.com/repos/neomoth/NeoQOLPatchMod/releases/latest"; await Dns.GetHostEntryAsync("api.github.com"); try { HttpClient client = new HttpClient(); try { client.Timeout = TimeSpan.FromSeconds(10.0); ((HttpHeaders)client.DefaultRequestHeaders).Add("User-Agent", "C# App"); HttpResponseMessage response = await client.GetAsync(apiUrl).ConfigureAwait(false); response.EnsureSuccessStatusCode(); if (!response.IsSuccessStatusCode) { logger.Error("Unable to connect to github."); return null; } return JsonDocument.Parse(await response.Content.ReadAsStringAsync(), default(JsonDocumentOptions)); } finally { ((global::System.IDisposable)client)?.Dispose(); } } catch (HttpRequestException val) { HttpRequestException val2 = val; HttpRequestException e2 = val2; throw new global::System.Exception("Http error: " + ((global::System.Exception)(object)e2).Message); } catch (TaskCanceledException val3) { TaskCanceledException val4 = val3; TaskCanceledException e = val4; throw new global::System.Exception("Task cancelled: " + ((global::System.Exception)(object)e).Message); } } [IteratorStateMachine(typeof(<GetMod>d__9))] public global::System.Collections.Generic.IEnumerable<Token> GetMod() { yield return new Token((TokenType)87, (uint?)null); yield return (Token)new ConstantToken((Variant)new StringVariant("/root/NeoQOLPack")); } public void Dispose() { } } } namespace NeoQOLPack.Mods { public class CosmeticMenuPatcher : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__1 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable { private int <>1__state; private Token <>2__current; private int <>l__initialThreadId; private string path; public string <>3__path; private global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; public CosmeticMenuPatcher <>4__this; private MultiTokenWaiter <readyWaiter>5__1; private global::System.Collections.Generic.IEnumerator<Token> <>s__2; private Token <token>5__3; Token global::System.Collections.Generic.IEnumerator<Token>.Current { [DebuggerHidden] get { return <>2__current; } } object global::System.Collections.IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Modify>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void global::System.IDisposable.Dispose() { int num = <>1__state; if (num != -3 && (uint)(num - 1) > 10u) { return; } try { } finally { <>m__Finally1(); } } private bool MoveNext() { //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Expected O, but got Unknown //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Expected O, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Expected O, but got Unknown //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Expected O, but got Unknown //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Expected O, but got Unknown //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <readyWaiter>5__1 = new MultiTokenWaiter(new Func<Token, bool>[3] { delegate(Token t) { IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val2 != null && val2.Name == "_ready"; }, delegate(Token t) { IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val != null && val.Name == "add_child"; }, (Token t) => (int)t.Type == 89 }, false, true); <>s__2 = tokens.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; <>2__current = new Token((TokenType)89, (uint?)1u); <>1__state = 2; return true; case 2: <>1__state = -3; <>2__current = (Token)new IdentifierToken("model"); <>1__state = 3; return true; case 3: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 4; return true; case 4: <>1__state = -3; <>2__current = (Token)new IdentifierToken("owner_id"); <>1__state = 5; return true; case 5: <>1__state = -3; <>2__current = new Token((TokenType)23, (uint?)null); <>1__state = 6; return true; case 6: <>1__state = -3; <>2__current = (Token)new IdentifierToken("Network"); <>1__state = 7; return true; case 7: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 8; return true; case 8: <>1__state = -3; <>2__current = (Token)new IdentifierToken("STEAM_ID"); <>1__state = 9; return true; case 9: <>1__state = -3; <>2__current = new Token((TokenType)89, (uint?)1u); <>1__state = 10; return true; case 10: <>1__state = -3; goto IL_02fc; case 11: { <>1__state = -3; goto IL_02fc; } IL_02fc: <token>5__3 = null; break; } if (((global::System.Collections.IEnumerator)<>s__2).MoveNext()) { <token>5__3 = <>s__2.Current; if (<readyWaiter>5__1.Check(<token>5__3)) { <>2__current = <token>5__3; <>1__state = 1; return true; } <>2__current = <token>5__3; <>1__state = 11; return true; } <>m__Finally1(); <>s__2 = null; return false; } catch { //try-fault ((global::System.IDisposable)this).Dispose(); throw; } } bool global::System.Collections.IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__2 != null) { ((global::System.IDisposable)<>s__2).Dispose(); } } [DebuggerHidden] void global::System.Collections.IEnumerator.Reset() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } [DebuggerHidden] global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator() { <Modify>d__1 <Modify>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Modify>d__ = this; } else { <Modify>d__ = new <Modify>d__1(0) { <>4__this = <>4__this }; } <Modify>d__.path = <>3__path; <Modify>d__.tokens = <>3__tokens; return <Modify>d__; } [DebuggerHidden] global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator(); } } public bool ShouldRun(string path) { return path == "res://Scenes/HUD/CosmeticMenu/cosmetic_menu.gdc"; } [IteratorStateMachine(typeof(<Modify>d__1))] public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens) { MultiTokenWaiter readyWaiter = new MultiTokenWaiter(new Func<Token, bool>[3] { delegate(Token t) { IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val2 != null && val2.Name == "_ready"; }, delegate(Token t) { IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val != null && val.Name == "add_child"; }, (Token t) => (int)t.Type == 89 }, false, true); global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator(); try { while (((global::System.Collections.IEnumerator)enumerator).MoveNext()) { Token token = enumerator.Current; if (readyWaiter.Check(token)) { yield return token; yield return new Token((TokenType)89, (uint?)1u); yield return (Token)new IdentifierToken("model"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("owner_id"); yield return new Token((TokenType)23, (uint?)null); yield return (Token)new IdentifierToken("Network"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("STEAM_ID"); yield return new Token((TokenType)89, (uint?)1u); } else { yield return token; } } } finally { ((global::System.IDisposable)enumerator)?.Dispose(); } } } public class EscMenuPatcher : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__1 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable { private int <>1__state; private Token <>2__current; private int <>l__initialThreadId; private string path; public string <>3__path; private global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; public EscMenuPatcher <>4__this; private MultiTokenWaiter <processWaiter>5__1; private MultiTokenWaiter <openWaiter>5__2; private MultiTokenWaiter <closeWaiter>5__3; private global::System.Collections.Generic.IEnumerator<Token> <>s__4; private Token <token>5__5; Token global::System.Collections.Generic.IEnumerator<Token>.Current { [DebuggerHidden] get { return <>2__current; } } object global::System.Collections.IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Modify>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void global::System.IDisposable.Dispose() { int num = <>1__state; if (num != -3 && (uint)(num - 1) > 67u) { return; } try { } finally { <>m__Finally1(); } } private bool MoveNext() { //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Expected O, but got Unknown //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Expected O, but got Unknown //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Expected O, but got Unknown //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Expected O, but got Unknown //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Expected O, but got Unknown //IL_0580: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Expected O, but got Unknown //IL_05a6: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Expected O, but got Unknown //IL_05d2: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Expected O, but got Unknown //IL_05fd: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Expected O, but got Unknown //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Expected O, but got Unknown //IL_062f: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Expected O, but got Unknown //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_0666: Expected O, but got Unknown //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Expected O, but got Unknown //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06ba: Expected O, but got Unknown //IL_06d7: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Expected O, but got Unknown //IL_0704: Unknown result type (might be due to invalid IL or missing references) //IL_070e: Expected O, but got Unknown //IL_0730: Unknown result type (might be due to invalid IL or missing references) //IL_073a: Expected O, but got Unknown //IL_0735: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Expected O, but got Unknown //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Expected O, but got Unknown //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_0790: Expected O, but got Unknown //IL_07b3: Unknown result type (might be due to invalid IL or missing references) //IL_07bd: Expected O, but got Unknown //IL_07da: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Expected O, but got Unknown //IL_07df: Unknown result type (might be due to invalid IL or missing references) //IL_07e9: Expected O, but got Unknown //IL_080c: Unknown result type (might be due to invalid IL or missing references) //IL_0816: Expected O, but got Unknown //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Expected O, but got Unknown //IL_0860: Unknown result type (might be due to invalid IL or missing references) //IL_086a: Expected O, but got Unknown //IL_088d: Unknown result type (might be due to invalid IL or missing references) //IL_0897: Expected O, but got Unknown //IL_08b9: Unknown result type (might be due to invalid IL or missing references) //IL_08c3: Expected O, but got Unknown //IL_08be: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Expected O, but got Unknown //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_08f5: Expected O, but got Unknown //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_0922: Expected O, but got Unknown //IL_093f: Unknown result type (might be due to invalid IL or missing references) //IL_0949: Expected O, but got Unknown //IL_096c: Unknown result type (might be due to invalid IL or missing references) //IL_0976: Expected O, but got Unknown //IL_0993: Unknown result type (might be due to invalid IL or missing references) //IL_099d: Expected O, but got Unknown //IL_09c0: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Expected O, but got Unknown //IL_09ec: Unknown result type (might be due to invalid IL or missing references) //IL_09f6: Expected O, but got Unknown //IL_09f1: Unknown result type (might be due to invalid IL or missing references) //IL_09fb: Expected O, but got Unknown //IL_0a1b: Unknown result type (might be due to invalid IL or missing references) //IL_0a25: Expected O, but got Unknown //IL_0a8c: Unknown result type (might be due to invalid IL or missing references) //IL_0a96: Expected O, but got Unknown //IL_0ab3: Unknown result type (might be due to invalid IL or missing references) //IL_0abd: Expected O, but got Unknown //IL_0ae0: Unknown result type (might be due to invalid IL or missing references) //IL_0aea: Expected O, but got Unknown //IL_0b07: Unknown result type (might be due to invalid IL or missing references) //IL_0b11: Expected O, but got Unknown //IL_0b34: Unknown result type (might be due to invalid IL or missing references) //IL_0b3e: Expected O, but got Unknown //IL_0b5b: Unknown result type (might be due to invalid IL or missing references) //IL_0b65: Expected O, but got Unknown //IL_0b88: Unknown result type (might be due to invalid IL or missing references) //IL_0b92: Expected O, but got Unknown //IL_0baf: Unknown result type (might be due to invalid IL or missing references) //IL_0bb9: Expected O, but got Unknown //IL_0bdc: Unknown result type (might be due to invalid IL or missing references) //IL_0be6: Expected O, but got Unknown //IL_0c03: Unknown result type (might be due to invalid IL or missing references) //IL_0c0d: Expected O, but got Unknown //IL_0c30: Unknown result type (might be due to invalid IL or missing references) //IL_0c3a: Expected O, but got Unknown //IL_0c57: Unknown result type (might be due to invalid IL or missing references) //IL_0c61: Expected O, but got Unknown //IL_0c84: Unknown result type (might be due to invalid IL or missing references) //IL_0c8e: Expected O, but got Unknown //IL_0cab: Unknown result type (might be due to invalid IL or missing references) //IL_0cb5: Expected O, but got Unknown //IL_0cd8: Unknown result type (might be due to invalid IL or missing references) //IL_0ce2: Expected O, but got Unknown //IL_0d02: Unknown result type (might be due to invalid IL or missing references) //IL_0d0c: Expected O, but got Unknown //IL_0d73: Unknown result type (might be due to invalid IL or missing references) //IL_0d7d: Expected O, but got Unknown //IL_0d9a: Unknown result type (might be due to invalid IL or missing references) //IL_0da4: Expected O, but got Unknown //IL_0dc7: Unknown result type (might be due to invalid IL or missing references) //IL_0dd1: Expected O, but got Unknown //IL_0dee: Unknown result type (might be due to invalid IL or missing references) //IL_0df8: Expected O, but got Unknown //IL_0e1b: Unknown result type (might be due to invalid IL or missing references) //IL_0e25: Expected O, but got Unknown //IL_0e42: Unknown result type (might be due to invalid IL or missing references) //IL_0e4c: Expected O, but got Unknown //IL_0e6f: Unknown result type (might be due to invalid IL or missing references) //IL_0e79: Expected O, but got Unknown //IL_0e96: Unknown result type (might be due to invalid IL or missing references) //IL_0ea0: Expected O, but got Unknown //IL_0ec3: Unknown result type (might be due to invalid IL or missing references) //IL_0ecd: Expected O, but got Unknown //IL_0eea: Unknown result type (might be due to invalid IL or missing references) //IL_0ef4: Expected O, but got Unknown //IL_0f17: Unknown result type (might be due to invalid IL or missing references) //IL_0f21: Expected O, but got Unknown //IL_0f3e: Unknown result type (might be due to invalid IL or missing references) //IL_0f48: Expected O, but got Unknown //IL_0f6b: Unknown result type (might be due to invalid IL or missing references) //IL_0f75: Expected O, but got Unknown //IL_0f92: Unknown result type (might be due to invalid IL or missing references) //IL_0f9c: Expected O, but got Unknown //IL_0fbf: Unknown result type (might be due to invalid IL or missing references) //IL_0fc9: Expected O, but got Unknown //IL_0fe9: Unknown result type (might be due to invalid IL or missing references) //IL_0ff3: Expected O, but got Unknown //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Expected O, but got Unknown //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Expected O, but got Unknown //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <processWaiter>5__1 = new MultiTokenWaiter(new Func<Token, bool>[2] { delegate(Token t) { IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val3 != null && val3.Name == "_process"; }, (Token t) => (int)t.Type == 89 }, false, true); <openWaiter>5__2 = new MultiTokenWaiter(new Func<Token, bool>[5] { delegate(Token t) { IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val2 != null && val2.Name == "_open"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 86, (Token t) => (int)t.Type == 89 }, false, false); <closeWaiter>5__3 = new MultiTokenWaiter(new Func<Token, bool>[5] { delegate(Token t) { IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val != null && val.Name == "_close"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 86, (Token t) => (int)t.Type == 89 }, false, false); <>s__4 = tokens.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; <>2__current = (Token)new IdentifierToken("get_node"); <>1__state = 2; return true; case 2: <>1__state = -3; <>2__current = new Token((TokenType)80, (uint?)null); <>1__state = 3; return true; case 3: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new StringVariant("VBoxContainer")); <>1__state = 4; return true; case 4: <>1__state = -3; <>2__current = new Token((TokenType)81, (uint?)null); <>1__state = 5; return true; case 5: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 6; return true; case 6: <>1__state = -3; <>2__current = (Token)new IdentifierToken("anchor_top"); <>1__state = 7; return true; case 7: <>1__state = -3; <>2__current = new Token((TokenType)23, (uint?)null); <>1__state = 8; return true; case 8: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.32, false)); <>1__state = 9; return true; case 9: <>1__state = -3; <>2__current = new Token((TokenType)38, (uint?)null); <>1__state = 10; return true; case 10: <>1__state = -3; <>2__current = new Token((TokenType)15, (uint?)null); <>1__state = 11; return true; case 11: <>1__state = -3; <>2__current = (Token)new IdentifierToken("Network"); <>1__state = 12; return true; case 12: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 13; return true; case 13: <>1__state = -3; <>2__current = (Token)new IdentifierToken("CODE_ENABLED"); <>1__state = 14; return true; case 14: <>1__state = -3; <>2__current = new Token((TokenType)40, (uint?)null); <>1__state = 15; return true; case 15: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.29, false)); <>1__state = 16; return true; case 16: <>1__state = -3; <>2__current = new Token((TokenType)89, (uint?)1u); <>1__state = 17; return true; case 17: <>1__state = -3; <>2__current = (Token)new IdentifierToken("get_node"); <>1__state = 18; return true; case 18: <>1__state = -3; <>2__current = new Token((TokenType)80, (uint?)null); <>1__state = 19; return true; case 19: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new StringVariant("VBoxContainer")); <>1__state = 20; return true; case 20: <>1__state = -3; <>2__current = new Token((TokenType)81, (uint?)null); <>1__state = 21; return true; case 21: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 22; return true; case 22: <>1__state = -3; <>2__current = (Token)new IdentifierToken("anchor_bottom"); <>1__state = 23; return true; case 23: <>1__state = -3; <>2__current = new Token((TokenType)23, (uint?)null); <>1__state = 24; return true; case 24: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.68, false)); <>1__state = 25; return true; case 25: <>1__state = -3; <>2__current = new Token((TokenType)38, (uint?)null); <>1__state = 26; return true; case 26: <>1__state = -3; <>2__current = new Token((TokenType)15, (uint?)null); <>1__state = 27; return true; case 27: <>1__state = -3; <>2__current = (Token)new IdentifierToken("Network"); <>1__state = 28; return true; case 28: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 29; return true; case 29: <>1__state = -3; <>2__current = (Token)new IdentifierToken("CODE_ENABLED"); <>1__state = 30; return true; case 30: <>1__state = -3; <>2__current = new Token((TokenType)40, (uint?)null); <>1__state = 31; return true; case 31: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.71, false)); <>1__state = 32; return true; case 32: <>1__state = -3; <>2__current = new Token((TokenType)89, (uint?)1u); <>1__state = 33; return true; case 33: <>1__state = -3; goto IL_102a; case 34: <>1__state = -3; <>2__current = new Token((TokenType)38, (uint?)null); <>1__state = 35; return true; case 35: <>1__state = -3; <>2__current = (Token)new IdentifierToken("PlayerData"); <>1__state = 36; return true; case 36: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 37; return true; case 37: <>1__state = -3; <>2__current = (Token)new IdentifierToken("player_options"); <>1__state = 38; return true; case 38: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 39; return true; case 39: <>1__state = -3; <>2__current = (Token)new IdentifierToken("lockmouse"); <>1__state = 40; return true; case 40: <>1__state = -3; <>2__current = new Token((TokenType)86, (uint?)null); <>1__state = 41; return true; case 41: <>1__state = -3; <>2__current = (Token)new IdentifierToken("Input"); <>1__state = 42; return true; case 42: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 43; return true; case 43: <>1__state = -3; <>2__current = (Token)new IdentifierToken("set_mouse_mode"); <>1__state = 44; return true; case 44: <>1__state = -3; <>2__current = new Token((TokenType)80, (uint?)null); <>1__state = 45; return true; case 45: <>1__state = -3; <>2__current = (Token)new IdentifierToken("Input"); <>1__state = 46; return true; case 46: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 47; return true; case 47: <>1__state = -3; <>2__current = (Token)new IdentifierToken("MOUSE_MODE_VISIBLE"); <>1__state = 48; return true; case 48: <>1__state = -3; <>2__current = new Token((TokenType)81, (uint?)null); <>1__state = 49; return true; case 49: <>1__state = -3; <>2__current = new Token((TokenType)89, (uint?)1u); <>1__state = 50; return true; case 50: <>1__state = -3; goto IL_102a; case 51: <>1__state = -3; <>2__current = new Token((TokenType)38, (uint?)null); <>1__state = 52; return true; case 52: <>1__state = -3; <>2__current = (Token)new IdentifierToken("PlayerData"); <>1__state = 53; return true; case 53: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 54; return true; case 54: <>1__state = -3; <>2__current = (Token)new IdentifierToken("player_options"); <>1__state = 55; return true; case 55: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 56; return true; case 56: <>1__state = -3; <>2__current = (Token)new IdentifierToken("lockmouse"); <>1__state = 57; return true; case 57: <>1__state = -3; <>2__current = new Token((TokenType)86, (uint?)null); <>1__state = 58; return true; case 58: <>1__state = -3; <>2__current = (Token)new IdentifierToken("Input"); <>1__state = 59; return true; case 59: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 60; return true; case 60: <>1__state = -3; <>2__current = (Token)new IdentifierToken("set_mouse_mode"); <>1__state = 61; return true; case 61: <>1__state = -3; <>2__current = new Token((TokenType)80, (uint?)null); <>1__state = 62; return true; case 62: <>1__state = -3; <>2__current = (Token)new IdentifierToken("Input"); <>1__state = 63; return true; case 63: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 64; return true; case 64: <>1__state = -3; <>2__current = (Token)new IdentifierToken("MOUSE_MODE_CONFINED"); <>1__state = 65; return true; case 65: <>1__state = -3; <>2__current = new Token((TokenType)81, (uint?)null); <>1__state = 66; return true; case 66: <>1__state = -3; <>2__current = new Token((TokenType)89, (uint?)1u); <>1__state = 67; return true; case 67: <>1__state = -3; goto IL_102a; case 68: { <>1__state = -3; goto IL_102a; } IL_102a: <token>5__5 = null; break; } if (((global::System.Collections.IEnumerator)<>s__4).MoveNext()) { <token>5__5 = <>s__4.Current; if (<processWaiter>5__1.Check(<token>5__5)) { <>2__current = <token>5__5; <>1__state = 1; return true; } if (<openWaiter>5__2.Check(<token>5__5)) { <>2__current = <token>5__5; <>1__state = 34; return true; } if (<closeWaiter>5__3.Check(<token>5__5)) { <>2__current = <token>5__5; <>1__state = 51; return true; } <>2__current = <token>5__5; <>1__state = 68; return true; } <>m__Finally1(); <>s__4 = null; return false; } catch { //try-fault ((global::System.IDisposable)this).Dispose(); throw; } } bool global::System.Collections.IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__4 != null) { ((global::System.IDisposable)<>s__4).Dispose(); } } [DebuggerHidden] void global::System.Collections.IEnumerator.Reset() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } [DebuggerHidden] global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator() { <Modify>d__1 <Modify>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Modify>d__ = this; } else { <Modify>d__ = new <Modify>d__1(0) { <>4__this = <>4__this }; } <Modify>d__.path = <>3__path; <Modify>d__.tokens = <>3__tokens; return <Modify>d__; } [DebuggerHidden] global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator(); } } public bool ShouldRun(string path) { return path == "res://Scenes/HUD/Esc Menu/esc_menu.gdc"; } [IteratorStateMachine(typeof(<Modify>d__1))] public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens) { MultiTokenWaiter processWaiter = new MultiTokenWaiter(new Func<Token, bool>[2] { delegate(Token t) { IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val3 != null && val3.Name == "_process"; }, (Token t) => (int)t.Type == 89 }, false, true); MultiTokenWaiter openWaiter = new MultiTokenWaiter(new Func<Token, bool>[5] { delegate(Token t) { IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val2 != null && val2.Name == "_open"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 86, (Token t) => (int)t.Type == 89 }, false, false); MultiTokenWaiter closeWaiter = new MultiTokenWaiter(new Func<Token, bool>[5] { delegate(Token t) { IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val != null && val.Name == "_close"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 86, (Token t) => (int)t.Type == 89 }, false, false); global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator(); try { while (((global::System.Collections.IEnumerator)enumerator).MoveNext()) { Token token = enumerator.Current; if (processWaiter.Check(token)) { yield return token; yield return (Token)new IdentifierToken("get_node"); yield return new Token((TokenType)80, (uint?)null); yield return (Token)new ConstantToken((Variant)new StringVariant("VBoxContainer")); yield return new Token((TokenType)81, (uint?)null); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("anchor_top"); yield return new Token((TokenType)23, (uint?)null); yield return (Token)new ConstantToken((Variant)new RealVariant(0.32, false)); yield return new Token((TokenType)38, (uint?)null); yield return new Token((TokenType)15, (uint?)null); yield return (Token)new IdentifierToken("Network"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("CODE_ENABLED"); yield return new Token((TokenType)40, (uint?)null); yield return (Token)new ConstantToken((Variant)new RealVariant(0.29, false)); yield return new Token((TokenType)89, (uint?)1u); yield return (Token)new IdentifierToken("get_node"); yield return new Token((TokenType)80, (uint?)null); yield return (Token)new ConstantToken((Variant)new StringVariant("VBoxContainer")); yield return new Token((TokenType)81, (uint?)null); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("anchor_bottom"); yield return new Token((TokenType)23, (uint?)null); yield return (Token)new ConstantToken((Variant)new RealVariant(0.68, false)); yield return new Token((TokenType)38, (uint?)null); yield return new Token((TokenType)15, (uint?)null); yield return (Token)new IdentifierToken("Network"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("CODE_ENABLED"); yield return new Token((TokenType)40, (uint?)null); yield return (Token)new ConstantToken((Variant)new RealVariant(0.71, false)); yield return new Token((TokenType)89, (uint?)1u); } else if (openWaiter.Check(token)) { yield return token; yield return new Token((TokenType)38, (uint?)null); yield return (Token)new IdentifierToken("PlayerData"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("player_options"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("lockmouse"); yield return new Token((TokenType)86, (uint?)null); yield return (Token)new IdentifierToken("Input"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("set_mouse_mode"); yield return new Token((TokenType)80, (uint?)null); yield return (Token)new IdentifierToken("Input"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("MOUSE_MODE_VISIBLE"); yield return new Token((TokenType)81, (uint?)null); yield return new Token((TokenType)89, (uint?)1u); } else if (closeWaiter.Check(token)) { yield return token; yield return new Token((TokenType)38, (uint?)null); yield return (Token)new IdentifierToken("PlayerData"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("player_options"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("lockmouse"); yield return new Token((TokenType)86, (uint?)null); yield return (Token)new IdentifierToken("Input"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("set_mouse_mode"); yield return new Token((TokenType)80, (uint?)null); yield return (Token)new IdentifierToken("Input"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("MOUSE_MODE_CONFINED"); yield return new Token((TokenType)81, (uint?)null); yield return new Token((TokenType)89, (uint?)1u); } else { yield return token; } } } finally { ((global::System.IDisposable)enumerator)?.Dispose(); } } } public class InventoryItemPatcher : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__1 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable { private int <>1__state; private Token <>2__current; private int <>l__initialThreadId; private string path; public string <>3__path; private global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; public InventoryItemPatcher <>4__this; private MultiTokenWaiter <updateWaiter>5__1; private global::System.Collections.Generic.IEnumerator<Token> <>s__2; private Token <token>5__3; Token global::System.Collections.Generic.IEnumerator<Token>.Current { [DebuggerHidden] get { return <>2__current; } } object global::System.Collections.IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Modify>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void global::System.IDisposable.Dispose() { int num = <>1__state; if (num != -3 && (uint)(num - 1) > 33u) { return; } try { } finally { <>m__Finally1(); } } private bool MoveNext() { //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Expected O, but got Unknown //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Expected O, but got Unknown //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Expected O, but got Unknown //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Expected O, but got Unknown //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Expected O, but got Unknown //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Expected O, but got Unknown //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Expected O, but got Unknown //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Expected O, but got Unknown //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Expected O, but got Unknown //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Expected O, but got Unknown //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Expected O, but got Unknown //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Expected O, but got Unknown //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Expected O, but got Unknown //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Expected O, but got Unknown //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Expected O, but got Unknown //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Expected O, but got Unknown //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Expected O, but got Unknown //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Expected O, but got Unknown //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Expected O, but got Unknown //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0575: Expected O, but got Unknown //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Expected O, but got Unknown //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Expected O, but got Unknown //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Expected O, but got Unknown //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Expected O, but got Unknown //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Expected O, but got Unknown //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Expected O, but got Unknown //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_0676: Expected O, but got Unknown //IL_0699: Unknown result type (might be due to invalid IL or missing references) //IL_06a3: Expected O, but got Unknown //IL_06c6: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Expected O, but got Unknown //IL_06ed: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Expected O, but got Unknown //IL_071a: Unknown result type (might be due to invalid IL or missing references) //IL_0724: Expected O, but got Unknown //IL_073c: Unknown result type (might be due to invalid IL or missing references) //IL_0746: Expected O, but got Unknown //IL_0741: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Expected O, but got Unknown //IL_076e: Unknown result type (might be due to invalid IL or missing references) //IL_0778: Expected O, but got Unknown //IL_0798: Unknown result type (might be due to invalid IL or missing references) //IL_07a2: Expected O, but got Unknown //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <updateWaiter>5__1 = new MultiTokenWaiter(new Func<Token, bool>[4] { delegate(Token t) { IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val3 != null && val3.Name == "_update"; }, delegate(Token t) { IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val2 != null && val2.Name == "hotkey_panel"; }, delegate(Token t) { IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val != null && val.Name == "visible"; }, (Token t) => (int)t.Type == 89 }, false, true); <>s__2 = tokens.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; <>2__current = new Token((TokenType)89, (uint?)1u); <>1__state = 2; return true; case 2: <>1__state = -3; <>2__current = new Token((TokenType)38, (uint?)null); <>1__state = 3; return true; case 3: <>1__state = -3; <>2__current = (Token)new IdentifierToken("get_node"); <>1__state = 4; return true; case 4: <>1__state = -3; <>2__current = new Token((TokenType)80, (uint?)null); <>1__state = 5; return true; case 5: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new StringVariant("/root/playerhud")); <>1__state = 6; return true; case 6: <>1__state = -3; <>2__current = new Token((TokenType)81, (uint?)null); <>1__state = 7; return true; case 7: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 8; return true; case 8: <>1__state = -3; <>2__current = (Token)new IdentifierToken("menu"); <>1__state = 9; return true; case 9: <>1__state = -3; <>2__current = new Token((TokenType)7, (uint?)null); <>1__state = 10; return true; case 10: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new IntVariant(2L, false)); <>1__state = 11; return true; case 11: <>1__state = -3; <>2__current = new Token((TokenType)86, (uint?)null); <>1__state = 12; return true; case 12: <>1__state = -3; <>2__current = (Token)new IdentifierToken("Tooltip"); <>1__state = 13; return true; case 13: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 14; return true; case 14: <>1__state = -3; <>2__current = (Token)new IdentifierToken("_update"); <>1__state = 15; return true; case 15: <>1__state = -3; <>2__current = new Token((TokenType)80, (uint?)null); <>1__state = 16; return true; case 16: <>1__state = -3; <>2__current = (Token)new IdentifierToken("get_node"); <>1__state = 17; return true; case 17: <>1__state = -3; <>2__current = new Token((TokenType)80, (uint?)null); <>1__state = 18; return true; case 18: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new StringVariant("root/tooltip_node")); <>1__state = 19; return true; case 19: <>1__state = -3; <>2__current = new Token((TokenType)81, (uint?)null); <>1__state = 20; return true; case 20: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 21; return true; case 21: <>1__state = -3; <>2__current = (Token)new IdentifierToken("header"); <>1__state = 22; return true; case 22: <>1__state = -3; <>2__current = new Token((TokenType)82, (uint?)null); <>1__state = 23; return true; case 23: <>1__state = -3; <>2__current = (Token)new IdentifierToken("get_node"); <>1__state = 24; return true; case 24: <>1__state = -3; <>2__current = new Token((TokenType)80, (uint?)null); <>1__state = 25; return true; case 25: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new StringVariant("root/tooltip_node")); <>1__state = 26; return true; case 26: <>1__state = -3; <>2__current = new Token((TokenType)81, (uint?)null); <>1__state = 27; return true; case 27: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 28; return true; case 28: <>1__state = -3; <>2__current = (Token)new IdentifierToken("body"); <>1__state = 29; return true; case 29: <>1__state = -3; <>2__current = new Token((TokenType)82, (uint?)null); <>1__state = 30; return true; case 30: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new NilVariant()); <>1__state = 31; return true; case 31: <>1__state = -3; <>2__current = new Token((TokenType)81, (uint?)null); <>1__state = 32; return true; case 32: <>1__state = -3; <>2__current = new Token((TokenType)89, (uint?)1u); <>1__state = 33; return true; case 33: <>1__state = -3; goto IL_07d9; case 34: { <>1__state = -3; goto IL_07d9; } IL_07d9: <token>5__3 = null; break; } if (((global::System.Collections.IEnumerator)<>s__2).MoveNext()) { <token>5__3 = <>s__2.Current; if (<updateWaiter>5__1.Check(<token>5__3)) { <>2__current = <token>5__3; <>1__state = 1; return true; } <>2__current = <token>5__3; <>1__state = 34; return true; } <>m__Finally1(); <>s__2 = null; return false; } catch { //try-fault ((global::System.IDisposable)this).Dispose(); throw; } } bool global::System.Collections.IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__2 != null) { ((global::System.IDisposable)<>s__2).Dispose(); } } [DebuggerHidden] void global::System.Collections.IEnumerator.Reset() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } [DebuggerHidden] global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator() { <Modify>d__1 <Modify>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Modify>d__ = this; } else { <Modify>d__ = new <Modify>d__1(0) { <>4__this = <>4__this }; } <Modify>d__.path = <>3__path; <Modify>d__.tokens = <>3__tokens; return <Modify>d__; } [DebuggerHidden] global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator(); } } public bool ShouldRun(string path) { return path == "res://Scenes/HUD/inventory_item.gdc"; } [IteratorStateMachine(typeof(<Modify>d__1))] public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens) { MultiTokenWaiter updateWaiter = new MultiTokenWaiter(new Func<Token, bool>[4] { delegate(Token t) { IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val3 != null && val3.Name == "_update"; }, delegate(Token t) { IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val2 != null && val2.Name == "hotkey_panel"; }, delegate(Token t) { IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val != null && val.Name == "visible"; }, (Token t) => (int)t.Type == 89 }, false, true); global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator(); try { while (((global::System.Collections.IEnumerator)enumerator).MoveNext()) { Token token = enumerator.Current; if (updateWaiter.Check(token)) { yield return token; yield return new Token((TokenType)89, (uint?)1u); yield return new Token((TokenType)38, (uint?)null); yield return (Token)new IdentifierToken("get_node"); yield return new Token((TokenType)80, (uint?)null); yield return (Token)new ConstantToken((Variant)new StringVariant("/root/playerhud")); yield return new Token((TokenType)81, (uint?)null); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("menu"); yield return new Token((TokenType)7, (uint?)null); yield return (Token)new ConstantToken((Variant)new IntVariant(2L, false)); yield return new Token((TokenType)86, (uint?)null); yield return (Token)new IdentifierToken("Tooltip"); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("_update"); yield return new Token((TokenType)80, (uint?)null); yield return (Token)new IdentifierToken("get_node"); yield return new Token((TokenType)80, (uint?)null); yield return (Token)new ConstantToken((Variant)new StringVariant("root/tooltip_node")); yield return new Token((TokenType)81, (uint?)null); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("header"); yield return new Token((TokenType)82, (uint?)null); yield return (Token)new IdentifierToken("get_node"); yield return new Token((TokenType)80, (uint?)null); yield return (Token)new ConstantToken((Variant)new StringVariant("root/tooltip_node")); yield return new Token((TokenType)81, (uint?)null); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("body"); yield return new Token((TokenType)82, (uint?)null); yield return (Token)new ConstantToken((Variant)new NilVariant()); yield return new Token((TokenType)81, (uint?)null); yield return new Token((TokenType)89, (uint?)1u); } else { yield return token; } } } finally { ((global::System.IDisposable)enumerator)?.Dispose(); } } } public class MenuPatcher : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__3 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable { private int <>1__state; private Token <>2__current; private int <>l__initialThreadId; private string path; public string <>3__path; private global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; public MenuPatcher <>4__this; private MultiTokenWaiter <readyWaiter>5__1; private global::System.Collections.Generic.IEnumerator<Token> <>s__2; private Token <token>5__3; Token global::System.Collections.Generic.IEnumerator<Token>.Current { [DebuggerHidden] get { return <>2__current; } } object global::System.Collections.IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Modify>d__3(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void global::System.IDisposable.Dispose() { int num = <>1__state; if (num != -3 && (uint)(num - 1) > 13u) { return; } try { } finally { <>m__Finally1(); } } private bool MoveNext() { //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Expected O, but got Unknown //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Expected O, but got Unknown //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Expected O, but got Unknown //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Expected O, but got Unknown //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Expected O, but got Unknown //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Expected O, but got Unknown //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Expected O, but got Unknown //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <readyWaiter>5__1 = new MultiTokenWaiter(new Func<Token, bool>[2] { delegate(Token t) { IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val != null && val.Name == "_ready"; }, (Token t) => (int)t.Type == 89 }, false, true); <>s__2 = tokens.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; <>2__current = (Token)new IdentifierToken("get_node"); <>1__state = 2; return true; case 2: <>1__state = -3; <>2__current = new Token((TokenType)80, (uint?)null); <>1__state = 3; return true; case 3: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new StringVariant("/root/NeoQOLPack")); <>1__state = 4; return true; case 4: <>1__state = -3; <>2__current = new Token((TokenType)81, (uint?)null); <>1__state = 5; return true; case 5: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 6; return true; case 6: <>1__state = -3; <>2__current = (Token)new IdentifierToken("_append_version"); <>1__state = 7; return true; case 7: <>1__state = -3; <>2__current = new Token((TokenType)80, (uint?)null); <>1__state = 8; return true; case 8: <>1__state = -3; <>2__current = new Token((TokenType)3, (uint?)null); <>1__state = 9; return true; case 9: <>1__state = -3; <>2__current = new Token((TokenType)82, (uint?)null); <>1__state = 10; return true; case 10: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new StringVariant(<>4__this.<version>P)); <>1__state = 11; return true; case 11: <>1__state = -3; <>2__current = new Token((TokenType)81, (uint?)null); <>1__state = 12; return true; case 12: <>1__state = -3; <>2__current = new Token((TokenType)89, (uint?)1u); <>1__state = 13; return true; case 13: <>1__state = -3; goto IL_038e; case 14: { <>1__state = -3; goto IL_038e; } IL_038e: <token>5__3 = null; break; } if (((global::System.Collections.IEnumerator)<>s__2).MoveNext()) { <token>5__3 = <>s__2.Current; if (<readyWaiter>5__1.Check(<token>5__3)) { <>2__current = <token>5__3; <>1__state = 1; return true; } <>2__current = <token>5__3; <>1__state = 14; return true; } <>m__Finally1(); <>s__2 = null; return false; } catch { //try-fault ((global::System.IDisposable)this).Dispose(); throw; } } bool global::System.Collections.IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__2 != null) { ((global::System.IDisposable)<>s__2).Dispose(); } } [DebuggerHidden] void global::System.Collections.IEnumerator.Reset() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) throw new NotSupportedException(); } [DebuggerHidden] global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator() { <Modify>d__3 <Modify>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Modify>d__ = this; } else { <Modify>d__ = new <Modify>d__3(0) { <>4__this = <>4__this }; } <Modify>d__.path = <>3__path; <Modify>d__.tokens = <>3__tokens; return <Modify>d__; } [DebuggerHidden] global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() { return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator(); } } [CompilerGenerated] [DebuggerBrowsable(/*Could not decode attribute arguments.*/)] private string <version>P; public MenuPatcher(Mod mod, string version) { <version>P = version; base..ctor(); } public bool ShouldRun(string path) { return path == "res://Scenes/Menus/Main Menu/main_menu.gdc"; } [IteratorStateMachine(typeof(<Modify>d__3))] public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens) { MultiTokenWaiter readyWaiter = new MultiTokenWaiter(new Func<Token, bool>[2] { delegate(Token t) { IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val != null && val.Name == "_ready"; }, (Token t) => (int)t.Type == 89 }, false, true); global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator(); try { while (((global::System.Collections.IEnumerator)enumerator).MoveNext()) { Token token = enumerator.Current; if (readyWaiter.Check(token)) { yield return token; yield return (Token)new IdentifierToken("get_node"); yield return new Token((TokenType)80, (uint?)null); yield return (Token)new ConstantToken((Variant)new StringVariant("/root/NeoQOLPack")); yield return new Token((TokenType)81, (uint?)null); yield return new Token((TokenType)84, (uint?)null); yield return (Token)new IdentifierToken("_append_version"); yield return new Token((TokenType)80, (uint?)null); yield return new Token((TokenType)3, (uint?)null); yield return new Token((TokenType)82, (uint?)null); yield return (Token)new ConstantToken((Variant)new StringVariant(<version>P)); yield return new Token((TokenType)81, (uint?)null); yield return new Token((TokenType)89, (uint?)1u); } else { yield return token; } } } finally { ((global::System.IDisposable)enumerator)?.Dispose(); } } } public class OptionsMenuPatcher : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__2 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable { private int <>1__state; private Token <>2__current; private int <>l__initialThreadId; private string path; public string <>3__path; private global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; public OptionsMenuPatcher <>4__this; private MultiTokenWaiter <extendsWaiter>5__1; private MultiTokenWaiter <readyWaiter>5__2; private MultiTokenWaiter <setSelectionWaiter>5__3; private MultiTokenWaiter <resetWaiter>5__4; private MultiTokenWaiter <applySelectionsWaiter>5__5; private global::System.Collections.Generic.IEnumerator<Token> <>s__6; private Token <token>5__7; Token global::System.Collections.Generic.IEnumerator<Token>.Current { [DebuggerHidden] get { return <>2__current; } } object global::System.Collections.IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Modify>d__2(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void global::System.IDisposable.Dispose() { int num = <>1__state; if (num != -3 && (uint)(num - 1) > 146u) { return; } try { } finally { <>m__Finally1(); } } private bool MoveNext() { //IL_0780: Unknown result type (might be due to invalid IL or missing references) //IL_078a: Expected O, but got Unknown //IL_07a6: Unknown result type (might be due to invalid IL or missing references) //IL_07b0: Expected O, but got Unknown //IL_07d2: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Expected O, but got Unknown //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_0808: Expected O, but got Unknown //IL_086d: Unknown result type (might be due to invalid IL or missing references) //IL_0877: Expected O, but got Unknown //IL_0893: Unknown result type (might be due to invalid IL or missing references) //IL_089d: Expected O, but got Unknown //IL_08bf: Unknown result type (might be due to invalid IL or missing references) //IL_08c9: Expected O, but got Unknown //IL_08e6: Unknown result type (might be due to invalid IL or missing references) //IL_08f0: Expected O, but got Unknown //IL_0913: Unknown result type (might be due to invalid IL or missing references) //IL_091d: Expected O, but got Unknown //IL_093a: Unknown result type (might be due to invalid IL or missing references) //IL_0944: Expected O, but got Unknown //IL_093f: Unknown result type (might be due to invalid IL or missing references) //IL_0949: Expected O, but got Unknown //IL_096c: Unknown result type (might be due to invalid IL or missing references) //IL_0976: Expected O, but got Unknown //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09a3: Expected O, but got Unknown //IL_09c0: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Expected O, but got Unknown //IL_09ed: Unknown result type (might be due to invalid IL or missing references) //IL_09f7: Expected O, but got Unknown //IL_0a1a: Unknown result type (might be due to invalid IL or missing references) //IL_0a24: Expected O, but got Unknown //IL_0a44: Unknown result type (might be due to invalid IL or missing references) //IL_0a4e: Expected O, but got Unknown //IL_0a71: Unknown result type (might be due to invalid IL or missing references) //IL_0a7b: Expected O, but got Unknown //IL_0a98: Unknown result type (might be due to invalid IL or missing references) //IL_0aa2: Expected O, but got Unknown //IL_0ac5: Unknown result type (might be due to invalid IL or missing references) //IL_0acf: Expected O, but got Unknown //IL_0aec: Unknown result type (might be due to invalid IL or missing references) //IL_0af6: Expected O, but got Unknown //IL_0b19: Unknown result type (might be due to invalid IL or missing references) //IL_0b23: Expected O, but got Unknown //IL_0b40: Unknown result type (might be due to invalid IL or missing references) //IL_0b4a: Expected O, but got Unknown //IL_0b6d: Unknown result type (might be due to invalid IL or missing references) //IL_0b77: Expected O, but got Unknown //IL_0b92: Unknown result type (might be due to invalid IL or missing references) //IL_0b9c: Expected O, but got Unknown //IL_0b97: Unknown result type (might be due to invalid IL or missing references) //IL_0ba1: Expected O, but got Unknown //IL_0bc4: Unknown result type (might be due to invalid IL or missing references) //IL_0bce: Expected O, but got Unknown //IL_0bee: Unknown result type (might be due to invalid IL or missing references) //IL_0bf8: Expected O, but got Unknown //IL_0c15: Unknown result type (might be due to invalid IL or missing references) //IL_0c1f: Expected O, but got Unknown //IL_0c42: Unknown result type (might be due to invalid IL or missing references) //IL_0c4c: Expected O, but got Unknown //IL_0c69: Unknown result type (might be due to invalid IL or missing references) //IL_0c73: Expected O, but got Unknown //IL_0c96: Unknown result type (might be due to invalid IL or missing references) //IL_0ca0: Expected O, but got Unknown //IL_0cbd: Unknown result type (might be due to invalid IL or missing references) //IL_0cc7: Expected O, but got Unknown //IL_0cea: Unknown result type (might be due to invalid IL or missing references) //IL_0cf4: Expected O, but got Unknown //IL_0d0f: Unknown result type (might be due to invalid IL or missing references) //IL_0d19: Expected O, but got Unknown //IL_0d14: Unknown result type (might be due to invalid IL or missing references) //IL_0d1e: Expected O, but got Unknown //IL_0d41: Unknown result type (might be due to invalid IL or missing references) //IL_0d4b: Expected O, but got Unknown //IL_0d6b: Unknown result type (might be due to invalid IL or missing references) //IL_0d75: Expected O, but got Unknown //IL_0d92: Unknown result type (might be due to invalid IL or missing references) //IL_0d9c: Expected O, but got Unknown //IL_0dbf: Unknown result type (might be due to invalid IL or missing references) //IL_0dc9: Expected O, but got Unknown //IL_0de6: Unknown result type (might be due to invalid IL or missing references) //IL_0df0: Expected O, but got Unknown //IL_0e13: Unknown result type (might be due to invalid IL or missing references) //IL_0e1d: Expected O, but got Unknown //IL_0e3a: Unknown result type (might be due to invalid IL or missing references) //IL_0e44: Expected O, but got Unknown //IL_0e3f: Unknown result type (might be due to invalid IL or missing references) //IL_0e49: Expected O, but got Unknown //IL_0e69: Unknown result type (might be due to invalid IL or missing references) //IL_0e73: Expected O, but got Unknown //IL_0e90: Unknown result type (might be due to invalid IL or missing references) //IL_0e9a: Expected O, but got Unknown //IL_0ebd: Unknown result type (might be due to invalid IL or missing references) //IL_0ec7: Expected O, but got Unknown //IL_0ee4: Unknown result type (might be due to invalid IL or missing references) //IL_0eee: Expected O, but got Unknown //IL_0f11: Unknown result type (might be due to invalid IL or missing references) //IL_0f1b: Expected O, but got Unknown //IL_0f38: Unknown result type (might be due to invalid IL or missing references) //IL_0f42: Expected O, but got Unknown //IL_0f3d: Unknown result type (might be due to invalid IL or missing references) //IL_0f47: Expected O, but got Unknown //IL_0f67: Unknown result type (might be due to invalid IL or missing references) //IL_0f71: Expected O, but got Unknown //IL_0f8e: Unknown result type (might be due to invalid IL or missing references) //IL_0f98: Expected O, but got Unknown //IL_0fbb: Unknown result type (might be due to invalid IL or missing references) //IL_0fc5: Expected O, but got Unknown //IL_0fe2: Unknown result type (might be due to invalid IL or missing references) //IL_0fec: Expected O, but got Unknown //IL_0fe7: Unknown result type (might be due to invalid IL or missing references) //IL_0ff1: Expected O, but got Unknown //IL_1014: Unknown result type (might be due to invalid IL or missing references) //IL_101e: Expected O, but got Unknown //IL_1041: Unknown result type (might be due to invalid IL or missing references) //IL_104b: Expected O, but got Unknown //IL_1068: Unknown result type (might be due to invalid IL or missing references) //IL_1072: Expected O, but got Unknown //IL_1095: Unknown result type (might be due to invalid IL or missing references) //IL_109f: Expected O, but got Unknown //IL_10bc: Unknown result type (might be due to invalid IL or missing references) //IL_10c6: Expected O, but got Unknown //IL_10e9: Unknown result type (might be due to invalid IL or missing references) //IL_10f3: Expected O, but got Unknown //IL_1113: Unknown result type (might be due to invalid IL or missing references) //IL_111d: Expected O, but got Unknown //IL_113a: Unknown result type (might be due to invalid IL or missing references) //IL_1144: Expected O, but got Unknown //IL_1167: Unknown result type (might be due to invalid IL or missing references) //IL_1171: Expected O, but got Unknown //IL_118e: Unknown result type (might be due to invalid IL or missing references) //IL_1198: Expected O, but got Unknown //IL_1193: Unknown result type (might be due to invalid IL or missing references) //IL_119d: Expected O, but got Unknown //IL_11c0: Unknown result type (might be due to invalid IL or missing references) //IL_11ca: Expected O, but got Unknown //IL_11ed: Unknown result type (might be due to invalid IL or missing references) //IL_11f7: Expected O, but got Unknown //IL_1214: Unknown result type (might be due to invalid IL or missing references) //IL_121e: Expected O, but got Unknown //IL_1241: Unknown result type (might be due to invalid IL or missing references) //IL_124b: Expected O, but got Unknown //IL_1268: Unknown result type (might be due to invalid IL or missing references) //IL_1272: Expected O, but got Unknown //IL_1295: Unknown result type (might be due to invalid IL or missing references) //IL_129f: Expected O, but got Unknown //IL_12bc: Unknown result type (might be due to invalid IL or missing references) //IL_12c6: Expected O, but got Unknown //IL_12e9: Unknown result type (might be due to invalid IL or missing references) //IL_12f3: Expected O, but got Unknown //IL_1310: Unknown result type (might be due to invalid IL or missing references) //IL_131a: Expected O, but got Unknown //IL_1315: Unknown result type (might be due to invalid IL or missing references) //IL_131f: Expected O, but got Unknown //IL_1342: Unknown result type (might be due to invalid IL or missing references) //IL_134c: Expected O, but got Unknown //IL_136f: Unknown result type (might be due to invalid IL or missing references) //IL_1379: Expected O, but got Unknown //IL_1396: Unknown result type (might be due to invalid IL or missing references) //IL_13a0: Expected O, but got Unknown //IL_13c3: Unknown result type (might be due to invalid IL or missing references) //IL_13cd: Expected O, but got Unknown //IL_13f0: Unknown result type (might be due to invalid IL or missing references) //IL_13fa: Expected O, but got Unknown //IL_141d: Unknown result type (might be due to invalid IL or missing references) //IL_1427: Expected O, but got Unknown //IL_1442: Unknown result type (might be due to invalid IL or missing references) //IL_144c: Expected O, but got Unknown //IL_1447: Unknown result type (might be due to invalid IL or missing references) //IL_1451: Expected O, but got Unknown //IL_1474: Unknown result type (might be due to invalid IL or missing references) //IL_147e: Expected O, but got Unknown //IL_149e: Unknown result type (might be due to invalid IL or missing references) //IL_14a8: Expected O, but got Unknown //IL_14c5: Unknown result type (might be due to invalid IL or missing references) //IL_14cf: Expected O, but got Unknown //IL_14f2: Unknown result type (might be due to invalid IL or missing references) //IL_14fc: Expected O, but got Unknown //IL_1519: Unknown result type (might be due to invalid IL or missing references) //IL_1523: Expected O, but got Unkno