Decompiled source of Xenon v1.1.8
GDWeave\mods\Nilenta.Xenon\Xenon.dll
Decompiled a day 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.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text.Json.Serialization; using GDWeave; using GDWeave.Godot; using GDWeave.Godot.Variants; using GDWeave.Modding; using WebfishingSampleMod; using Xenon.Mods; using Xenon.Mods.CooldownMod; using Xenon.Mods.InstantCatch; using Xenon.Mods.NoBaitOP; using Xenon.Mods.UncapProps; [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("Xenon")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0.0+17c31601679742ef9764193a79f70bfe659a25cf")] [assembly: AssemblyProduct("Xenon")] [assembly: AssemblyTitle("Xenon")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Xenon.Mods { public class InfiniteJump : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__4 : 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 global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; public InfiniteJump <>4__this; private MultiTokenWaiter <itemCooldownMatch>5__2; private TokenConsumer <newlineConsumer>5__3; private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap3; 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__4(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) <= 2u) { 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_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown try { int num = <>1__state; InfiniteJump infiniteJump = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <itemCooldownMatch>5__2 = new MultiTokenWaiter(new Func<Token, bool>[3] { delegate(Token t) { IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val3 != null && val3.Name == "item_cooldown"; }, (Token t) => (int)t.Type == 23, delegate(Token t) { ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val != null) { Variant value = val.Value; IntVariant val2 = (IntVariant)(object)((value is IntVariant) ? value : null); if (val2 != null) { return val2.Value == 30; } } return false; } }, false, false); <newlineConsumer>5__3 = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89)); <>7__wrap3 = tokens.GetEnumerator(); <>1__state = -3; goto IL_01fc; case 1: <>1__state = -3; <newlineConsumer>5__3.Reset(); break; case 2: <>1__state = -3; infiniteJump.modInterface.Logger.Information($"[XENON]: {<token>5__5}"); <itemCooldownMatch>5__2.Reset(); goto IL_01f5; case 3: { <>1__state = -3; goto IL_01f5; } IL_01f5: <token>5__5 = null; goto IL_01fc; IL_01fc: do { if (((global::System.Collections.IEnumerator)<>7__wrap3).MoveNext()) { <token>5__5 = <>7__wrap3.Current; continue; } <>m__Finally1(); <>7__wrap3 = null; return false; } while (<newlineConsumer>5__3.Check(<token>5__5)); if (<newlineConsumer>5__3.Ready) { <>2__current = <token>5__5; <>1__state = 1; return true; } break; } if (<itemCooldownMatch>5__2.Check(<token>5__5)) { <>2__current = (Token)new ConstantToken((Variant)new IntVariant(0L, false)); <>1__state = 2; return true; } <>2__current = <token>5__5; <>1__state = 3; return true; } 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 (<>7__wrap3 != null) { ((global::System.IDisposable)<>7__wrap3).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__4 <Modify>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Modify>d__ = this; } else { <Modify>d__ = new <Modify>d__4(0) { <>4__this = <>4__this }; } <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(); } } private Config Config; private IModInterface modInterface; public InfiniteJump(IModInterface modInterface) { modInterface.Logger.Information("[XENON]: Loading InfiniteJump"); Config = modInterface.ReadConfig<Config>(); this.modInterface = modInterface; } public bool ShouldRun(string path) { return path == "res://Scenes/Entities/Player/player.gdc"; } [IteratorStateMachine(typeof(<Modify>d__4))] public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens) { MultiTokenWaiter itemCooldownMatch = new MultiTokenWaiter(new Func<Token, bool>[3] { delegate(Token t) { IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val3 != null && val3.Name == "item_cooldown"; }, (Token t) => (int)t.Type == 23, delegate(Token t) { ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val != null) { Variant value = val.Value; IntVariant val2 = (IntVariant)(object)((value is IntVariant) ? value : null); if (val2 != null) { return val2.Value == 30; } } return false; } }, false, false); TokenConsumer newlineConsumer = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89)); global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator(); try { while (((global::System.Collections.IEnumerator)enumerator).MoveNext()) { Token token = enumerator.Current; if (!newlineConsumer.Check(token)) { if (newlineConsumer.Ready) { yield return token; newlineConsumer.Reset(); } if (itemCooldownMatch.Check(token)) { yield return (Token)new ConstantToken((Variant)new IntVariant(0L, false)); modInterface.Logger.Information($"[XENON]: {token}"); itemCooldownMatch.Reset(); } else { yield return token; } } } } finally { ((global::System.IDisposable)enumerator)?.Dispose(); } } } public class Player : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__4 : 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 global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; public Player <>4__this; private MultiTokenWaiter <sprintMatch>5__2; private MultiTokenWaiter <walkSpeedMatch>5__3; private MultiTokenWaiter <catchStructureMatch1>5__4; private MultiTokenWaiter <baitWarnMatch>5__5; private MultiTokenWaiter <gravityMatch>5__6; private MultiTokenWaiter <freecamMatch1>5__7; private MultiTokenWaiter <freecamMatch2>5__8; private MultiTokenWaiter <validFishingSpotMatch>5__9; private MultiTokenWaiter <diveDistanceMatch>5__10; private MultiTokenWaiter <jumpHeightMatch>5__11; private MultiTokenWaiter <speedMultMatch1>5__12; private MultiTokenWaiter <speedMultMatch2>5__13; private MultiTokenWaiter <speedMultMatch3>5__14; private MultiTokenWaiter <cameraZoomClampMatch>5__15; private TokenConsumer <newlineConsumer>5__16; private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap16; private Token <token>5__18; 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__4(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) <= 32u) { try { } finally { <>m__Finally1(); } } } private bool MoveNext() { //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09d9: Expected O, but got Unknown //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09de: Expected O, but got Unknown //IL_0a93: Unknown result type (might be due to invalid IL or missing references) //IL_0a9d: 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_0b64: Unknown result type (might be due to invalid IL or missing references) //IL_0b6e: Expected O, but got Unknown //IL_0b69: Unknown result type (might be due to invalid IL or missing references) //IL_0b73: Expected O, but got Unknown //IL_0bff: Unknown result type (might be due to invalid IL or missing references) //IL_0c09: Expected O, but got Unknown //IL_0c04: Unknown result type (might be due to invalid IL or missing references) //IL_0c0e: Expected O, but got Unknown //IL_0cb8: Unknown result type (might be due to invalid IL or missing references) //IL_0cc2: 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_0ddd: Unknown result type (might be due to invalid IL or missing references) //IL_0de7: Expected O, but got Unknown //IL_0de2: Unknown result type (might be due to invalid IL or missing references) //IL_0dec: Expected O, but got Unknown //IL_0ea3: Unknown result type (might be due to invalid IL or missing references) //IL_0ead: Expected O, but got Unknown //IL_0ea8: Unknown result type (might be due to invalid IL or missing references) //IL_0eb2: Expected O, but got Unknown //IL_0f69: Unknown result type (might be due to invalid IL or missing references) //IL_0f73: Expected O, but got Unknown //IL_0f6e: Unknown result type (might be due to invalid IL or missing references) //IL_0f78: Expected O, but got Unknown //IL_102f: Unknown result type (might be due to invalid IL or missing references) //IL_1039: Expected O, but got Unknown //IL_1034: Unknown result type (might be due to invalid IL or missing references) //IL_103e: Expected O, but got Unknown //IL_110f: Unknown result type (might be due to invalid IL or missing references) //IL_1119: Expected O, but got Unknown //IL_1114: Unknown result type (might be due to invalid IL or missing references) //IL_111e: 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_11f2: Unknown result type (might be due to invalid IL or missing references) //IL_11fc: Expected O, but got Unknown //IL_1220: Unknown result type (might be due to invalid IL or missing references) //IL_122a: Expected O, but got Unknown //IL_1245: Unknown result type (might be due to invalid IL or missing references) //IL_124f: Expected O, but got Unknown //IL_124a: Unknown result type (might be due to invalid IL or missing references) //IL_1254: Expected O, but got Unknown //IL_1278: Unknown result type (might be due to invalid IL or missing references) //IL_1282: Expected O, but got Unknown //IL_1311: Unknown result type (might be due to invalid IL or missing references) //IL_131b: Expected O, but got Unknown //IL_1316: Unknown result type (might be due to invalid IL or missing references) //IL_1320: Expected O, but got Unknown //IL_13bb: Unknown result type (might be due to invalid IL or missing references) //IL_13c5: Expected O, but got Unknown //IL_13c0: Unknown result type (might be due to invalid IL or missing references) //IL_13ca: Expected O, but got Unknown //IL_13ee: Unknown result type (might be due to invalid IL or missing references) //IL_13f8: Expected O, but got Unknown //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Expected O, but got Unknown //IL_0d27: Unknown result type (might be due to invalid IL or missing references) //IL_0d31: Expected O, but got Unknown //IL_0d2c: Unknown result type (might be due to invalid IL or missing references) //IL_0d36: Expected O, but got Unknown //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Expected O, but got Unknown //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Expected O, but got Unknown //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Expected O, but got Unknown //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Expected O, but got Unknown //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Expected O, but got Unknown //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Expected O, but got Unknown //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Expected O, but got Unknown //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05dd: Expected O, but got Unknown //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_069a: 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_08d6: Unknown result type (might be due to invalid IL or missing references) //IL_08e0: Expected O, but got Unknown //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_090a: Expected O, but got Unknown try { int num = <>1__state; Player player = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <sprintMatch>5__2 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val24 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val24 != null && val24.Name == "sprint_speed"; }, (Token t) => (int)t.Type == 23 }, false, false); <walkSpeedMatch>5__3 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val23 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val23 != null && val23.Name == "walk_speed"; }, (Token t) => (int)t.Type == 23 }, false, false); <catchStructureMatch1>5__4 = new MultiTokenWaiter(new Func<Token, bool>[3] { delegate(Token t) { ConstantToken val21 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val21 != null) { Variant value4 = val21.Value; StringVariant val22 = (StringVariant)(object)((value4 is StringVariant) ? value4 : null); if (val22 != null) { return val22.Value == "catch"; } } return false; }, (Token t) => (int)t.Type == 86, delegate(Token t) { ConstantToken val19 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val19 != null) { Variant value3 = val19.Value; RealVariant val20 = (RealVariant)(object)((value3 is RealVariant) ? value3 : null); if (val20 != null) { return val20.Value == 0.0; } } return false; } }, false, false); <baitWarnMatch>5__5 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val18 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val18 != null && val18.Name == "bait_warn"; }, (Token t) => (int)t.Type == 23 }, false, false); <gravityMatch>5__6 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 58, delegate(Token t) { IdentifierToken val17 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val17 != null && val17.Name == "GRAVITY"; }, (Token t) => (int)t.Type == 23 }, false, false); <freecamMatch1>5__7 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val16 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val16 != null && val16.Name == "speed"; }, (Token t) => (int)t.Type == 23 }, false, false); <freecamMatch2>5__8 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val15 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val15 != null && val15.Name == "max_dist"; }, (Token t) => (int)t.Type == 23 }, false, false); <validFishingSpotMatch>5__9 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val14 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val14 != null && val14.Name == "is_valid_fishing_spot"; }, (Token t) => (int)t.Type == 23 }, false, false); <diveDistanceMatch>5__10 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val13 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val13 != null && val13.Name == "dive_distance"; }, (Token t) => (int)t.Type == 23 }, false, false); <jumpHeightMatch>5__11 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val12 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val12 != null && val12.Name == "jump_height"; }, (Token t) => (int)t.Type == 23 }, false, false); <speedMultMatch1>5__12 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val11 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val11 != null && val11.Name == "speed_mult"; }, (Token t) => (int)t.Type == 23 }, false, false); <speedMultMatch2>5__13 = new MultiTokenWaiter(new Func<Token, bool>[5] { (Token t) => (int)t.Type == 38, delegate(Token t) { IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val10 != null && val10.Name == "diving"; }, (Token t) => (int)t.Type == 86, delegate(Token t) { IdentifierToken val9 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val9 != null && val9.Name == "speed_mult"; }, (Token t) => (int)t.Type == 23 }, false, false); <speedMultMatch3>5__14 = new MultiTokenWaiter(new Func<Token, bool>[8] { delegate(Token t) { IdentifierToken val8 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val8 != null && val8.Name == "gravity_vec"; }, (Token t) => (int)t.Type == 24, (Token t) => (int)t.Type == 4, (Token t) => (int)t.Type == 80, delegate(Token t) { ConstantToken val6 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val6 != null) { Variant value2 = val6.Value; IntVariant val7 = (IntVariant)(object)((value2 is IntVariant) ? value2 : null); if (val7 != null) { return val7.Value == 0; } } return false; }, (Token t) => (int)t.Type == 82, delegate(Token t) { IdentifierToken val5 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val5 != null && val5.Name == "jump_height"; }, (Token t) => (int)t.Type == 18 }, false, false); <cameraZoomClampMatch>5__15 = new MultiTokenWaiter(new Func<Token, bool>[8] { delegate(Token t) { IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val4 != null && val4.Name == "camera_zoom"; }, (Token t) => (int)t.Type == 23, (Token t) => (int)t.Type == 5, (Token t) => (int)t.Type == 80, delegate(Token t) { IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val3 != null && val3.Name == "camera_zoom"; }, (Token t) => (int)t.Type == 82, delegate(Token t) { ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val != null) { Variant value = val.Value; RealVariant val2 = (RealVariant)(object)((value is RealVariant) ? value : null); if (val2 != null) { return val2.Value == 0.0; } } return false; }, (Token t) => (int)t.Type == 82 }, false, false); <newlineConsumer>5__16 = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89)); <>7__wrap16 = tokens.GetEnumerator(); <>1__state = -3; goto IL_1463; case 1: <>1__state = -3; <newlineConsumer>5__16.Reset(); goto IL_0989; case 2: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerSprintSpeed, false)); <>1__state = 3; return true; case 3: <>1__state = -3; player.modInterface.Logger.Information($"[XENON]: Changed sprint speed to {player.Config.PlayerSprintSpeed}"); <sprintMatch>5__2.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 4: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.FreecamMovementSpeed, false)); <>1__state = 5; return true; case 5: <>1__state = -3; player.modInterface.Logger.Information($"[XENON]: Changed freecam speed multiplier (1) to {player.Config.FreecamMovementSpeed}"); <freecamMatch1>5__7.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 6: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant(99999999999.0, false)); <>1__state = 7; return true; case 7: <>1__state = -3; player.modInterface.Logger.Information("[XENON]: uncapped freecam movement"); <freecamMatch2>5__8.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 8: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerWalkSpeed, false)); <>1__state = 9; return true; case 9: <>1__state = -3; player.modInterface.Logger.Information($"[XENON]: Changed walk speed to {player.Config.PlayerWalkSpeed}"); <walkSpeedMatch>5__3.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 10: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new IntVariant(3L, false)); <>1__state = 11; return true; case 11: <>1__state = -3; <baitWarnMatch>5__5.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 12: <>1__state = -3; player.modInterface.Logger.Information($"[XENON]: Made it possible to catch with no bait (TOKEN): {<token>5__18}"); <catchStructureMatch1>5__4.Reset(); goto IL_145c; case 13: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerGravity, false)); <>1__state = 14; return true; case 14: <>1__state = -3; player.modInterface.Logger.Information($"[XENON]: Changed gravity to {player.Config.PlayerGravity}"); <gravityMatch>5__6.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 15: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerDiveDistance, false)); <>1__state = 16; return true; case 16: <>1__state = -3; player.modInterface.Logger.Information($"[XENON]: Changed dive distance to {player.Config.PlayerDiveDistance}"); <diveDistanceMatch>5__10.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 17: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerJumpHeight, false)); <>1__state = 18; return true; case 18: <>1__state = -3; player.modInterface.Logger.Information($"[XENON]: Changed jump height to {player.Config.PlayerJumpHeight}"); <jumpHeightMatch>5__11.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 19: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerSpeedMult, false)); <>1__state = 20; return true; case 20: <>1__state = -3; player.modInterface.Logger.Information($"[XENON]: Changed speed multiplier to {player.Config.PlayerSpeedMult}"); <speedMultMatch1>5__12.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 21: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerSpeedMult + 0.15, false)); <>1__state = 22; return true; case 22: <>1__state = -3; player.modInterface.Logger.Information($"[XENON]: Changed speed multiplier for diving to {(double)player.Config.PlayerSpeedMult + 0.15}"); <speedMultMatch2>5__13.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 23: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant(1.0, false)); <>1__state = 24; return true; case 24: <>1__state = -3; <>2__current = new Token((TokenType)82, (uint?)null); <>1__state = 25; return true; case 25: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new IntVariant(0L, false)); <>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; player.modInterface.Logger.Information("[XENON]: bely slide"); <speedMultMatch3>5__14.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 28: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new BoolVariant(true)); <>1__state = 29; return true; case 29: <>1__state = -3; player.modInterface.Logger.Information("[XENON]: Enabled fishing anywhere."); <validFishingSpotMatch>5__9.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 30: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant(999999999.0, false)); <>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; player.modInterface.Logger.Information("[XENON]: Uncapped zoom"); <cameraZoomClampMatch>5__15.Reset(); <newlineConsumer>5__16.SetReady(); goto IL_145c; case 33: { <>1__state = -3; goto IL_145c; } IL_145c: <token>5__18 = null; goto IL_1463; IL_0989: if (<sprintMatch>5__2.Check(<token>5__18)) { <>2__current = <token>5__18; <>1__state = 2; return true; } if (<freecamMatch1>5__7.Check(<token>5__18)) { <>2__current = <token>5__18; <>1__state = 4; return true; } if (<freecamMatch2>5__8.Check(<token>5__18) && player.Config.UncapFreecamMovement) { <>2__current = <token>5__18; <>1__state = 6; return true; } if (<walkSpeedMatch>5__3.Check(<token>5__18)) { <>2__current = <token>5__18; <>1__state = 8; return true; } if (<baitWarnMatch>5__5.Check(<token>5__18)) { <>2__current = <token>5__18; <>1__state = 10; return true; } if (<catchStructureMatch1>5__4.Check(<token>5__18) && player.Config.AllowFishingWithNoBait) { <>2__current = (Token)new ConstantToken((Variant)new RealVariant(1.0, false)); <>1__state = 12; return true; } if (<gravityMatch>5__6.Check(<token>5__18)) { <>2__current = <token>5__18; <>1__state = 13; return true; } if (<diveDistanceMatch>5__10.Check(<token>5__18)) { <>2__current = <token>5__18; <>1__state = 15; return true; } if (<jumpHeightMatch>5__11.Check(<token>5__18)) { <>2__current = <token>5__18; <>1__state = 17; return true; } if (<speedMultMatch1>5__12.Check(<token>5__18)) { <>2__current = <token>5__18; <>1__state = 19; return true; } if (<speedMultMatch2>5__13.Check(<token>5__18) && player.Config.BellySlide) { <>2__current = <token>5__18; <>1__state = 21; return true; } if (<speedMultMatch3>5__14.Check(<token>5__18) && player.Config.BellySlide) { <>2__current = <token>5__18; <>1__state = 23; return true; } if (<validFishingSpotMatch>5__9.Check(<token>5__18) && player.Config.FishAnywhere) { <>2__current = <token>5__18; <>1__state = 28; return true; } if (<cameraZoomClampMatch>5__15.Check(<token>5__18) && player.Config.UncapZoom) { <>2__current = <token>5__18; <>1__state = 30; return true; } <>2__current = <token>5__18; <>1__state = 33; return true; IL_1463: do { if (((global::System.Collections.IEnumerator)<>7__wrap16).MoveNext()) { <token>5__18 = <>7__wrap16.Current; continue; } <>m__Finally1(); <>7__wrap16 = null; return false; } while (<newlineConsumer>5__16.Check(<token>5__18)); if (<newlineConsumer>5__16.Ready) { <>2__current = <token>5__18; <>1__state = 1; return true; } goto IL_0989; } } 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 (<>7__wrap16 != null) { ((global::System.IDisposable)<>7__wrap16).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__4 <Modify>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Modify>d__ = this; } else { <Modify>d__ = new <Modify>d__4(0) { <>4__this = <>4__this }; } <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(); } } private Config Config; private IModInterface modInterface; public Player(IModInterface modInterface) { modInterface.Logger.Information("[XENON]: Loading modifications for Scenes/Entities/Player/player.gdc"); Config = modInterface.ReadConfig<Config>(); this.modInterface = modInterface; } public bool ShouldRun(string path) { return path == "res://Scenes/Entities/Player/player.gdc"; } [IteratorStateMachine(typeof(<Modify>d__4))] public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens) { MultiTokenWaiter sprintMatch = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val24 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val24 != null && val24.Name == "sprint_speed"; }, (Token t) => (int)t.Type == 23 }, false, false); MultiTokenWaiter walkSpeedMatch = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val23 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val23 != null && val23.Name == "walk_speed"; }, (Token t) => (int)t.Type == 23 }, false, false); MultiTokenWaiter catchStructureMatch1 = new MultiTokenWaiter(new Func<Token, bool>[3] { delegate(Token t) { ConstantToken val21 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val21 != null) { Variant value4 = val21.Value; StringVariant val22 = (StringVariant)(object)((value4 is StringVariant) ? value4 : null); if (val22 != null) { return val22.Value == "catch"; } } return false; }, (Token t) => (int)t.Type == 86, delegate(Token t) { ConstantToken val19 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val19 != null) { Variant value3 = val19.Value; RealVariant val20 = (RealVariant)(object)((value3 is RealVariant) ? value3 : null); if (val20 != null) { return val20.Value == 0.0; } } return false; } }, false, false); MultiTokenWaiter baitWarnMatch = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val18 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val18 != null && val18.Name == "bait_warn"; }, (Token t) => (int)t.Type == 23 }, false, false); MultiTokenWaiter gravityMatch = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 58, delegate(Token t) { IdentifierToken val17 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val17 != null && val17.Name == "GRAVITY"; }, (Token t) => (int)t.Type == 23 }, false, false); MultiTokenWaiter freecamMatch1 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val16 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val16 != null && val16.Name == "speed"; }, (Token t) => (int)t.Type == 23 }, false, false); MultiTokenWaiter freecamMatch2 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val15 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val15 != null && val15.Name == "max_dist"; }, (Token t) => (int)t.Type == 23 }, false, false); MultiTokenWaiter validFishingSpotMatch = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val14 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val14 != null && val14.Name == "is_valid_fishing_spot"; }, (Token t) => (int)t.Type == 23 }, false, false); MultiTokenWaiter diveDistanceMatch = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val13 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val13 != null && val13.Name == "dive_distance"; }, (Token t) => (int)t.Type == 23 }, false, false); MultiTokenWaiter jumpHeightMatch = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val12 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val12 != null && val12.Name == "jump_height"; }, (Token t) => (int)t.Type == 23 }, false, false); MultiTokenWaiter speedMultMatch1 = new MultiTokenWaiter(new Func<Token, bool>[3] { (Token t) => (int)t.Type == 59, delegate(Token t) { IdentifierToken val11 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val11 != null && val11.Name == "speed_mult"; }, (Token t) => (int)t.Type == 23 }, false, false); MultiTokenWaiter speedMultMatch2 = new MultiTokenWaiter(new Func<Token, bool>[5] { (Token t) => (int)t.Type == 38, delegate(Token t) { IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val10 != null && val10.Name == "diving"; }, (Token t) => (int)t.Type == 86, delegate(Token t) { IdentifierToken val9 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val9 != null && val9.Name == "speed_mult"; }, (Token t) => (int)t.Type == 23 }, false, false); MultiTokenWaiter speedMultMatch3 = new MultiTokenWaiter(new Func<Token, bool>[8] { delegate(Token t) { IdentifierToken val8 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val8 != null && val8.Name == "gravity_vec"; }, (Token t) => (int)t.Type == 24, (Token t) => (int)t.Type == 4, (Token t) => (int)t.Type == 80, delegate(Token t) { ConstantToken val6 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val6 != null) { Variant value2 = val6.Value; IntVariant val7 = (IntVariant)(object)((value2 is IntVariant) ? value2 : null); if (val7 != null) { return val7.Value == 0; } } return false; }, (Token t) => (int)t.Type == 82, delegate(Token t) { IdentifierToken val5 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val5 != null && val5.Name == "jump_height"; }, (Token t) => (int)t.Type == 18 }, false, false); MultiTokenWaiter cameraZoomClampMatch = new MultiTokenWaiter(new Func<Token, bool>[8] { delegate(Token t) { IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val4 != null && val4.Name == "camera_zoom"; }, (Token t) => (int)t.Type == 23, (Token t) => (int)t.Type == 5, (Token t) => (int)t.Type == 80, delegate(Token t) { IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val3 != null && val3.Name == "camera_zoom"; }, (Token t) => (int)t.Type == 82, delegate(Token t) { ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val != null) { Variant value = val.Value; RealVariant val2 = (RealVariant)(object)((value is RealVariant) ? value : null); if (val2 != null) { return val2.Value == 0.0; } } return false; }, (Token t) => (int)t.Type == 82 }, false, false); TokenConsumer newlineConsumer = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89)); global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator(); try { while (((global::System.Collections.IEnumerator)enumerator).MoveNext()) { Token token = enumerator.Current; if (!newlineConsumer.Check(token)) { if (newlineConsumer.Ready) { yield return token; newlineConsumer.Reset(); } if (sprintMatch.Check(token)) { yield return token; yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerSprintSpeed, false)); modInterface.Logger.Information($"[XENON]: Changed sprint speed to {Config.PlayerSprintSpeed}"); sprintMatch.Reset(); newlineConsumer.SetReady(); } else if (freecamMatch1.Check(token)) { yield return token; yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.FreecamMovementSpeed, false)); modInterface.Logger.Information($"[XENON]: Changed freecam speed multiplier (1) to {Config.FreecamMovementSpeed}"); freecamMatch1.Reset(); newlineConsumer.SetReady(); } else if (freecamMatch2.Check(token) && Config.UncapFreecamMovement) { yield return token; yield return (Token)new ConstantToken((Variant)new RealVariant(99999999999.0, false)); modInterface.Logger.Information("[XENON]: uncapped freecam movement"); freecamMatch2.Reset(); newlineConsumer.SetReady(); } else if (walkSpeedMatch.Check(token)) { yield return token; yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerWalkSpeed, false)); modInterface.Logger.Information($"[XENON]: Changed walk speed to {Config.PlayerWalkSpeed}"); walkSpeedMatch.Reset(); newlineConsumer.SetReady(); } else if (baitWarnMatch.Check(token)) { yield return token; yield return (Token)new ConstantToken((Variant)new IntVariant(3L, false)); baitWarnMatch.Reset(); newlineConsumer.SetReady(); } else if (catchStructureMatch1.Check(token) && Config.AllowFishingWithNoBait) { yield return (Token)new ConstantToken((Variant)new RealVariant(1.0, false)); modInterface.Logger.Information($"[XENON]: Made it possible to catch with no bait (TOKEN): {token}"); catchStructureMatch1.Reset(); } else if (gravityMatch.Check(token)) { yield return token; yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerGravity, false)); modInterface.Logger.Information($"[XENON]: Changed gravity to {Config.PlayerGravity}"); gravityMatch.Reset(); newlineConsumer.SetReady(); } else if (diveDistanceMatch.Check(token)) { yield return token; yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerDiveDistance, false)); modInterface.Logger.Information($"[XENON]: Changed dive distance to {Config.PlayerDiveDistance}"); diveDistanceMatch.Reset(); newlineConsumer.SetReady(); } else if (jumpHeightMatch.Check(token)) { yield return token; yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerJumpHeight, false)); modInterface.Logger.Information($"[XENON]: Changed jump height to {Config.PlayerJumpHeight}"); jumpHeightMatch.Reset(); newlineConsumer.SetReady(); } else if (speedMultMatch1.Check(token)) { yield return token; yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerSpeedMult, false)); modInterface.Logger.Information($"[XENON]: Changed speed multiplier to {Config.PlayerSpeedMult}"); speedMultMatch1.Reset(); newlineConsumer.SetReady(); } else if (speedMultMatch2.Check(token) && Config.BellySlide) { yield return token; yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerSpeedMult + 0.15, false)); modInterface.Logger.Information($"[XENON]: Changed speed multiplier for diving to {(double)Config.PlayerSpeedMult + 0.15}"); speedMultMatch2.Reset(); newlineConsumer.SetReady(); } else if (speedMultMatch3.Check(token) && Config.BellySlide) { yield return token; yield return (Token)new ConstantToken((Variant)new RealVariant(1.0, false)); yield return new Token((TokenType)82, (uint?)null); yield return (Token)new ConstantToken((Variant)new IntVariant(0L, false)); yield return new Token((TokenType)81, (uint?)null); modInterface.Logger.Information("[XENON]: bely slide"); speedMultMatch3.Reset(); newlineConsumer.SetReady(); } else if (validFishingSpotMatch.Check(token) && Config.FishAnywhere) { yield return token; yield return (Token)new ConstantToken((Variant)new BoolVariant(true)); modInterface.Logger.Information("[XENON]: Enabled fishing anywhere."); validFishingSpotMatch.Reset(); newlineConsumer.SetReady(); } else if (cameraZoomClampMatch.Check(token) && Config.UncapZoom) { yield return token; yield return (Token)new ConstantToken((Variant)new RealVariant(999999999.0, false)); yield return new Token((TokenType)81, (uint?)null); modInterface.Logger.Information("[XENON]: Uncapped zoom"); cameraZoomClampMatch.Reset(); newlineConsumer.SetReady(); } else { yield return token; } } } } finally { ((global::System.IDisposable)enumerator)?.Dispose(); } } } public class PlayerData : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__4 : 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 global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; private TokenConsumer <newlineConsumer>5__2; private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap2; private Token <token>5__4; 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__4(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) <= 1u) { try { } finally { <>m__Finally1(); } } } private bool MoveNext() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <newlineConsumer>5__2 = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89)); <>7__wrap2 = tokens.GetEnumerator(); <>1__state = -3; goto IL_00f0; case 1: <>1__state = -3; <newlineConsumer>5__2.Reset(); break; case 2: { <>1__state = -3; <token>5__4 = null; goto IL_00f0; } IL_00f0: do { if (((global::System.Collections.IEnumerator)<>7__wrap2).MoveNext()) { <token>5__4 = <>7__wrap2.Current; continue; } <>m__Finally1(); <>7__wrap2 = null; return false; } while (<newlineConsumer>5__2.Check(<token>5__4)); if (<newlineConsumer>5__2.Ready) { <>2__current = <token>5__4; <>1__state = 1; return true; } break; } <>2__current = <token>5__4; <>1__state = 2; return true; } 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 (<>7__wrap2 != null) { ((global::System.IDisposable)<>7__wrap2).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__4 <Modify>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Modify>d__ = this; } else { <Modify>d__ = new <Modify>d__4(0); } <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(); } } private Config Config; private IModInterface modInterface; public PlayerData(IModInterface modInterface) { modInterface.Logger.Information("[XENON]: Loading modifications for Scenes/Singletons/playerdata.gdc"); Config = modInterface.ReadConfig<Config>(); this.modInterface = modInterface; } public bool ShouldRun(string path) { return path == "res://Scenes/Singletons/playerdata.gdc"; } [IteratorStateMachine(typeof(<Modify>d__4))] public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens) { TokenConsumer newlineConsumer = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89)); global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator(); try { while (((global::System.Collections.IEnumerator)enumerator).MoveNext()) { Token token = enumerator.Current; if (!newlineConsumer.Check(token)) { if (newlineConsumer.Ready) { yield return token; newlineConsumer.Reset(); } yield return token; } } } finally { ((global::System.IDisposable)enumerator)?.Dispose(); } } } } namespace Xenon.Mods.UnConstVar { public class Player : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__5 : 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 global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; public Player <>4__this; private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap1; 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__5(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 || num == 1) { try { } finally { <>m__Finally1(); } } } private bool MoveNext() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Invalid comparison between Unknown and I4 //IL_009e: Unknown result type (might be due to invalid IL or missing references) try { int num = <>1__state; Player player = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>7__wrap1 = tokens.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; break; } if (((global::System.Collections.IEnumerator)<>7__wrap1).MoveNext()) { Token current = <>7__wrap1.Current; if (player.modificationCount < 5 && current != null && (int)current.Type == 58) { player.modInterface.Logger.Information($"[XENON]: Change Const to VAR CAUSE BAIOT DATA IS A CONSTANT IMMA CRY (TOKEN): {current}"); current.Type = (TokenType)59; player.modificationCount++; } <>2__current = current; <>1__state = 1; return true; } <>m__Finally1(); <>7__wrap1 = 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 (<>7__wrap1 != null) { ((global::System.IDisposable)<>7__wrap1).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__5 <Modify>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Modify>d__ = this; } else { <Modify>d__ = new <Modify>d__5(0) { <>4__this = <>4__this }; } <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(); } } private Config Config; private IModInterface modInterface; private int modificationCount; public Player(IModInterface modInterface) { modInterface.Logger.Information("[XENON]: Loading const -> var modifications for Scenes/Entities/Player/player.gdc"); Config = modInterface.ReadConfig<Config>(); this.modInterface = modInterface; } public bool ShouldRun(string path) { return path == "res://Scenes/Entities/Player/player.gdc"; } [IteratorStateMachine(typeof(<Modify>d__5))] public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens) { global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator(); try { while (((global::System.Collections.IEnumerator)enumerator).MoveNext()) { Token current = enumerator.Current; if (modificationCount < 5 && current != null && (int)current.Type == 58) { modInterface.Logger.Information($"[XENON]: Change Const to VAR CAUSE BAIOT DATA IS A CONSTANT IMMA CRY (TOKEN): {current}"); current.Type = (TokenType)59; modificationCount++; } yield return current; } } finally { ((global::System.IDisposable)enumerator)?.Dispose(); } } } } namespace Xenon.Mods.UncapProps { public class Player : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__4 : 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 global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; public Player <>4__this; private MultiTokenWaiter <propMatch1>5__2; private MultiTokenWaiter <notificationMatch>5__3; private MultiTokenWaiter <notificationMatch2>5__4; private TokenConsumer <newlineConsumer>5__5; private bool <modified>5__6; private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap6; private Token <token>5__8; 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__4(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) { try { } finally { <>m__Finally1(); } } } private bool MoveNext() { //IL_0773: Unknown result type (might be due to invalid IL or missing references) //IL_077d: Expected O, but got Unknown //IL_0778: Unknown result type (might be due to invalid IL or missing references) //IL_0782: Expected O, but got Unknown //IL_07a4: Unknown result type (might be due to invalid IL or missing references) //IL_07ae: Expected O, but got Unknown //IL_07d0: Unknown result type (might be due to invalid IL or missing references) //IL_07da: Expected O, but got Unknown //IL_07f6: Unknown result type (might be due to invalid IL or missing references) //IL_0800: Expected O, but got Unknown //IL_0822: Unknown result type (might be due to invalid IL or missing references) //IL_082c: Expected O, but got Unknown //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_0852: Expected O, but got Unknown //IL_0874: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Expected O, but got Unknown //IL_099c: Unknown result type (might be due to invalid IL or missing references) //IL_09a6: Expected O, but got Unknown //IL_09c9: Unknown result type (might be due to invalid IL or missing references) //IL_09d3: Expected O, but got Unknown //IL_0909: Unknown result type (might be due to invalid IL or missing references) //IL_0913: Expected O, but got Unknown //IL_096f: Unknown result type (might be due to invalid IL or missing references) //IL_0979: Expected O, but got Unknown //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Expected O, but got Unknown //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_0687: Expected O, but got Unknown //IL_06a7: Unknown result type (might be due to invalid IL or missing references) //IL_06b1: Expected O, but got Unknown try { int num = <>1__state; Player player = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <propMatch1>5__2 = new MultiTokenWaiter(new Func<Token, bool>[7] { (Token t) => (int)t.Type == 38, delegate(Token t) { IdentifierToken val16 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val16 != null && val16.Name == "prop_ids"; }, (Token t) => (int)t.Type == 84, delegate(Token t) { IdentifierToken val15 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val15 != null && val15.Name == "size"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 11 }, false, false); <notificationMatch>5__3 = new MultiTokenWaiter(new Func<Token, bool>[5] { delegate(Token t) { ConstantToken val13 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val13 != null) { Variant value3 = val13.Value; StringVariant val14 = (StringVariant)(object)((value3 is StringVariant) ? value3 : null); if (val14 != null) { return val14.Value == "invalid prop placement"; } } return false; }, (Token t) => (int)t.Type == 82, delegate(Token t) { ConstantToken val11 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val11 != null) { Variant value2 = val11.Value; IntVariant val12 = (IntVariant)(object)((value2 is IntVariant) ? value2 : null); if (val12 != null) { return val12.Value == 1; } } return false; }, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 89 }, false, false); <notificationMatch2>5__4 = new MultiTokenWaiter(new Func<Token, bool>[32] { (Token t) => (int)t.Type == 38, (Token t) => (int)t.Type == 87, delegate(Token t) { IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val10 != null && val10.Name == "detection_zones"; }, (Token t) => (int)t.Type == 19, delegate(Token t) { IdentifierToken val9 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val9 != null && val9.Name == "prop_detect"; }, (Token t) => (int)t.Type == 84, delegate(Token t) { IdentifierToken val8 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val8 != null && val8.Name == "get_overlapping_bodies"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 84, delegate(Token t) { IdentifierToken val7 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val7 != null && val7.Name == "size"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 11, delegate(Token t) { ConstantToken val5 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val5 != null) { Variant value = val5.Value; IntVariant val6 = (IntVariant)(object)((value is IntVariant) ? value : null); if (val6 != null) { return val6.Value == 0; } } return false; }, (Token t) => (int)t.Type == 14, (Token t) => (int)t.Type == 15, delegate(Token t) { IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val4 != null && val4.Name == "is_on_floor"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 14, (Token t) => (int)t.Type == 15, (Token t) => (int)t.Type == 87, delegate(Token t) { IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val3 != null && val3.Name == "detection_zones"; }, (Token t) => (int)t.Type == 19, delegate(Token t) { IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val2 != null && val2.Name == "prop_ray"; }, (Token t) => (int)t.Type == 84, delegate(Token t) { IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val != null && val.Name == "is_colliding"; }, (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); <newlineConsumer>5__5 = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89)); <modified>5__6 = false; <>7__wrap6 = tokens.GetEnumerator(); <>1__state = -3; goto IL_0a26; case 1: <>1__state = -3; <newlineConsumer>5__5.Reset(); goto IL_0737; case 2: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new IntVariant(4L, false)); <>1__state = 3; return true; case 3: <>1__state = -3; <>2__current = new Token((TokenType)13, (uint?)null); <>1__state = 4; return true; case 4: <>1__state = -3; <>2__current = new Token((TokenType)15, (uint?)null); <>1__state = 5; return true; case 5: <>1__state = -3; <>2__current = (Token)new IdentifierToken("Network"); <>1__state = 6; return true; case 6: <>1__state = -3; <>2__current = new Token((TokenType)84, (uint?)null); <>1__state = 7; return true; case 7: <>1__state = -3; <>2__current = (Token)new IdentifierToken("GAME_MASTER"); <>1__state = 8; return true; case 8: <>1__state = -3; <>2__current = new Token((TokenType)86, (uint?)null); <>1__state = 9; return true; case 9: <>1__state = -3; player.modInterface.Logger.Information($"[XENON]: {<token>5__8}"); <propMatch1>5__2.Reset(); <newlineConsumer>5__5.SetReady(); goto IL_0a1f; case 10: <>1__state = -3; <notificationMatch>5__3.Reset(); <newlineConsumer>5__5.SetReady(); <modified>5__6 = true; goto IL_0a1f; case 11: <>1__state = -3; <>2__current = new Token((TokenType)80, (uint?)null); <>1__state = 12; return true; case 12: <>1__state = -3; <>2__current = new Token((TokenType)81, (uint?)null); <>1__state = 13; return true; case 13: <>1__state = -3; <notificationMatch>5__3.Reset(); <newlineConsumer>5__5.SetReady(); goto IL_0a1f; case 14: { <>1__state = -3; goto IL_0a1f; } IL_0a1f: <token>5__8 = null; goto IL_0a26; IL_0737: if (<propMatch1>5__2.Check(<token>5__8)) { <>2__current = <token>5__8; <>1__state = 2; return true; } if (<notificationMatch>5__3.Check(<token>5__8)) { <>2__current = new Token((TokenType)89, (uint?)null); <>1__state = 10; return true; } if (<notificationMatch2>5__4.Check(<token>5__8) & <modified>5__6) { <>2__current = (Token)new IdentifierToken("_refresh_props"); <>1__state = 11; return true; } <>2__current = <token>5__8; <>1__state = 14; return true; IL_0a26: do { if (((global::System.Collections.IEnumerator)<>7__wrap6).MoveNext()) { <token>5__8 = <>7__wrap6.Current; continue; } <>m__Finally1(); <>7__wrap6 = null; return false; } while (<newlineConsumer>5__5.Check(<token>5__8)); if (<newlineConsumer>5__5.Ready) { <>2__current = <token>5__8; <>1__state = 1; return true; } goto IL_0737; } } 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 (<>7__wrap6 != null) { ((global::System.IDisposable)<>7__wrap6).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__4 <Modify>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Modify>d__ = this; } else { <Modify>d__ = new <Modify>d__4(0) { <>4__this = <>4__this }; } <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(); } } private Config Config; private IModInterface modInterface; public Player(IModInterface modInterface) { modInterface.Logger.Information("[XENON]: Loading InfiniteJump"); Config = modInterface.ReadConfig<Config>(); this.modInterface = modInterface; } public bool ShouldRun(string path) { return path == "res://Scenes/Entities/Player/player.gdc"; } [IteratorStateMachine(typeof(<Modify>d__4))] public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens) { MultiTokenWaiter propMatch1 = new MultiTokenWaiter(new Func<Token, bool>[7] { (Token t) => (int)t.Type == 38, delegate(Token t) { IdentifierToken val16 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val16 != null && val16.Name == "prop_ids"; }, (Token t) => (int)t.Type == 84, delegate(Token t) { IdentifierToken val15 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val15 != null && val15.Name == "size"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 11 }, false, false); MultiTokenWaiter notificationMatch = new MultiTokenWaiter(new Func<Token, bool>[5] { delegate(Token t) { ConstantToken val13 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val13 != null) { Variant value3 = val13.Value; StringVariant val14 = (StringVariant)(object)((value3 is StringVariant) ? value3 : null); if (val14 != null) { return val14.Value == "invalid prop placement"; } } return false; }, (Token t) => (int)t.Type == 82, delegate(Token t) { ConstantToken val11 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val11 != null) { Variant value2 = val11.Value; IntVariant val12 = (IntVariant)(object)((value2 is IntVariant) ? value2 : null); if (val12 != null) { return val12.Value == 1; } } return false; }, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 89 }, false, false); MultiTokenWaiter notificationMatch2 = new MultiTokenWaiter(new Func<Token, bool>[32] { (Token t) => (int)t.Type == 38, (Token t) => (int)t.Type == 87, delegate(Token t) { IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val10 != null && val10.Name == "detection_zones"; }, (Token t) => (int)t.Type == 19, delegate(Token t) { IdentifierToken val9 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val9 != null && val9.Name == "prop_detect"; }, (Token t) => (int)t.Type == 84, delegate(Token t) { IdentifierToken val8 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val8 != null && val8.Name == "get_overlapping_bodies"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 84, delegate(Token t) { IdentifierToken val7 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val7 != null && val7.Name == "size"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 11, delegate(Token t) { ConstantToken val5 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val5 != null) { Variant value = val5.Value; IntVariant val6 = (IntVariant)(object)((value is IntVariant) ? value : null); if (val6 != null) { return val6.Value == 0; } } return false; }, (Token t) => (int)t.Type == 14, (Token t) => (int)t.Type == 15, delegate(Token t) { IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val4 != null && val4.Name == "is_on_floor"; }, (Token t) => (int)t.Type == 80, (Token t) => (int)t.Type == 81, (Token t) => (int)t.Type == 14, (Token t) => (int)t.Type == 15, (Token t) => (int)t.Type == 87, delegate(Token t) { IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val3 != null && val3.Name == "detection_zones"; }, (Token t) => (int)t.Type == 19, delegate(Token t) { IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val2 != null && val2.Name == "prop_ray"; }, (Token t) => (int)t.Type == 84, delegate(Token t) { IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null); return val != null && val.Name == "is_colliding"; }, (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); TokenConsumer newlineConsumer = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89)); bool modified = false; global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator(); try { while (((global::System.Collections.IEnumerator)enumerator).MoveNext()) { Token token = enumerator.Current; if (!newlineConsumer.Check(token)) { if (newlineConsumer.Ready) { yield return token; newlineConsumer.Reset(); } if (propMatch1.Check(token)) { yield return token; yield return (Token)new ConstantToken((Variant)new IntVariant(4L, false)); yield return new Token((TokenType)13, (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("GAME_MASTER"); yield return new Token((TokenType)86, (uint?)null); modInterface.Logger.Information($"[XENON]: {token}"); propMatch1.Reset(); newlineConsumer.SetReady(); } else if (notificationMatch.Check(token)) { yield return new Token((TokenType)89, (uint?)null); notificationMatch.Reset(); newlineConsumer.SetReady(); modified = true; } else if (notificationMatch2.Check(token) && modified) { yield return (Token)new IdentifierToken("_refresh_props"); yield return new Token((TokenType)80, (uint?)null); yield return new Token((TokenType)81, (uint?)null); notificationMatch.Reset(); newlineConsumer.SetReady(); } else { yield return token; } } } } finally { ((global::System.IDisposable)enumerator)?.Dispose(); } } } } namespace Xenon.Mods.NoBaitOP { public class Player : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__4 : 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 global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; private MultiTokenWaiter <catchStructureMatch2>5__2; private MultiTokenWaiter <catchStructureMatch3>5__3; private TokenConsumer <newlineConsumer>5__4; private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap4; private Token <token>5__6; 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__4(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) <= 14u) { try { } finally { <>m__Finally1(); } } } private bool MoveNext() { //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Expected O, but got Unknown //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Expected O, but got Unknown //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Expected O, but got Unknown //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Expected O, but got Unknown //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Expected O, but got Unknown //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Expected O, but got Unknown //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Expected O, but got Unknown //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Expected O, but got Unknown //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Expected O, but got Unknown //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Expected O, but got Unknown //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Expected O, but got Unknown //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0433: 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 //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Expected O, but got Unknown //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Expected O, but got Unknown //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Expected O, but got Unknown //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Expected O, but got Unknown //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <catchStructureMatch2>5__2 = new MultiTokenWaiter(new Func<Token, bool>[3] { delegate(Token t) { ConstantToken val5 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val5 != null) { Variant value3 = val5.Value; StringVariant val6 = (StringVariant)(object)((value3 is StringVariant) ? value3 : null); if (val6 != null) { return val6.Value == "max_tier"; } } return false; }, (Token t) => (int)t.Type == 86, delegate(Token t) { ConstantToken val3 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val3 != null) { Variant value2 = val3.Value; IntVariant val4 = (IntVariant)(object)((value2 is IntVariant) ? value2 : null); if (val4 != null) { return val4.Value == 0; } } return false; } }, false, false); <catchStructureMatch3>5__3 = new MultiTokenWaiter(new Func<Token, bool>[4] { delegate(Token t) { ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val != null) { Variant value = val.Value; StringVariant val2 = (StringVariant)(object)((value is StringVariant) ? value : null); if (val2 != null) { return val2.Value == "quality"; } } return false; }, (Token t) => (int)t.Type == 86, (Token t) => (int)t.Type == 76, (Token t) => (int)t.Type == 77 }, false, false); <newlineConsumer>5__4 = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89)); <>7__wrap4 = tokens.GetEnumerator(); <>1__state = -3; goto IL_04d9; case 1: <>1__state = -3; <newlineConsumer>5__4.Reset(); goto IL_0218; case 2: <>1__state = -3; <catchStructureMatch2>5__2.Reset(); goto IL_04d2; case 3: <>1__state = -3; <>2__current = new Token((TokenType)82, (uint?)null); <>1__state = 4; return true; case 4: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.01, false)); <>1__state = 5; return true; case 5: <>1__state = -3; <>2__current = new Token((TokenType)82, (uint?)null); <>1__state = 6; return true; case 6: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.01, false)); <>1__state = 7; return true; case 7: <>1__state = -3; <>2__current = new Token((TokenType)82, (uint?)null); <>1__state = 8; return true; case 8: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.01, false)); <>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 RealVariant(0.01, false)); <>1__state = 11; return true; case 11: <>1__state = -3; <>2__current = new Token((TokenType)82, (uint?)null); <>1__state = 12; return true; case 12: <>1__state = -3; <>2__current = (Token)new ConstantToken((Variant)new RealVariant(1.0, false)); <>1__state = 13; return true; case 13: <>1__state = -3; <>2__current = new Token((TokenType)77, (uint?)null); <>1__state = 14; return true; case 14: <>1__state = -3; <catchStructureMatch3>5__3.Reset(); goto IL_04d2; case 15: { <>1__state = -3; goto IL_04d2; } IL_04d2: <token>5__6 = null; goto IL_04d9; IL_04d9: do { if (((global::System.Collections.IEnumerator)<>7__wrap4).MoveNext()) { <token>5__6 = <>7__wrap4.Current; continue; } <>m__Finally1(); <>7__wrap4 = null; return false; } while (<newlineConsumer>5__4.Check(<token>5__6)); if (<newlineConsumer>5__4.Ready) { <>2__current = <token>5__6; <>1__state = 1; return true; } goto IL_0218; IL_0218: if (<catchStructureMatch2>5__2.Check(<token>5__6)) { <>2__current = (Token)new ConstantToken((Variant)new IntVariant(4L, false)); <>1__state = 2; return true; } if (<catchStructureMatch3>5__3.Check(<token>5__6)) { <>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.01, false)); <>1__state = 3; return true; } <>2__current = <token>5__6; <>1__state = 15; return true; } } 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 (<>7__wrap4 != null) { ((global::System.IDisposable)<>7__wrap4).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__4 <Modify>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Modify>d__ = this; } else { <Modify>d__ = new <Modify>d__4(0); } <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(); } } private Config Config; private IModInterface modInterface; public Player(IModInterface modInterface) { modInterface.Logger.Information("[XENON]: Loading NoBaitOP"); Config = modInterface.ReadConfig<Config>(); this.modInterface = modInterface; } public bool ShouldRun(string path) { return path == "res://Scenes/Entities/Player/player.gdc"; } [IteratorStateMachine(typeof(<Modify>d__4))] public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens) { MultiTokenWaiter catchStructureMatch2 = new MultiTokenWaiter(new Func<Token, bool>[3] { delegate(Token t) { ConstantToken val5 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val5 != null) { Variant value3 = val5.Value; StringVariant val6 = (StringVariant)(object)((value3 is StringVariant) ? value3 : null); if (val6 != null) { return val6.Value == "max_tier"; } } return false; }, (Token t) => (int)t.Type == 86, delegate(Token t) { ConstantToken val3 = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val3 != null) { Variant value2 = val3.Value; IntVariant val4 = (IntVariant)(object)((value2 is IntVariant) ? value2 : null); if (val4 != null) { return val4.Value == 0; } } return false; } }, false, false); MultiTokenWaiter catchStructureMatch3 = new MultiTokenWaiter(new Func<Token, bool>[4] { delegate(Token t) { ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null); if (val != null) { Variant value = val.Value; StringVariant val2 = (StringVariant)(object)((value is StringVariant) ? value : null); if (val2 != null) { return val2.Value == "quality"; } } return false; }, (Token t) => (int)t.Type == 86, (Token t) => (int)t.Type == 76, (Token t) => (int)t.Type == 77 }, false, false); TokenConsumer newlineConsumer = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89)); global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator(); try { while (((global::System.Collections.IEnumerator)enumerator).MoveNext()) { Token token = enumerator.Current; if (!newlineConsumer.Check(token)) { if (newlineConsumer.Ready) { yield return token; newlineConsumer.Reset(); } if (catchStructureMatch2.Check(token)) { yield return (Token)new ConstantToken((Variant)new IntVariant(4L, false)); catchStructureMatch2.Reset(); } else if (catchStructureMatch3.Check(token)) { yield return (Token)new ConstantToken((Variant)new RealVariant(0.01, false)); yield return new Token((TokenType)82, (uint?)null); yield return (Token)new ConstantToken((Variant)new RealVariant(0.01, false)); yield return new Token((TokenType)82, (uint?)null); yield return (Token)new ConstantToken((Variant)new RealVariant(0.01, false)); yield return new Token((TokenType)82, (uint?)null); yield return (Token)new ConstantToken((Variant)new RealVariant(0.01, false)); yield return new Token((TokenType)82, (uint?)null); yield return (Token)new ConstantToken((Variant)new RealVariant(0.01, false)); yield return new Token((TokenType)82, (uint?)null); yield return (Token)new ConstantToken((Variant)new RealVariant(1.0, false)); yield return new Token((TokenType)77, (uint?)null); catchStructureMatch3.Reset(); } else { yield return token; } } } } finally { ((global::System.IDisposable)enumerator)?.Dispose(); } } } } namespace Xenon.Mods.InstantCatch { public class Player : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__5 : 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 global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; public Player <>4__this; private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap1; 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__5(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 || num == 1) { try { } finally { <>m__Finally1(); } } } private bool MoveNext() { //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown try { int num = <>1__state; Player player = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>7__wrap1 = tokens.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; break; } if (((global::System.Collections.IEnumerator)<>7__wrap1).MoveNext()) { Token current = <>7__wrap1.Current; if (player.modificationCount < 6) { ConstantToken val = (ConstantToken)(object)((current is ConstantToken) ? current : null); if (val != null) { Variant value = val.Value; RealVariant val2 = (RealVariant)(object)((value is RealVariant) ? value : null); if (val2 != null && val2.Value == 0.06) { player.modInterface.Logger.Information($"[XENON]: Instant catch go my scarab (TOKEN): {current}"); val.Value = (Variant)new RealVariant(1.0, false); player.modificationCount++; } } } <>2__current = current; <>1__state = 1; return true; } <>m__Finally1(); <>7__wrap1 = 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 (<>7__wrap1 != null) { ((global::System.IDisposable)<>7__wrap1).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__5 <Modify>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Modify>d__ = this; } else { <Modify>d__ = new <Modify>d__5(0) { <>4__this = <>4__this }; } <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(); } } private Config Config; private IModInterface modInterface; private int modificationCount; public Player(IModInterface modInterface) { modInterface.Logger.Information("[XENON]: Loading InstantCatch"); Config = modInterface.ReadConfig<Config>(); this.modInterface = modInterface; } public bool ShouldRun(string path) { return path == "res://Scenes/Entities/Player/player.gdc"; } [IteratorStateMachine(typeof(<Modify>d__5))] public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens) { global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator(); try { while (((global::System.Collections.IEnumerator)enumerator).MoveNext()) { Token current = enumerator.Current; if (modificationCount < 6) { ConstantToken val = (ConstantToken)(object)((current is ConstantToken) ? current : null); if (val != null) { Variant value = val.Value; RealVariant val2 = (RealVariant)(object)((value is RealVariant) ? value : null); if (val2 != null && val2.Value == 0.06) { modInterface.Logger.Information($"[XENON]: Instant catch go my scarab (TOKEN): {current}"); val.Value = (Variant)new RealVariant(1.0, false); modificationCount++; } } } yield return current; } } finally { ((global::System.IDisposable)enumerator)?.Dispose(); } } } } namespace Xenon.Mods.CooldownMod { public class AbilityResource : IScriptMod { [CompilerGenerated] private sealed class <Modify>d__4 : 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 global::System.Collections.Generic.IEnumerable<Token> tokens; public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens; public AbilityResource <>4__this; private MultiTokenWaiter <itemCooldownMatch>5__2; private TokenConsumer <newlineConsumer>5__3; private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap3; 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__4(int <>1__state) { this.<>1__state = <>1__sta