Decompiled source of thetambourine v1.2.0

GDWeave/mods/officerballs.thetambourine/worldpatch.dll

Decompiled 10 hours 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 System.Text.Json.Serialization;
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("worldpatch")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")]
[assembly: AssemblyProduct("worldpatch")]
[assembly: AssemblyTitle("worldpatch")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace BallsWorldPatch;

public class Config
{
	[JsonInclude]
	public bool SomeSetting = true;
}
public class Mod : IMod, global::System.IDisposable
{
	public Config Config;

	public Mod(IModInterface modInterface)
	{
		Config = modInterface.ReadConfig<Config>();
		modInterface.RegisterScriptMod((IScriptMod)(object)new WorldInstanceMod());
		modInterface.RegisterScriptMod((IScriptMod)(object)new ActorWipePatch());
		modInterface.RegisterScriptMod((IScriptMod)(object)new RipplePatch());
		modInterface.Logger.Information("Hello, world!");
	}

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

		private MultiTokenWaiter <funcstop>5__1;

		private MultiTokenWaiter <wipeadd>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) > 69u)
			{
				return;
			}
			try
			{
			}
			finally
			{
				<>m__Finally1();
			}
		}

		private bool MoveNext()
		{
			//IL_048f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0499: Expected O, but got Unknown
			//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c5: 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_050d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0517: Expected O, but got Unknown
			//IL_0533: Unknown result type (might be due to invalid IL or missing references)
			//IL_053d: Expected O, but got Unknown
			//IL_055e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0568: Expected O, but got Unknown
			//IL_0584: Unknown result type (might be due to invalid IL or missing references)
			//IL_058e: Expected O, but got Unknown
			//IL_0589: Unknown result type (might be due to invalid IL or missing references)
			//IL_0593: Expected O, but got Unknown
			//IL_05b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bf: Expected O, but got Unknown
			//IL_05dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e6: Expected O, but got Unknown
			//IL_0609: Unknown result type (might be due to invalid IL or missing references)
			//IL_0613: Expected O, but got Unknown
			//IL_0630: Unknown result type (might be due to invalid IL or missing references)
			//IL_063a: Expected O, but got Unknown
			//IL_065c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0666: Expected O, but got Unknown
			//IL_0683: Unknown result type (might be due to invalid IL or missing references)
			//IL_068d: Expected O, but got Unknown
			//IL_0688: Unknown result type (might be due to invalid IL or missing references)
			//IL_0692: Expected O, but got Unknown
			//IL_06b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bf: Expected O, but got Unknown
			//IL_06dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e6: Expected O, but got Unknown
			//IL_0709: Unknown result type (might be due to invalid IL or missing references)
			//IL_0713: Expected O, but got Unknown
			//IL_0730: Unknown result type (might be due to invalid IL or missing references)
			//IL_073a: Expected O, but got Unknown
			//IL_075d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0767: Expected O, but got Unknown
			//IL_0780: Unknown result type (might be due to invalid IL or missing references)
			//IL_078a: Expected O, but got Unknown
			//IL_0785: Unknown result type (might be due to invalid IL or missing references)
			//IL_078f: Expected O, but got Unknown
			//IL_07b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bc: Expected O, but got Unknown
			//IL_07dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e6: Expected O, but got Unknown
			//IL_0809: Unknown result type (might be due to invalid IL or missing references)
			//IL_0813: Expected O, but got Unknown
			//IL_0836: Unknown result type (might be due to invalid IL or missing references)
			//IL_0840: Expected O, but got Unknown
			//IL_0863: Unknown result type (might be due to invalid IL or missing references)
			//IL_086d: Expected O, but got Unknown
			//IL_088d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0897: Expected O, but got Unknown
			//IL_08fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0908: Expected O, but got Unknown
			//IL_092b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0935: Expected O, but got Unknown
			//IL_0952: Unknown result type (might be due to invalid IL or missing references)
			//IL_095c: Expected O, but got Unknown
			//IL_097f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0989: 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_0a4a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a54: Expected O, but got Unknown
			//IL_0a4f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a59: Expected O, but got Unknown
			//IL_0a7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a86: Expected O, but got Unknown
			//IL_0aa9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab3: Expected O, but got Unknown
			//IL_0ad3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0add: Expected O, but got Unknown
			//IL_0b00: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b0a: Expected O, but got Unknown
			//IL_0b2d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b37: Expected O, but got Unknown
			//IL_0b54: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5e: Expected O, but got Unknown
			//IL_0b81: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b8b: Expected O, but got Unknown
			//IL_0bae: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb8: Expected O, but got Unknown
			//IL_0bd8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0be2: Expected O, but got Unknown
			//IL_0c05: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c0f: Expected O, but got Unknown
			//IL_0c2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c36: Expected O, but got Unknown
			//IL_0c59: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c63: Expected O, but got Unknown
			//IL_0c80: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c8a: Expected O, but got Unknown
			//IL_0cad: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cb7: Expected O, but got Unknown
			//IL_0cd4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cde: Expected O, but got Unknown
			//IL_0d01: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d0b: Expected O, but got Unknown
			//IL_0d28: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d32: Expected O, but got Unknown
			//IL_0d55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d5f: Expected O, but got Unknown
			//IL_0d7f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d89: Expected O, but got Unknown
			//IL_0dac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0db6: Expected O, but got Unknown
			//IL_0dd6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0de0: Expected O, but got Unknown
			//IL_0e03: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e0d: Expected O, but got Unknown
			//IL_0e2a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e34: Expected O, but got Unknown
			//IL_0e57: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e61: Expected O, but got Unknown
			//IL_0e84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e8e: Expected O, but got Unknown
			//IL_0eae: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eb8: Expected O, but got Unknown
			//IL_0ed5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0edf: Expected O, but got Unknown
			//IL_0f02: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f0c: Expected O, but got Unknown
			//IL_0f29: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f33: Expected O, but got Unknown
			//IL_0f56: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f60: Expected O, but got Unknown
			//IL_0f79: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f83: Expected O, but got Unknown
			//IL_0f7e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f88: Expected O, but got Unknown
			//IL_0fab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fb5: Expected O, but got Unknown
			//IL_0fd8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fe2: Expected O, but got Unknown
			//IL_0331: Unknown result type (might be due to invalid IL or missing references)
			//IL_033b: Expected O, but got Unknown
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_041a: Expected O, but got Unknown
			try
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<funcstop>5__1 = new MultiTokenWaiter(new Func<Token, bool>[4]
					{
						delegate(Token t)
						{
							IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							return val4 != null && val4.Name == "_get_actor_by_id";
						},
						(Token t) => (int)t.Type == 80,
						delegate(Token t)
						{
							IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							return val3 != null && val3.Name == "id";
						},
						(Token t) => (int)t.Type == 81
					}, false, false);
					<wipeadd>5__2 = new MultiTokenWaiter(new Func<Token, bool>[6]
					{
						delegate(Token t)
						{
							IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							return val2 != null && val2.Name == "FALLBACK_ITEM";
						},
						(Token t) => (int)t.Type == 84,
						delegate(Token t)
						{
							IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							return val != null && val.Name == "duplicate";
						},
						(Token t) => (int)t.Type == 80,
						(Token t) => (int)t.Type == 81,
						(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)38, (uint?)null);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("actor");
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -3;
					<>2__current = new Token((TokenType)84, (uint?)null);
					<>1__state = 5;
					return true;
				case 5:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("actor_type");
					<>1__state = 6;
					return true;
				case 6:
					<>1__state = -3;
					<>2__current = new Token((TokenType)8, (uint?)null);
					<>1__state = 7;
					return true;
				case 7:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new StringVariant("fish_spawn"));
					<>1__state = 8;
					return true;
				case 8:
					<>1__state = -3;
					<>2__current = new Token((TokenType)13, (uint?)null);
					<>1__state = 9;
					return true;
				case 9:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("actor");
					<>1__state = 10;
					return true;
				case 10:
					<>1__state = -3;
					<>2__current = new Token((TokenType)84, (uint?)null);
					<>1__state = 11;
					return true;
				case 11:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("actor_type");
					<>1__state = 12;
					return true;
				case 12:
					<>1__state = -3;
					<>2__current = new Token((TokenType)8, (uint?)null);
					<>1__state = 13;
					return true;
				case 13:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new StringVariant("fish_spawn_alien"));
					<>1__state = 14;
					return true;
				case 14:
					<>1__state = -3;
					<>2__current = new Token((TokenType)86, (uint?)null);
					<>1__state = 15;
					return true;
				case 15:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("_wipe_alt");
					<>1__state = 16;
					return true;
				case 16:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 17;
					return true;
				case 17:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("id");
					<>1__state = 18;
					return true;
				case 18:
					<>1__state = -3;
					<>2__current = new Token((TokenType)82, (uint?)null);
					<>1__state = 19;
					return true;
				case 19:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new BoolVariant(true));
					<>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?)1u);
					<>1__state = 22;
					return true;
				case 22:
					<>1__state = -3;
					<>2__current = new Token((TokenType)40, (uint?)null);
					<>1__state = 23;
					return true;
				case 23:
					<>1__state = -3;
					<>2__current = new Token((TokenType)86, (uint?)null);
					<>1__state = 24;
					return true;
				case 24:
					<>1__state = -3;
					<>2__current = new Token((TokenType)46, (uint?)null);
					<>1__state = 25;
					return true;
				case 25:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)1u);
					<>1__state = 26;
					return true;
				case 26:
					<>1__state = -3;
					goto IL_101b;
				case 27:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)null);
					<>1__state = 28;
					return true;
				case 28:
					<>1__state = -3;
					<>2__current = new Token((TokenType)48, (uint?)null);
					<>1__state = 29;
					return true;
				case 29:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("_wipe_alt");
					<>1__state = 30;
					return true;
				case 30:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 31;
					return true;
				case 31:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("id");
					<>1__state = 32;
					return true;
				case 32:
					<>1__state = -3;
					<>2__current = new Token((TokenType)82, (uint?)null);
					<>1__state = 33;
					return true;
				case 33:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("key");
					<>1__state = 34;
					return true;
				case 34:
					<>1__state = -3;
					<>2__current = new Token((TokenType)23, (uint?)null);
					<>1__state = 35;
					return true;
				case 35:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new BoolVariant(false));
					<>1__state = 36;
					return true;
				case 36:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 37;
					return true;
				case 37:
					<>1__state = -3;
					<>2__current = new Token((TokenType)86, (uint?)null);
					<>1__state = 38;
					return true;
				case 38:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)1u);
					<>1__state = 39;
					return true;
				case 39:
					<>1__state = -3;
					<>2__current = new Token((TokenType)38, (uint?)null);
					<>1__state = 40;
					return true;
				case 40:
					<>1__state = -3;
					<>2__current = new Token((TokenType)15, (uint?)null);
					<>1__state = 41;
					return true;
				case 41:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("key");
					<>1__state = 42;
					return true;
				case 42:
					<>1__state = -3;
					<>2__current = new Token((TokenType)86, (uint?)null);
					<>1__state = 43;
					return true;
				case 43:
					<>1__state = -3;
					<>2__current = new Token((TokenType)46, (uint?)null);
					<>1__state = 44;
					return true;
				case 44:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)1u);
					<>1__state = 45;
					return true;
				case 45:
					<>1__state = -3;
					<>2__current = new Token((TokenType)59, (uint?)null);
					<>1__state = 46;
					return true;
				case 46:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("actor");
					<>1__state = 47;
					return true;
				case 47:
					<>1__state = -3;
					<>2__current = new Token((TokenType)23, (uint?)null);
					<>1__state = 48;
					return true;
				case 48:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("world");
					<>1__state = 49;
					return true;
				case 49:
					<>1__state = -3;
					<>2__current = new Token((TokenType)84, (uint?)null);
					<>1__state = 50;
					return true;
				case 50:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("_get_actor_by_id");
					<>1__state = 51;
					return true;
				case 51:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 52;
					return true;
				case 52:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("id");
					<>1__state = 53;
					return true;
				case 53:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 54;
					return true;
				case 54:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)1u);
					<>1__state = 55;
					return true;
				case 55:
					<>1__state = -3;
					<>2__current = new Token((TokenType)38, (uint?)null);
					<>1__state = 56;
					return true;
				case 56:
					<>1__state = -3;
					<>2__current = new Token((TokenType)5, (uint?)89u);
					<>1__state = 57;
					return true;
				case 57:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 58;
					return true;
				case 58:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("actor");
					<>1__state = 59;
					return true;
				case 59:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 60;
					return true;
				case 60:
					<>1__state = -3;
					<>2__current = new Token((TokenType)86, (uint?)null);
					<>1__state = 61;
					return true;
				case 61:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)2u);
					<>1__state = 62;
					return true;
				case 62:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("actor");
					<>1__state = 63;
					return true;
				case 63:
					<>1__state = -3;
					<>2__current = new Token((TokenType)84, (uint?)null);
					<>1__state = 64;
					return true;
				case 64:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("_deinstantiate");
					<>1__state = 65;
					return true;
				case 65:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 66;
					return true;
				case 66:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new BoolVariant(true));
					<>1__state = 67;
					return true;
				case 67:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 68;
					return true;
				case 68:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)null);
					<>1__state = 69;
					return true;
				case 69:
					<>1__state = -3;
					goto IL_101b;
				case 70:
					{
						<>1__state = -3;
						goto IL_101b;
					}
					IL_101b:
					<token>5__4 = null;
					break;
				}
				if (((global::System.Collections.IEnumerator)<>s__3).MoveNext())
				{
					<token>5__4 = <>s__3.Current;
					if (<funcstop>5__1.Check(<token>5__4))
					{
						<>2__current = <token>5__4;
						<>1__state = 1;
						return true;
					}
					if (<wipeadd>5__2.Check(<token>5__4))
					{
						<>2__current = <token>5__4;
						<>1__state = 27;
						return true;
					}
					<>2__current = <token>5__4;
					<>1__state = 70;
					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/Entities/Player/player.gdc";
	}

	[IteratorStateMachine(typeof(<Modify>d__1))]
	public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
	{
		MultiTokenWaiter funcstop = new MultiTokenWaiter(new Func<Token, bool>[4]
		{
			delegate(Token t)
			{
				IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
				return val4 != null && val4.Name == "_get_actor_by_id";
			},
			(Token t) => (int)t.Type == 80,
			delegate(Token t)
			{
				IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
				return val3 != null && val3.Name == "id";
			},
			(Token t) => (int)t.Type == 81
		}, false, false);
		MultiTokenWaiter wipeadd = new MultiTokenWaiter(new Func<Token, bool>[6]
		{
			delegate(Token t)
			{
				IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
				return val2 != null && val2.Name == "FALLBACK_ITEM";
			},
			(Token t) => (int)t.Type == 84,
			delegate(Token t)
			{
				IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
				return val != null && val.Name == "duplicate";
			},
			(Token t) => (int)t.Type == 80,
			(Token t) => (int)t.Type == 81,
			(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 (funcstop.Check(token))
				{
					yield return token;
					yield return new Token((TokenType)89, (uint?)1u);
					yield return new Token((TokenType)38, (uint?)null);
					yield return (Token)new IdentifierToken("actor");
					yield return new Token((TokenType)84, (uint?)null);
					yield return (Token)new IdentifierToken("actor_type");
					yield return new Token((TokenType)8, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new StringVariant("fish_spawn"));
					yield return new Token((TokenType)13, (uint?)null);
					yield return (Token)new IdentifierToken("actor");
					yield return new Token((TokenType)84, (uint?)null);
					yield return (Token)new IdentifierToken("actor_type");
					yield return new Token((TokenType)8, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new StringVariant("fish_spawn_alien"));
					yield return new Token((TokenType)86, (uint?)null);
					yield return (Token)new IdentifierToken("_wipe_alt");
					yield return new Token((TokenType)80, (uint?)null);
					yield return (Token)new IdentifierToken("id");
					yield return new Token((TokenType)82, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new BoolVariant(true));
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)89, (uint?)1u);
					yield return new Token((TokenType)40, (uint?)null);
					yield return new Token((TokenType)86, (uint?)null);
					yield return new Token((TokenType)46, (uint?)null);
					yield return new Token((TokenType)89, (uint?)1u);
				}
				else if (wipeadd.Check(token))
				{
					yield return token;
					yield return new Token((TokenType)89, (uint?)null);
					yield return new Token((TokenType)48, (uint?)null);
					yield return (Token)new IdentifierToken("_wipe_alt");
					yield return new Token((TokenType)80, (uint?)null);
					yield return (Token)new IdentifierToken("id");
					yield return new Token((TokenType)82, (uint?)null);
					yield return (Token)new IdentifierToken("key");
					yield return new Token((TokenType)23, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new BoolVariant(false));
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)86, (uint?)null);
					yield return new Token((TokenType)89, (uint?)1u);
					yield return new Token((TokenType)38, (uint?)null);
					yield return new Token((TokenType)15, (uint?)null);
					yield return (Token)new IdentifierToken("key");
					yield return new Token((TokenType)86, (uint?)null);
					yield return new Token((TokenType)46, (uint?)null);
					yield return new Token((TokenType)89, (uint?)1u);
					yield return new Token((TokenType)59, (uint?)null);
					yield return (Token)new IdentifierToken("actor");
					yield return new Token((TokenType)23, (uint?)null);
					yield return (Token)new IdentifierToken("world");
					yield return new Token((TokenType)84, (uint?)null);
					yield return (Token)new IdentifierToken("_get_actor_by_id");
					yield return new Token((TokenType)80, (uint?)null);
					yield return (Token)new IdentifierToken("id");
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)89, (uint?)1u);
					yield return new Token((TokenType)38, (uint?)null);
					yield return new Token((TokenType)5, (uint?)89u);
					yield return new Token((TokenType)80, (uint?)null);
					yield return (Token)new IdentifierToken("actor");
					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("actor");
					yield return new Token((TokenType)84, (uint?)null);
					yield return (Token)new IdentifierToken("_deinstantiate");
					yield return new Token((TokenType)80, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new BoolVariant(true));
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)89, (uint?)null);
				}
				else
				{
					yield return token;
				}
			}
		}
		finally
		{
			((global::System.IDisposable)enumerator)?.Dispose();
		}
	}
}
public class RipplePatch : 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 RipplePatch <>4__this;

		private MultiTokenWaiter <waiter>5__1;

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

		private Token <token>5__3;

		Token global::System.Collections.Generic.IEnumerator<Token>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object global::System.Collections.IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <Modify>d__1(int <>1__state)
		{
			this.<>1__state = <>1__state;
			<>l__initialThreadId = Environment.CurrentManagedThreadId;
		}

		[DebuggerHidden]
		void global::System.IDisposable.Dispose()
		{
			int num = <>1__state;
			if (num != -3 && (uint)(num - 1) > 3u)
			{
				return;
			}
			try
			{
			}
			finally
			{
				<>m__Finally1();
			}
		}

		private bool MoveNext()
		{
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Expected O, but got Unknown
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Expected O, but got Unknown
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Expected O, but got Unknown
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			try
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<waiter>5__1 = new MultiTokenWaiter(new Func<Token, bool>[3]
					{
						delegate(Token t)
						{
							IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							return val3 != null && val3.Name == "disabled";
						},
						(Token t) => (int)t.Type == 23,
						delegate(Token t)
						{
							ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null);
							int result;
							if (val != null)
							{
								Variant value = val.Value;
								BoolVariant val2 = (BoolVariant)(object)((value is BoolVariant) ? value : null);
								if (val2 != null)
								{
									result = (val2.Value ? 1 : 0);
									goto IL_0022;
								}
							}
							result = 0;
							goto IL_0022;
							IL_0022:
							return (byte)result != 0;
						}
					}, false, false);
					<>s__2 = tokens.GetEnumerator();
					<>1__state = -3;
					break;
				case 1:
					<>1__state = -3;
					<>2__current = new Token((TokenType)13, (uint?)null);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new BoolVariant(false));
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -3;
					goto IL_019e;
				case 4:
					{
						<>1__state = -3;
						goto IL_019e;
					}
					IL_019e:
					<token>5__3 = null;
					break;
				}
				if (((global::System.Collections.IEnumerator)<>s__2).MoveNext())
				{
					<token>5__3 = <>s__2.Current;
					if (<waiter>5__1.Check(<token>5__3))
					{
						<>2__current = <token>5__3;
						<>1__state = 1;
						return true;
					}
					<>2__current = <token>5__3;
					<>1__state = 4;
					return true;
				}
				<>m__Finally1();
				<>s__2 = null;
				return false;
			}
			catch
			{
				//try-fault
				((global::System.IDisposable)this).Dispose();
				throw;
			}
		}

		bool global::System.Collections.IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		private void <>m__Finally1()
		{
			<>1__state = -1;
			if (<>s__2 != null)
			{
				((global::System.IDisposable)<>s__2).Dispose();
			}
		}

		[DebuggerHidden]
		void global::System.Collections.IEnumerator.Reset()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			throw new NotSupportedException();
		}

		[DebuggerHidden]
		global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator()
		{
			<Modify>d__1 <Modify>d__;
			if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
			{
				<>1__state = 0;
				<Modify>d__ = this;
			}
			else
			{
				<Modify>d__ = new <Modify>d__1(0)
				{
					<>4__this = <>4__this
				};
			}
			<Modify>d__.path = <>3__path;
			<Modify>d__.tokens = <>3__tokens;
			return <Modify>d__;
		}

		[DebuggerHidden]
		global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
		{
			return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator();
		}
	}

	public bool ShouldRun(string path)
	{
		return path == "res://Scenes/Entities/FishSpawn/fish_spawn.gdc";
	}

	[IteratorStateMachine(typeof(<Modify>d__1))]
	public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
	{
		MultiTokenWaiter waiter = new MultiTokenWaiter(new Func<Token, bool>[3]
		{
			delegate(Token t)
			{
				IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
				return val3 != null && val3.Name == "disabled";
			},
			(Token t) => (int)t.Type == 23,
			delegate(Token t)
			{
				ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null);
				int result;
				if (val != null)
				{
					Variant value = val.Value;
					BoolVariant val2 = (BoolVariant)(object)((value is BoolVariant) ? value : null);
					if (val2 != null)
					{
						result = (val2.Value ? 1 : 0);
						goto IL_0022;
					}
				}
				result = 0;
				goto IL_0022;
				IL_0022:
				return (byte)result != 0;
			}
		}, false, false);
		global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator();
		try
		{
			while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
			{
				Token token = enumerator.Current;
				if (waiter.Check(token))
				{
					yield return token;
					yield return new Token((TokenType)13, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new BoolVariant(false));
				}
				else
				{
					yield return token;
				}
			}
		}
		finally
		{
			((global::System.IDisposable)enumerator)?.Dispose();
		}
	}
}
public class WorldInstanceMod : 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 WorldInstanceMod <>4__this;

		private MultiTokenWaiter <waiter>5__1;

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

		private Token <token>5__3;

		Token global::System.Collections.Generic.IEnumerator<Token>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object global::System.Collections.IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <Modify>d__1(int <>1__state)
		{
			this.<>1__state = <>1__state;
			<>l__initialThreadId = Environment.CurrentManagedThreadId;
		}

		[DebuggerHidden]
		void global::System.IDisposable.Dispose()
		{
			int num = <>1__state;
			if (num != -3 && (uint)(num - 1) > 1u)
			{
				return;
			}
			try
			{
			}
			finally
			{
				<>m__Finally1();
			}
		}

		private bool MoveNext()
		{
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Expected O, but got Unknown
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Expected O, but got Unknown
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Expected O, but got Unknown
			try
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<waiter>5__1 = new MultiTokenWaiter(new Func<Token, bool>[4]
					{
						delegate(Token t)
						{
							IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							return val3 != null && val3.Name == "BANK_DATA";
						},
						(Token t) => (int)t.Type == 80,
						delegate(Token t)
						{
							ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null);
							int result;
							if (val != null)
							{
								Variant value = val.Value;
								IntVariant val2 = (IntVariant)(object)((value is IntVariant) ? value : null);
								if (val2 != null)
								{
									result = ((val2.Value == 1) ? 1 : 0);
									goto IL_0026;
								}
							}
							result = 0;
							goto IL_0026;
							IL_0026:
							return (byte)result != 0;
						},
						(Token t) => (int)t.Type == 81
					}, false, false);
					<>s__2 = tokens.GetEnumerator();
					<>1__state = -3;
					break;
				case 1:
					<>1__state = -3;
					goto IL_015d;
				case 2:
					{
						<>1__state = -3;
						goto IL_015d;
					}
					IL_015d:
					<token>5__3 = null;
					break;
				}
				if (((global::System.Collections.IEnumerator)<>s__2).MoveNext())
				{
					<token>5__3 = <>s__2.Current;
					if (<waiter>5__1.Check(<token>5__3))
					{
						<>2__current = (Token)new ConstantToken((Variant)new BoolVariant(false));
						<>1__state = 1;
						return true;
					}
					<>2__current = <token>5__3;
					<>1__state = 2;
					return true;
				}
				<>m__Finally1();
				<>s__2 = null;
				return false;
			}
			catch
			{
				//try-fault
				((global::System.IDisposable)this).Dispose();
				throw;
			}
		}

		bool global::System.Collections.IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		private void <>m__Finally1()
		{
			<>1__state = -1;
			if (<>s__2 != null)
			{
				((global::System.IDisposable)<>s__2).Dispose();
			}
		}

		[DebuggerHidden]
		void global::System.Collections.IEnumerator.Reset()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			throw new NotSupportedException();
		}

		[DebuggerHidden]
		global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator()
		{
			<Modify>d__1 <Modify>d__;
			if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
			{
				<>1__state = 0;
				<Modify>d__ = this;
			}
			else
			{
				<Modify>d__ = new <Modify>d__1(0)
				{
					<>4__this = <>4__this
				};
			}
			<Modify>d__.path = <>3__path;
			<Modify>d__.tokens = <>3__tokens;
			return <Modify>d__;
		}

		[DebuggerHidden]
		global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
		{
			return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator();
		}
	}

	public bool ShouldRun(string path)
	{
		return path == "res://Scenes/World/world.gdc";
	}

	[IteratorStateMachine(typeof(<Modify>d__1))]
	public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
	{
		MultiTokenWaiter waiter = new MultiTokenWaiter(new Func<Token, bool>[4]
		{
			delegate(Token t)
			{
				IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
				return val3 != null && val3.Name == "BANK_DATA";
			},
			(Token t) => (int)t.Type == 80,
			delegate(Token t)
			{
				ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null);
				int result;
				if (val != null)
				{
					Variant value = val.Value;
					IntVariant val2 = (IntVariant)(object)((value is IntVariant) ? value : null);
					if (val2 != null)
					{
						result = ((val2.Value == 1) ? 1 : 0);
						goto IL_0026;
					}
				}
				result = 0;
				goto IL_0026;
				IL_0026:
				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 (waiter.Check(token))
				{
					yield return (Token)new ConstantToken((Variant)new BoolVariant(false));
				}
				else
				{
					yield return token;
				}
			}
		}
		finally
		{
			((global::System.IDisposable)enumerator)?.Dispose();
		}
	}
}