Decompiled source of QuickGamble v1.2.0

GDWeave/mods/QuickGamble/QuickGamble.dll

Decompiled 2 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using GDWeave;
using GDWeave.Godot;
using GDWeave.Godot.Variants;
using GDWeave.Modding;

[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("QuickGamble")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+60be6dc9f57cb647d62e3c573ef41f95229ffd10")]
[assembly: AssemblyProduct("QuickGamble")]
[assembly: AssemblyTitle("QuickGamble")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace QuickGamble;

public class Config
{
}
public class Mod : IMod, global::System.IDisposable
{
	public Config Config;

	public Mod(IModInterface modInterface)
	{
		Config = modInterface.ReadConfig<Config>();
		modInterface.Logger.Information("QuickGamble has loaded!");
		modInterface.RegisterScriptMod((IScriptMod)(object)new QuickGamble());
	}

	public void Dispose()
	{
	}
}
public class QuickGamble : 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 QuickGamble <>4__this;

		private MultiTokenWaiter <spawnFishMatch>5__1;

		private MultiTokenWaiter <timeout>5__2;

		private global::System.Collections.Generic.IEnumerator<Token> <>s__3;

		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__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) > 46u)
			{
				return;
			}
			try
			{
			}
			finally
			{
				<>m__Finally1();
			}
		}

		private bool MoveNext()
		{
			//IL_055e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0568: Expected O, but got Unknown
			//IL_058a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0594: Expected O, but got Unknown
			//IL_05b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ba: Expected O, but got Unknown
			//IL_05db: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e5: Expected O, but got Unknown
			//IL_0601: Unknown result type (might be due to invalid IL or missing references)
			//IL_060b: Expected O, but got Unknown
			//IL_062d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0637: Expected O, but got Unknown
			//IL_0659: Unknown result type (might be due to invalid IL or missing references)
			//IL_0663: Expected O, but got Unknown
			//IL_0685: Unknown result type (might be due to invalid IL or missing references)
			//IL_068f: Expected O, but got Unknown
			//IL_06ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b6: Expected O, but got Unknown
			//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e3: Expected O, but got Unknown
			//IL_0700: Unknown result type (might be due to invalid IL or missing references)
			//IL_070a: Expected O, but got Unknown
			//IL_0705: Unknown result type (might be due to invalid IL or missing references)
			//IL_070f: Expected O, but got Unknown
			//IL_0732: Unknown result type (might be due to invalid IL or missing references)
			//IL_073c: 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_0789: Unknown result type (might be due to invalid IL or missing references)
			//IL_0793: Expected O, but got Unknown
			//IL_07b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ba: Expected O, but got Unknown
			//IL_07dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e7: Expected O, but got Unknown
			//IL_0804: Unknown result type (might be due to invalid IL or missing references)
			//IL_080e: Expected O, but got Unknown
			//IL_0831: Unknown result type (might be due to invalid IL or missing references)
			//IL_083b: Expected O, but got Unknown
			//IL_0858: Unknown result type (might be due to invalid IL or missing references)
			//IL_0862: Expected O, but got Unknown
			//IL_085d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0867: Expected O, but got Unknown
			//IL_088a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0894: Expected O, but got Unknown
			//IL_08b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c1: Expected O, but got Unknown
			//IL_0925: Unknown result type (might be due to invalid IL or missing references)
			//IL_092f: Expected O, but got Unknown
			//IL_094f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0959: Expected O, but got Unknown
			//IL_0979: Unknown result type (might be due to invalid IL or missing references)
			//IL_0983: Expected O, but got Unknown
			//IL_09a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b0: Expected O, but got Unknown
			//IL_09d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09dd: Expected O, but got Unknown
			//IL_09fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a04: Expected O, but got Unknown
			//IL_0a27: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a31: Expected O, but got Unknown
			//IL_0a54: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a5e: Expected O, but got Unknown
			//IL_0a81: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a8b: Expected O, but got Unknown
			//IL_0aa8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab2: Expected O, but got Unknown
			//IL_0ad5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0adf: Expected O, but got Unknown
			//IL_0b01: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b0b: Expected O, but got Unknown
			//IL_0b06: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b10: Expected O, but got Unknown
			//IL_0b33: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b3d: Expected O, but got Unknown
			//IL_0b60: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b6a: Expected O, but got Unknown
			//IL_0b87: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b91: Expected O, but got Unknown
			//IL_0b8c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b96: Expected O, but got Unknown
			//IL_0bb9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bc3: Expected O, but got Unknown
			//IL_0be3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bed: Expected O, but got Unknown
			//IL_0c0a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c14: Expected O, but got Unknown
			//IL_0c37: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c41: Expected O, but got Unknown
			//IL_0c5e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c68: Expected O, but got Unknown
			//IL_0c8b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c95: Expected O, but got Unknown
			//IL_0cb5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbf: Expected O, but got Unknown
			//IL_0cdf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce9: Expected O, but got Unknown
			//IL_030d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0317: Expected O, but got Unknown
			//IL_04df: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e9: Expected O, but got Unknown
			try
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<spawnFishMatch>5__1 = new MultiTokenWaiter(new Func<Token, bool>[9]
					{
						(Token t) => (int)t.Type == 87,
						delegate(Token t)
						{
							//IL_000b: Unknown result type (might be due to invalid IL or missing references)
							//IL_0011: Invalid comparison between Unknown and I4
							IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							int result7;
							if (val10 != null && (int)t.Type == 1)
							{
								uint? associatedData7 = t.AssociatedData;
								if (associatedData7.HasValue && associatedData7.GetValueOrDefault() == 41)
								{
									result7 = ((val10.Name == "AnimationPlayer") ? 1 : 0);
									goto IL_0041;
								}
							}
							result7 = 0;
							goto IL_0041;
							IL_0041:
							return (byte)result7 != 0;
						},
						(Token t) => (int)t.Type == 84,
						delegate(Token t)
						{
							//IL_000b: Unknown result type (might be due to invalid IL or missing references)
							//IL_0011: Invalid comparison between Unknown and I4
							IdentifierToken val9 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							int result6;
							if (val9 != null && (int)t.Type == 1)
							{
								uint? associatedData6 = t.AssociatedData;
								if (associatedData6.HasValue && associatedData6.GetValueOrDefault() == 42)
								{
									result6 = ((val9.Name == "play") ? 1 : 0);
									goto IL_0041;
								}
							}
							result6 = 0;
							goto IL_0041;
							IL_0041:
							return (byte)result6 != 0;
						},
						(Token t) => (int)t.Type == 80,
						delegate(Token t)
						{
							//IL_000b: Unknown result type (might be due to invalid IL or missing references)
							//IL_0011: Invalid comparison between Unknown and I4
							ConstantToken val7 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
							int result5;
							if (val7 != null && (int)t.Type == 2)
							{
								uint? associatedData5 = t.AssociatedData;
								if (associatedData5.HasValue && associatedData5.GetValueOrDefault() == 16)
								{
									Variant value3 = val7.Value;
									StringVariant val8 = (StringVariant)(object)((value3 is StringVariant) ? value3 : null);
									if (val8 != null)
									{
										result5 = ((val8.Value == "intro") ? 1 : 0);
										goto IL_0050;
									}
								}
							}
							result5 = 0;
							goto IL_0050;
							IL_0050:
							return (byte)result5 != 0;
						},
						(Token t) => (int)t.Type == 81,
						(Token t) => (int)t.Type == 89,
						(Token t) => (int)t.Type == 89
					}, false, false);
					<timeout>5__2 = new MultiTokenWaiter(new Func<Token, bool>[13]
					{
						(Token t) => (int)t.Type == 65,
						(Token t) => (int)t.Type == 80,
						delegate(Token t)
						{
							//IL_000b: Unknown result type (might be due to invalid IL or missing references)
							//IL_0011: Invalid comparison between Unknown and I4
							IdentifierToken val6 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							int result4;
							if (val6 != null && (int)t.Type == 1)
							{
								uint? associatedData4 = t.AssociatedData;
								if (associatedData4.HasValue && associatedData4.GetValueOrDefault() == 38)
								{
									result4 = ((val6.Name == "get_tree") ? 1 : 0);
									goto IL_0041;
								}
							}
							result4 = 0;
							goto IL_0041;
							IL_0041:
							return (byte)result4 != 0;
						},
						(Token t) => (int)t.Type == 80,
						(Token t) => (int)t.Type == 81,
						(Token t) => (int)t.Type == 84,
						delegate(Token t)
						{
							//IL_000b: Unknown result type (might be due to invalid IL or missing references)
							//IL_0011: Invalid comparison between Unknown and I4
							IdentifierToken val5 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							int result3;
							if (val5 != null && (int)t.Type == 1)
							{
								uint? associatedData3 = t.AssociatedData;
								if (associatedData3.HasValue && associatedData3.GetValueOrDefault() == 71)
								{
									result3 = ((val5.Name == "create_timer") ? 1 : 0);
									goto IL_0041;
								}
							}
							result3 = 0;
							goto IL_0041;
							IL_0041:
							return (byte)result3 != 0;
						},
						(Token t) => (int)t.Type == 80,
						delegate(Token t)
						{
							//IL_000b: Unknown result type (might be due to invalid IL or missing references)
							//IL_0011: Invalid comparison between Unknown and I4
							ConstantToken val3 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
							int result2;
							if (val3 != null && (int)t.Type == 2)
							{
								uint? associatedData2 = t.AssociatedData;
								if (associatedData2.HasValue && associatedData2.GetValueOrDefault() == 26)
								{
									Variant value2 = val3.Value;
									RealVariant val4 = (RealVariant)(object)((value2 is RealVariant) ? value2 : null);
									if (val4 != null)
									{
										result2 = ((val4.Value == 0.4) ? 1 : 0);
										goto IL_0051;
									}
								}
							}
							result2 = 0;
							goto IL_0051;
							IL_0051:
							return (byte)result2 != 0;
						},
						(Token t) => (int)t.Type == 81,
						(Token t) => (int)t.Type == 82,
						delegate(Token t)
						{
							//IL_000b: Unknown result type (might be due to invalid IL or missing references)
							//IL_0011: Invalid comparison between Unknown and I4
							ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null);
							int result;
							if (val != null && (int)t.Type == 2)
							{
								uint? associatedData = t.AssociatedData;
								if (associatedData.HasValue && associatedData.GetValueOrDefault() == 27)
								{
									Variant value = val.Value;
									StringVariant val2 = (StringVariant)(object)((value is StringVariant) ? value : null);
									if (val2 != null)
									{
										result = ((val2.Value == "timeout") ? 1 : 0);
										goto IL_0050;
									}
								}
							}
							result = 0;
							goto IL_0050;
							IL_0050:
							return (byte)result != 0;
						},
						(Token t) => (int)t.Type == 81
					}, false, false);
					<>s__3 = 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)41, (uint?)null);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("scratch");
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -3;
					<>2__current = new Token((TokenType)6, (uint?)null);
					<>1__state = 5;
					return true;
				case 5:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("get_tree");
					<>1__state = 6;
					return true;
				case 6:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 7;
					return true;
				case 7:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 8;
					return true;
				case 8:
					<>1__state = -3;
					<>2__current = new Token((TokenType)84, (uint?)null);
					<>1__state = 9;
					return true;
				case 9:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("get_nodes_in_group");
					<>1__state = 10;
					return true;
				case 10:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 11;
					return true;
				case 11:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new StringVariant("scratch_spot"));
					<>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;
					<>2__current = new Token((TokenType)86, (uint?)null);
					<>1__state = 14;
					return true;
				case 14:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)2u);
					<>1__state = 15;
					return true;
				case 15:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("scratch");
					<>1__state = 16;
					return true;
				case 16:
					<>1__state = -3;
					<>2__current = new Token((TokenType)84, (uint?)null);
					<>1__state = 17;
					return true;
				case 17:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("emit_signal");
					<>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("_scratched"));
					<>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)89, (uint?)null);
					<>1__state = 22;
					return true;
				case 22:
					<>1__state = -3;
					goto IL_0d22;
				case 23:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)2u);
					<>1__state = 24;
					return true;
				case 24:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)1u);
					<>1__state = 25;
					return true;
				case 25:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)2u);
					<>1__state = 26;
					return true;
				case 26:
					<>1__state = -3;
					<>2__current = new Token((TokenType)65, (uint?)null);
					<>1__state = 27;
					return true;
				case 27:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 28;
					return true;
				case 28:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("get_tree");
					<>1__state = 29;
					return true;
				case 29:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 30;
					return true;
				case 30:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 31;
					return true;
				case 31:
					<>1__state = -3;
					<>2__current = new Token((TokenType)84, (uint?)null);
					<>1__state = 32;
					return true;
				case 32:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("create_timer");
					<>1__state = 33;
					return true;
				case 33:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 34;
					return true;
				case 34:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
					<>1__state = 35;
					return true;
				case 35:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 36;
					return true;
				case 36:
					<>1__state = -3;
					<>2__current = new Token((TokenType)82, (uint?)null);
					<>1__state = 37;
					return true;
				case 37:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new StringVariant("timeout"));
					<>1__state = 38;
					return true;
				case 38:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 39;
					return true;
				case 39:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)2u);
					<>1__state = 40;
					return true;
				case 40:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("_end");
					<>1__state = 41;
					return true;
				case 41:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 42;
					return true;
				case 42:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("won");
					<>1__state = 43;
					return true;
				case 43:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 44;
					return true;
				case 44:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)2u);
					<>1__state = 45;
					return true;
				case 45:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)2u);
					<>1__state = 46;
					return true;
				case 46:
					<>1__state = -3;
					goto IL_0d22;
				case 47:
					{
						<>1__state = -3;
						goto IL_0d22;
					}
					IL_0d22:
					<token>5__4 = null;
					break;
				}
				if (((global::System.Collections.IEnumerator)<>s__3).MoveNext())
				{
					<token>5__4 = <>s__3.Current;
					if (<spawnFishMatch>5__1.Check(<token>5__4))
					{
						<>2__current = <token>5__4;
						<>1__state = 1;
						return true;
					}
					if (<timeout>5__2.Check(<token>5__4))
					{
						<>2__current = <token>5__4;
						<>1__state = 23;
						return true;
					}
					<>2__current = <token>5__4;
					<>1__state = 47;
					return true;
				}
				<>m__Finally1();
				<>s__3 = 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__3 != null)
			{
				((global::System.IDisposable)<>s__3).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/Minigames/ScratchTicket/scratch_ticket.gdc";
	}

	[IteratorStateMachine(typeof(<Modify>d__1))]
	public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
	{
		MultiTokenWaiter spawnFishMatch = new MultiTokenWaiter(new Func<Token, bool>[9]
		{
			(Token t) => (int)t.Type == 87,
			delegate(Token t)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Invalid comparison between Unknown and I4
				IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
				int result7;
				if (val10 != null && (int)t.Type == 1)
				{
					uint? associatedData7 = t.AssociatedData;
					if (associatedData7.HasValue && associatedData7.GetValueOrDefault() == 41)
					{
						result7 = ((val10.Name == "AnimationPlayer") ? 1 : 0);
						goto IL_0041;
					}
				}
				result7 = 0;
				goto IL_0041;
				IL_0041:
				return (byte)result7 != 0;
			},
			(Token t) => (int)t.Type == 84,
			delegate(Token t)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Invalid comparison between Unknown and I4
				IdentifierToken val9 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
				int result6;
				if (val9 != null && (int)t.Type == 1)
				{
					uint? associatedData6 = t.AssociatedData;
					if (associatedData6.HasValue && associatedData6.GetValueOrDefault() == 42)
					{
						result6 = ((val9.Name == "play") ? 1 : 0);
						goto IL_0041;
					}
				}
				result6 = 0;
				goto IL_0041;
				IL_0041:
				return (byte)result6 != 0;
			},
			(Token t) => (int)t.Type == 80,
			delegate(Token t)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Invalid comparison between Unknown and I4
				ConstantToken val7 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
				int result5;
				if (val7 != null && (int)t.Type == 2)
				{
					uint? associatedData5 = t.AssociatedData;
					if (associatedData5.HasValue && associatedData5.GetValueOrDefault() == 16)
					{
						Variant value3 = val7.Value;
						StringVariant val8 = (StringVariant)(object)((value3 is StringVariant) ? value3 : null);
						if (val8 != null)
						{
							result5 = ((val8.Value == "intro") ? 1 : 0);
							goto IL_0050;
						}
					}
				}
				result5 = 0;
				goto IL_0050;
				IL_0050:
				return (byte)result5 != 0;
			},
			(Token t) => (int)t.Type == 81,
			(Token t) => (int)t.Type == 89,
			(Token t) => (int)t.Type == 89
		}, false, false);
		MultiTokenWaiter timeout = new MultiTokenWaiter(new Func<Token, bool>[13]
		{
			(Token t) => (int)t.Type == 65,
			(Token t) => (int)t.Type == 80,
			delegate(Token t)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Invalid comparison between Unknown and I4
				IdentifierToken val6 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
				int result4;
				if (val6 != null && (int)t.Type == 1)
				{
					uint? associatedData4 = t.AssociatedData;
					if (associatedData4.HasValue && associatedData4.GetValueOrDefault() == 38)
					{
						result4 = ((val6.Name == "get_tree") ? 1 : 0);
						goto IL_0041;
					}
				}
				result4 = 0;
				goto IL_0041;
				IL_0041:
				return (byte)result4 != 0;
			},
			(Token t) => (int)t.Type == 80,
			(Token t) => (int)t.Type == 81,
			(Token t) => (int)t.Type == 84,
			delegate(Token t)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Invalid comparison between Unknown and I4
				IdentifierToken val5 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
				int result3;
				if (val5 != null && (int)t.Type == 1)
				{
					uint? associatedData3 = t.AssociatedData;
					if (associatedData3.HasValue && associatedData3.GetValueOrDefault() == 71)
					{
						result3 = ((val5.Name == "create_timer") ? 1 : 0);
						goto IL_0041;
					}
				}
				result3 = 0;
				goto IL_0041;
				IL_0041:
				return (byte)result3 != 0;
			},
			(Token t) => (int)t.Type == 80,
			delegate(Token t)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Invalid comparison between Unknown and I4
				ConstantToken val3 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
				int result2;
				if (val3 != null && (int)t.Type == 2)
				{
					uint? associatedData2 = t.AssociatedData;
					if (associatedData2.HasValue && associatedData2.GetValueOrDefault() == 26)
					{
						Variant value2 = val3.Value;
						RealVariant val4 = (RealVariant)(object)((value2 is RealVariant) ? value2 : null);
						if (val4 != null)
						{
							result2 = ((val4.Value == 0.4) ? 1 : 0);
							goto IL_0051;
						}
					}
				}
				result2 = 0;
				goto IL_0051;
				IL_0051:
				return (byte)result2 != 0;
			},
			(Token t) => (int)t.Type == 81,
			(Token t) => (int)t.Type == 82,
			delegate(Token t)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Invalid comparison between Unknown and I4
				ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null);
				int result;
				if (val != null && (int)t.Type == 2)
				{
					uint? associatedData = t.AssociatedData;
					if (associatedData.HasValue && associatedData.GetValueOrDefault() == 27)
					{
						Variant value = val.Value;
						StringVariant val2 = (StringVariant)(object)((value is StringVariant) ? value : null);
						if (val2 != null)
						{
							result = ((val2.Value == "timeout") ? 1 : 0);
							goto IL_0050;
						}
					}
				}
				result = 0;
				goto IL_0050;
				IL_0050:
				return (byte)result != 0;
			},
			(Token t) => (int)t.Type == 81
		}, false, false);
		global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator();
		try
		{
			while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
			{
				Token token = enumerator.Current;
				if (spawnFishMatch.Check(token))
				{
					yield return token;
					yield return new Token((TokenType)89, (uint?)1u);
					yield return new Token((TokenType)41, (uint?)null);
					yield return (Token)new IdentifierToken("scratch");
					yield return new Token((TokenType)6, (uint?)null);
					yield return (Token)new IdentifierToken("get_tree");
					yield return new Token((TokenType)80, (uint?)null);
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)84, (uint?)null);
					yield return (Token)new IdentifierToken("get_nodes_in_group");
					yield return new Token((TokenType)80, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new StringVariant("scratch_spot"));
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)86, (uint?)null);
					yield return new Token((TokenType)89, (uint?)2u);
					yield return (Token)new IdentifierToken("scratch");
					yield return new Token((TokenType)84, (uint?)null);
					yield return (Token)new IdentifierToken("emit_signal");
					yield return new Token((TokenType)80, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new StringVariant("_scratched"));
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)89, (uint?)null);
				}
				else if (timeout.Check(token))
				{
					yield return token;
					yield return new Token((TokenType)89, (uint?)2u);
					yield return new Token((TokenType)89, (uint?)1u);
					yield return new Token((TokenType)89, (uint?)2u);
					yield return new Token((TokenType)65, (uint?)null);
					yield return new Token((TokenType)80, (uint?)null);
					yield return (Token)new IdentifierToken("get_tree");
					yield return new Token((TokenType)80, (uint?)null);
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)84, (uint?)null);
					yield return (Token)new IdentifierToken("create_timer");
					yield return new Token((TokenType)80, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)82, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new StringVariant("timeout"));
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)89, (uint?)2u);
					yield return (Token)new IdentifierToken("_end");
					yield return new Token((TokenType)80, (uint?)null);
					yield return (Token)new IdentifierToken("won");
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)89, (uint?)2u);
					yield return new Token((TokenType)89, (uint?)2u);
				}
				else
				{
					yield return token;
				}
			}
		}
		finally
		{
			((global::System.IDisposable)enumerator)?.Dispose();
		}
	}
}