Decompiled source of StageScale v1.0.0

StageScale.dll

Decompiled 13 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates.BrotherMonster;
using EntityStates.Missions.BrotherEncounter;
using HG.Reflection;
using IL.RoR2;
using Logger;
using Md.UmbralMithrix.EntityStates.ChannelUmbralUlt;
using Md.UmbralMithrix.MissionHooks;
using Md.UmbralMithrix.MithrixMiscHooks;
using Md.UmbralMithrix.P4Controller;
using Md.UmbralMithrix.UmbralMissionController;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoDetour;
using MonoDetour.Cil;
using MonoDetour.DetourTypes;
using MonoDetour.HookGen;
using MonoMod.Cil;
using On.EntityStates.BrotherMonster;
using On.EntityStates.Missions.BrotherEncounter;
using On.RoR2;
using On.RoR2.Navigation;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Navigation;
using UmbralMithrix;
using UmbralMithrix.EntityStates;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: OptIn]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("StageScale")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+abe4141540d634fbcb840564e3724e22cee9a6b4")]
[assembly: AssemblyProduct("StageScale")]
[assembly: AssemblyTitle("StageScale")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace Md.UmbralMithrix.EntityStates.ChannelUmbralUlt
{
	internal static class OnEnter
	{
		public delegate void PrefixSignature(ChannelUmbralUlt self);

		public delegate void PostfixSignature(ChannelUmbralUlt self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(ChannelUmbralUlt);
			MethodInfo method = typeFromHandle.GetMethod("OnEnter", (BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", "OnEnter");
			}
			return method;
		}
	}
	internal static class FireWave
	{
		public delegate void PrefixSignature(ChannelUmbralUlt self);

		public delegate void PostfixSignature(ChannelUmbralUlt self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(ChannelUmbralUlt);
			MethodInfo method = typeFromHandle.GetMethod("FireWave", (BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", "FireWave");
			}
			return method;
		}
	}
	internal static class FixedUpdate
	{
		public delegate void PrefixSignature(ChannelUmbralUlt self);

		public delegate void PostfixSignature(ChannelUmbralUlt self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(ChannelUmbralUlt);
			MethodInfo method = typeFromHandle.GetMethod("FixedUpdate", (BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", "FixedUpdate");
			}
			return method;
		}
	}
	internal static class OnExit
	{
		public delegate void PrefixSignature(ChannelUmbralUlt self);

		public delegate void PostfixSignature(ChannelUmbralUlt self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(ChannelUmbralUlt);
			MethodInfo method = typeFromHandle.GetMethod("OnExit", (BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", "OnExit");
			}
			return method;
		}
	}
	internal static class _ctor
	{
		public delegate void PrefixSignature(ChannelUmbralUlt self);

		public delegate void PostfixSignature(ChannelUmbralUlt self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(ChannelUmbralUlt);
			ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)constructor == null)
			{
				throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", ".ctor");
			}
			return constructor;
		}
	}
	internal static class _cctor
	{
		public delegate void PrefixSignature();

		public delegate void PostfixSignature();

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(ChannelUmbralUlt);
			ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)constructor == null)
			{
				throw new MissingMethodException("UmbralMithrix.EntityStates.ChannelUmbralUlt", ".cctor");
			}
			return constructor;
		}
	}
}
namespace Md.UmbralMithrix.MithrixMiscHooks
{
	internal static class _ctor
	{
		public delegate void PrefixSignature(MithrixMiscHooks self);

		public delegate void PostfixSignature(MithrixMiscHooks self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MithrixMiscHooks);
			ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)constructor == null)
			{
				throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", ".ctor");
			}
			return constructor;
		}
	}
	internal static class PreventTempItemSteal
	{
		public delegate void PrefixSignature(MithrixMiscHooks self, ref orig_InitItemStealer orig, ref SpellBaseState self1);

		public delegate void PostfixSignature(MithrixMiscHooks self, ref orig_InitItemStealer orig, ref SpellBaseState self1);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MithrixMiscHooks);
			MethodInfo method = typeFromHandle.GetMethod("PreventTempItemSteal", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(orig_InitItemStealer),
				typeof(SpellBaseState)
			}, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", "PreventTempItemSteal");
			}
			return method;
		}
	}
	internal static class SkyLeapDeathState_OnEnter
	{
		public delegate void PrefixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref SkyLeapDeathState self1);

		public delegate void PostfixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref SkyLeapDeathState self1);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MithrixMiscHooks);
			MethodInfo method = typeFromHandle.GetMethod("SkyLeapDeathState_OnEnter", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(orig_OnEnter),
				typeof(SkyLeapDeathState)
			}, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", "SkyLeapDeathState_OnEnter");
			}
			return method;
		}
	}
	internal static class SpellChannelExitState_OnEnter
	{
		public delegate void PrefixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref SpellChannelExitState self1);

		public delegate void PostfixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref SpellChannelExitState self1);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MithrixMiscHooks);
			MethodInfo method = typeFromHandle.GetMethod("SpellChannelExitState_OnEnter", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(orig_OnEnter),
				typeof(SpellChannelExitState)
			}, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", "SpellChannelExitState_OnEnter");
			}
			return method;
		}
	}
	internal static class StaggerEnter_OnEnter
	{
		public delegate void PrefixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref StaggerEnter self1);

		public delegate void PostfixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref StaggerEnter self1);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MithrixMiscHooks);
			MethodInfo method = typeFromHandle.GetMethod("StaggerEnter_OnEnter", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(orig_OnEnter),
				typeof(StaggerEnter)
			}, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", "StaggerEnter_OnEnter");
			}
			return method;
		}
	}
	internal static class TrueDeathState_OnEnter
	{
		public delegate void PrefixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref TrueDeathState self1);

		public delegate void PostfixSignature(MithrixMiscHooks self, ref orig_OnEnter orig, ref TrueDeathState self1);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MithrixMiscHooks);
			MethodInfo method = typeFromHandle.GetMethod("TrueDeathState_OnEnter", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(orig_OnEnter),
				typeof(TrueDeathState)
			}, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks", "TrueDeathState_OnEnter");
			}
			return method;
		}
	}
	internal static class __c
	{
		internal static class _cctor
		{
			public delegate void PrefixSignature();

			public delegate void PostfixSignature();

			public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
			}

			public static MethodBase Target()
			{
				Type type = Type.GetType("UmbralMithrix.MithrixMiscHooks+<>c, UmbralMithrix");
				if ((object)type == null)
				{
					throw new Exception("Missing Type: 'UmbralMithrix.MithrixMiscHooks+<>c'");
				}
				ConstructorInfo constructor = type.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null);
				if ((object)constructor == null)
				{
					throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks+<>c", ".cctor");
				}
				return constructor;
			}
		}

		internal static class _ctor
		{
			public delegate void PrefixSignature(object self);

			public delegate void PostfixSignature(object self);

			public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
			}

			public static MethodBase Target()
			{
				Type type = Type.GetType("UmbralMithrix.MithrixMiscHooks+<>c, UmbralMithrix");
				if ((object)type == null)
				{
					throw new Exception("Missing Type: 'UmbralMithrix.MithrixMiscHooks+<>c'");
				}
				ConstructorInfo constructor = type.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null);
				if ((object)constructor == null)
				{
					throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks+<>c", ".ctor");
				}
				return constructor;
			}
		}

		internal static class _StaggerEnter_OnEnter_b__4_0
		{
			public delegate void PrefixSignature(object self, ref SpawnResult spawnResult);

			public delegate void PostfixSignature(object self, ref SpawnResult spawnResult);

			public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
			}

			public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
			{
				return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
			}

			public static MethodBase Target()
			{
				Type type = Type.GetType("UmbralMithrix.MithrixMiscHooks+<>c, UmbralMithrix");
				if ((object)type == null)
				{
					throw new Exception("Missing Type: 'UmbralMithrix.MithrixMiscHooks+<>c'");
				}
				MethodInfo method = type.GetMethod("<StaggerEnter_OnEnter>b__4_0", (BindingFlags)(-1), null, new Type[1] { typeof(SpawnResult) }, null);
				if ((object)method == null)
				{
					throw new MissingMethodException("UmbralMithrix.MithrixMiscHooks+<>c", "<StaggerEnter_OnEnter>b__4_0");
				}
				return method;
			}
		}
	}
}
namespace Md.UmbralMithrix.UmbralMissionController
{
	internal static class Start
	{
		public delegate void PrefixSignature(UmbralMissionController self);

		public delegate void PostfixSignature(UmbralMissionController self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(UmbralMissionController);
			MethodInfo method = typeFromHandle.GetMethod("Start", (BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.UmbralMissionController", "Start");
			}
			return method;
		}
	}
	internal static class _ctor
	{
		public delegate void PrefixSignature(UmbralMissionController self);

		public delegate void PostfixSignature(UmbralMissionController self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(UmbralMissionController);
			ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)constructor == null)
			{
				throw new MissingMethodException("UmbralMithrix.UmbralMissionController", ".ctor");
			}
			return constructor;
		}
	}
}
namespace Md.UmbralMithrix.P4Controller
{
	internal static class Start
	{
		public delegate void PrefixSignature(P4Controller self);

		public delegate void PostfixSignature(P4Controller self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(P4Controller);
			MethodInfo method = typeFromHandle.GetMethod("Start", (BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.P4Controller", "Start");
			}
			return method;
		}
	}
	internal static class OnEnable
	{
		public delegate void PrefixSignature(P4Controller self);

		public delegate void PostfixSignature(P4Controller self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(P4Controller);
			MethodInfo method = typeFromHandle.GetMethod("OnEnable", (BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.P4Controller", "OnEnable");
			}
			return method;
		}
	}
	internal static class OnDisable
	{
		public delegate void PrefixSignature(P4Controller self);

		public delegate void PostfixSignature(P4Controller self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(P4Controller);
			MethodInfo method = typeFromHandle.GetMethod("OnDisable", (BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.P4Controller", "OnDisable");
			}
			return method;
		}
	}
	internal static class FixedUpdate
	{
		public delegate void PrefixSignature(P4Controller self);

		public delegate void PostfixSignature(P4Controller self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(P4Controller);
			MethodInfo method = typeFromHandle.GetMethod("FixedUpdate", (BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.P4Controller", "FixedUpdate");
			}
			return method;
		}
	}
	internal static class onBodyStartGlobal
	{
		public delegate void PrefixSignature(P4Controller self, ref CharacterBody body);

		public delegate void PostfixSignature(P4Controller self, ref CharacterBody body);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(P4Controller);
			MethodInfo method = typeFromHandle.GetMethod("onBodyStartGlobal", (BindingFlags)(-1), null, new Type[1] { typeof(CharacterBody) }, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.P4Controller", "onBodyStartGlobal");
			}
			return method;
		}
	}
	internal static class onBodyDestroyGlobal
	{
		public delegate void PrefixSignature(P4Controller self, ref CharacterBody body);

		public delegate void PostfixSignature(P4Controller self, ref CharacterBody body);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(P4Controller);
			MethodInfo method = typeFromHandle.GetMethod("onBodyDestroyGlobal", (BindingFlags)(-1), null, new Type[1] { typeof(CharacterBody) }, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.P4Controller", "onBodyDestroyGlobal");
			}
			return method;
		}
	}
	internal static class handlePlayerBody
	{
		public delegate void PrefixSignature(P4Controller self, ref CharacterBody playerBody);

		public delegate void PostfixSignature(P4Controller self, ref CharacterBody playerBody);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(P4Controller);
			MethodInfo method = typeFromHandle.GetMethod("handlePlayerBody", (BindingFlags)(-1), null, new Type[1] { typeof(CharacterBody) }, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.P4Controller", "handlePlayerBody");
			}
			return method;
		}
	}
	internal static class _ctor
	{
		public delegate void PrefixSignature(P4Controller self);

		public delegate void PostfixSignature(P4Controller self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(P4Controller);
			ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)constructor == null)
			{
				throw new MissingMethodException("UmbralMithrix.P4Controller", ".ctor");
			}
			return constructor;
		}
	}
}
namespace Md.UmbralMithrix.MissionHooks
{
	internal static class _ctor
	{
		public delegate void PrefixSignature(MissionHooks self);

		public delegate void PostfixSignature(MissionHooks self);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MissionHooks);
			ConstructorInfo constructor = typeFromHandle.GetConstructor((BindingFlags)(-1), null, Array.Empty<Type>(), null);
			if ((object)constructor == null)
			{
				throw new MissingMethodException("UmbralMithrix.MissionHooks", ".ctor");
			}
			return constructor;
		}
	}
	internal static class Phase1OnEnter
	{
		public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase1 self1);

		public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase1 self1);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MissionHooks);
			MethodInfo method = typeFromHandle.GetMethod("Phase1OnEnter", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(orig_OnEnter),
				typeof(Phase1)
			}, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.MissionHooks", "Phase1OnEnter");
			}
			return method;
		}
	}
	internal static class Phase2OnEnter
	{
		public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase2 self1);

		public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase2 self1);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MissionHooks);
			MethodInfo method = typeFromHandle.GetMethod("Phase2OnEnter", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(orig_OnEnter),
				typeof(Phase2)
			}, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.MissionHooks", "Phase2OnEnter");
			}
			return method;
		}
	}
	internal static class Phase3OnEnter
	{
		public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase3 self1);

		public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase3 self1);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MissionHooks);
			MethodInfo method = typeFromHandle.GetMethod("Phase3OnEnter", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(orig_OnEnter),
				typeof(Phase3)
			}, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.MissionHooks", "Phase3OnEnter");
			}
			return method;
		}
	}
	internal static class Phase4OnEnter
	{
		public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase4 self1);

		public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref Phase4 self1);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MissionHooks);
			MethodInfo method = typeFromHandle.GetMethod("Phase4OnEnter", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(orig_OnEnter),
				typeof(Phase4)
			}, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.MissionHooks", "Phase4OnEnter");
			}
			return method;
		}
	}
	internal static class BossDeathOnEnter
	{
		public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref BossDeath self1);

		public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref BossDeath self1);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MissionHooks);
			MethodInfo method = typeFromHandle.GetMethod("BossDeathOnEnter", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(orig_OnEnter),
				typeof(BossDeath)
			}, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.MissionHooks", "BossDeathOnEnter");
			}
			return method;
		}
	}
	internal static class BrotherEncounterPhaseBaseStateOnEnter
	{
		public delegate void PrefixSignature(MissionHooks self, ref orig_OnEnter orig, ref BrotherEncounterPhaseBaseState self1);

		public delegate void PostfixSignature(MissionHooks self, ref orig_OnEnter orig, ref BrotherEncounterPhaseBaseState self1);

		public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, config, applyByDefault);
		}

		public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
		{
			return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault);
		}

		public static MethodBase Target()
		{
			Type typeFromHandle = typeof(MissionHooks);
			MethodInfo method = typeFromHandle.GetMethod("BrotherEncounterPhaseBaseStateOnEnter", (BindingFlags)(-1), null, new Type[2]
			{
				typeof(orig_OnEnter),
				typeof(BrotherEncounterPhaseBaseState)
			}, null);
			if ((object)method == null)
			{
				throw new MissingMethodException("UmbralMithrix.MissionHooks", "BrotherEncounterPhaseBaseStateOnEnter");
			}
			return method;
		}
	}
}
namespace MonoDetour.HookGen
{
	internal static class DefaultMonoDetourManager
	{
		internal static MonoDetourManager Instance { get; } = New();

		internal static MonoDetourManager New()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			return new MonoDetourManager(typeof(DefaultMonoDetourManager).Assembly.GetName().Name);
		}
	}
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
	internal class MonoDetourTargetsAttribute(Type? targetType = null) : Attribute(), IMonoDetourTargets
	{
		public Type? TargetType { get; } = targetType;

		public bool IncludeNestedTypes { get; set; } = true;

		public string[]? Members { get; set; }

		public string[]? MemberNamePrefixes { get; set; }

		public string[]? MemberNameSuffixes { get; set; }

		public bool GenerateControlFlowVariants { get; set; }
	}
}
namespace Logger
{
	internal static class Log
	{
		private static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void Debug(object data)
		{
			_logSource.LogDebug(data);
		}

		internal static void Error(object data)
		{
			_logSource.LogError(data);
		}

		internal static void Fatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void Info(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void Message(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
}
namespace StageScale
{
	public class SceneDefOrder : IComparer
	{
		public int Compare(object x, object y)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return ((SceneDef)x).stageOrder - ((SceneDef)y).stageOrder;
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public static class Options
	{
		public static bool IsEnabled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");

		[SystemInitializer(new Type[] { typeof(SceneCatalog) })]
		public static void Init()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			List<SceneDef> source = new List<SceneDef>((IEnumerable<SceneDef>)(object)SceneCatalog.allSceneDefs);
			foreach (SceneDef item in source.OrderBy((SceneDef x) => x.stageOrder))
			{
				string text = Language.GetString(item.nameToken);
				if (!StageScale.StageScales.ContainsKey(text) && item.stageOrder > 0 && text.Length != 0)
				{
					string text2 = "Stage " + item.stageOrder;
					if (item.stageOrder > 6)
					{
						text2 = "Bonus Stage";
					}
					StageScale.StageScales.Add(text, ((BaseUnityPlugin)StageScale.Instance).Config.Bind<float>(text2, text.Replace("'", ""), 1f, "The scale of " + text.Replace("'", "")));
				}
			}
			if (IsEnabled)
			{
				RiskOfOptionsConfig();
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		public static void RiskOfOptionsConfig()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Expected O, but got Unknown
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			foreach (KeyValuePair<string, ConfigEntry<float>> stageScale in StageScale.StageScales)
			{
				ModSettingsManager.AddOption((BaseOption)new SliderOption(stageScale.Value, new SliderConfig
				{
					min = 0.1f,
					max = 10f,
					FormatString = "{0:0.##}x"
				}), "Onyx.StageScale", "StageScale");
			}
			ModSettingsManager.SetModDescription("Options for StageScale", "Onyx.StageScale", "StageScale");
			FileInfo fileInfo = null;
			DirectoryInfo directoryInfo = new DirectoryInfo(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
			do
			{
				FileInfo[] files = directoryInfo.GetFiles("icon.png", SearchOption.TopDirectoryOnly);
				if (files != null && files.Length != 0)
				{
					fileInfo = files[0];
					break;
				}
				directoryInfo = directoryInfo.Parent;
			}
			while (directoryInfo != null && directoryInfo.Exists && !string.Equals(directoryInfo.Name, "plugins", StringComparison.OrdinalIgnoreCase));
			if (fileInfo != null)
			{
				Texture2D val = new Texture2D(256, 256);
				if (ImageConversion.LoadImage(val, File.ReadAllBytes(fileInfo.FullName)))
				{
					Sprite val2 = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f));
					((Object)val2).name = "StageScaleIcon";
					ModSettingsManager.SetModIcon(val2, "Onyx.StageScale", "StageScale");
				}
			}
		}
	}
	[BepInPlugin("Onyx.StageScale", "StageScale", "1.0.0")]
	public sealed class StageScale : BaseUnityPlugin
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_Start <0>__SceneDirector_Start;
		}

		public const string PluginGUID = "Onyx.StageScale";

		public const string PluginAuthor = "Onyx";

		public const string PluginName = "StageScale";

		public const string PluginVersion = "1.0.0";

		public static StageScale Instance;

		public static Dictionary<string, ConfigEntry<float>> StageScales = new Dictionary<string, ConfigEntry<float>>();

		public static GameObject Root;

		private static float _currentScale;

		public static float CurrentScale => _currentScale;

		public void Awake()
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Expected O, but got Unknown
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Expected O, but got Unknown
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Expected O, but got Unknown
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			Log.Init(((BaseUnityPlugin)this).Logger);
			Instance = SingletonHelper.Assign<StageScale>(Instance, this);
			object obj = <>O.<0>__SceneDirector_Start;
			if (obj == null)
			{
				hook_Start val = SceneDirector_Start;
				<>O.<0>__SceneDirector_Start = val;
				obj = (object)val;
			}
			SceneDirector.Start += (hook_Start)obj;
			NodeGraph.FindClosestNode += new hook_FindClosestNode(FindClosestNode);
			NodeGraph.FindClosestNodeWithRaycast += new hook_FindClosestNodeWithRaycast(FindClosestNodeWithRaycast);
			NodeGraph.FindNodesInRange_Vector3_float_float_HullMask_List1 += new hook_FindNodesInRange_Vector3_float_float_HullMask_List1(FindNodesInRange_Vector3_float_float_HullMask_List1);
			NodeGraph.FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1 += new hook_FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1(FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1);
			JumpVolume.OnTriggerStay += new Manipulator(JumpVolume_OnTriggerStay);
			SceneManager.sceneLoaded += sceneLoaded;
			MonoDetourManager.InvokeHookInitializers(Assembly.GetExecutingAssembly());
		}

		public float GetMinRangeScaled(float minRange)
		{
			if (CurrentScale < 1f)
			{
				float num = minRange * (float)Math.Pow(CurrentScale, 2.0);
				if (num >= 0f)
				{
					return num;
				}
			}
			return minRange;
		}

		public float GetMaxRangeScaled(float maxRange)
		{
			if (CurrentScale > 1f)
			{
				float num = maxRange * (float)Math.Pow(CurrentScale, 2.0);
				if (num >= 0f)
				{
					return num;
				}
			}
			return maxRange;
		}

		private void sceneLoaded(Scene scene, LoadSceneMode arg1)
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			if (StageScales.TryGetValue(Language.GetString(SceneCatalog.currentSceneDef.nameToken), out var value) && value.Value != 1f)
			{
				_currentScale = value.Value;
				Root = new GameObject("StageScaleRoot");
			}
		}

		private void JumpVolume_OnTriggerStay(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(CharacterMotor), "velocity")
			}))
			{
				val.EmitDelegate<Func<Vector3, Vector3>>((Func<Vector3, Vector3>)addScalingToJumpPadForce);
			}
			else
			{
				Log.Error("Failed to find patch location");
			}
			static Vector3 addScalingToJumpPadForce(Vector3 vector)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_0014: Unknown result type (might be due to invalid IL or missing references)
				return vector * Mathf.Sqrt(CurrentScale);
			}
		}

		private void FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1(orig_FindNodesInRangeWithFlagConditions_Vector3_float_float_HullMask_NodeFlags_NodeFlags_bool_List1 orig, NodeGraph self, Vector3 position, float minRange, float maxRange, HullMask hullMask, NodeFlags requiredFlags, NodeFlags forbiddenFlags, bool preventOverhead, List<NodeIndex> dest)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			minRange = GetMinRangeScaled(minRange);
			maxRange = GetMaxRangeScaled(maxRange);
			orig.Invoke(self, position, minRange, maxRange, hullMask, requiredFlags, forbiddenFlags, preventOverhead, dest);
		}

		private void FindNodesInRange_Vector3_float_float_HullMask_List1(orig_FindNodesInRange_Vector3_float_float_HullMask_List1 orig, NodeGraph self, Vector3 position, float minRange, float maxRange, HullMask hullMask, List<NodeIndex> dest)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			minRange = GetMinRangeScaled(minRange);
			maxRange = GetMaxRangeScaled(maxRange);
			orig.Invoke(self, position, minRange, maxRange, hullMask, dest);
		}

		private NodeIndex FindClosestNodeWithRaycast(orig_FindClosestNodeWithRaycast orig, NodeGraph self, Vector3 position, HullClassification hullClassification, float maxDistance, int maxRaycasts)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			maxDistance = GetMaxRangeScaled(maxDistance);
			return orig.Invoke(self, position, hullClassification, maxDistance, maxRaycasts);
		}

		private NodeIndex FindClosestNode(orig_FindClosestNode orig, NodeGraph self, Vector3 position, HullClassification hullClassification, float maxDistance)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			maxDistance = GetMaxRangeScaled(maxDistance);
			return orig.Invoke(self, position, hullClassification, maxDistance);
		}

		private static void SceneDirector_Start(orig_Start orig, SceneDirector self)
		{
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			GameObject[] array = Object.FindObjectsOfType<GameObject>();
			CharacterBody val2 = default(CharacterBody);
			MeshRenderer val3 = default(MeshRenderer);
			LineRenderer val4 = default(LineRenderer);
			foreach (GameObject val in array)
			{
				if ((Object)(object)val.transform.parent == (Object)null && !val.TryGetComponent<CharacterBody>(ref val2))
				{
					Transform transform = val.transform;
					transform.localScale *= CurrentScale;
					Transform transform2 = val.transform;
					transform2.localPosition *= CurrentScale;
				}
				if (val.TryGetComponent<MeshRenderer>(ref val3) && ((Renderer)val3).isPartOfStaticBatch)
				{
					((Renderer)val3).staticBatchRootTransform = Root.transform;
				}
				if (val.TryGetComponent<LineRenderer>(ref val4))
				{
					Vector3[] array2 = (Vector3[])(object)new Vector3[val4.positionCount];
					val4.GetPositions(array2);
					for (int j = 0; j < array2.Length; j++)
					{
						ref Vector3 reference = ref array2[j];
						reference *= CurrentScale;
					}
					val4.SetPositions(array2);
				}
			}
			for (int k = 0; k < 2; k++)
			{
				NodeGraph nodeGraph = SceneInfo.instance.GetNodeGraph((GraphType)k);
				nodeGraph.cellSize *= CurrentScale;
				Node[] nodes = nodeGraph.nodes;
				for (int l = 0; l < nodes.Length; l++)
				{
					ref Vector3 position = ref nodes[l].position;
					position *= CurrentScale;
				}
			}
			orig.Invoke(self);
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[MonoDetourTargets(typeof(MissionHooks))]
	[MonoDetourTargets(typeof(P4Controller))]
	[MonoDetourTargets(typeof(UmbralMissionController))]
	[MonoDetourTargets(typeof(MithrixMiscHooks))]
	[MonoDetourTargets(typeof(ChannelUmbralUlt))]
	public class UmbralCompat
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static Manipulator <0>__EditPositionVectors;

			public static Md.UmbralMithrix.UmbralMissionController.Start.PostfixSignature <1>__ScalePizzaPositions;

			public static Manipulator <2>__ScaleArenaGroundPos;

			public static Func<float, float> <3>__ScaleArenaGround;

			public static Func<Vector3, Vector3> <4>__ScalePosition;
		}

		public static Vector3[] p23PizzaPointsDefault;

		public static bool IsEnabled => Chainloader.PluginInfos.ContainsKey("com.Nuxlar.UmbralMithrix");

		[MonoDetourHookInitialize]
		public static void DoUmbral()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Expected O, but got Unknown
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Expected O, but got Unknown
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Expected O, but got Unknown
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Expected O, but got Unknown
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Expected O, but got Unknown
			if (IsEnabled)
			{
				p23PizzaPointsDefault = (Vector3[])(object)new Vector3[UmbralMithrix.p23PizzaPoints.Count];
				for (int i = 0; i < UmbralMithrix.p23PizzaPoints.Count; i++)
				{
					p23PizzaPointsDefault[i] = UmbralMithrix.p23PizzaPoints[i];
				}
				object obj = <>O.<0>__EditPositionVectors;
				if (obj == null)
				{
					Manipulator val = EditPositionVectors;
					<>O.<0>__EditPositionVectors = val;
					obj = (object)val;
				}
				Phase4OnEnter.ILHook((Manipulator)obj);
				object obj2 = <>O.<0>__EditPositionVectors;
				if (obj2 == null)
				{
					Manipulator val2 = EditPositionVectors;
					<>O.<0>__EditPositionVectors = val2;
					obj2 = (object)val2;
				}
				BrotherEncounterPhaseBaseStateOnEnter.ILHook((Manipulator)obj2);
				Md.UmbralMithrix.UmbralMissionController.Start.Postfix(ScalePizzaPositions);
				object obj3 = <>O.<2>__ScaleArenaGroundPos;
				if (obj3 == null)
				{
					Manipulator val3 = ScaleArenaGroundPos;
					<>O.<2>__ScaleArenaGroundPos = val3;
					obj3 = (object)val3;
				}
				Md.UmbralMithrix.P4Controller.FixedUpdate.ILHook((Manipulator)obj3);
				object obj4 = <>O.<0>__EditPositionVectors;
				if (obj4 == null)
				{
					Manipulator val4 = EditPositionVectors;
					<>O.<0>__EditPositionVectors = val4;
					obj4 = (object)val4;
				}
				StaggerEnter_OnEnter.ILHook((Manipulator)obj4);
				object obj5 = <>O.<2>__ScaleArenaGroundPos;
				if (obj5 == null)
				{
					Manipulator val5 = ScaleArenaGroundPos;
					<>O.<2>__ScaleArenaGroundPos = val5;
					obj5 = (object)val5;
				}
				FireWave.ILHook((Manipulator)obj5);
			}
		}

		private static void ScaleArenaGroundPos(ILManipulationInfo info)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			ILCursor val = new ILCursor(info.Context);
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 491f)
			}))
			{
				val.EmitDelegate<Func<float, float>>((Func<float, float>)ScaleArenaGround);
			}
			else
			{
				Log.Error("Failed to find patch location");
			}
		}

		private static float ScaleArenaGround(float groundHeight)
		{
			return groundHeight * StageScale.CurrentScale;
		}

		private static void ScalePizzaPositions(UmbralMissionController self)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < UmbralMithrix.p23PizzaPoints.Count; i++)
			{
				UmbralMithrix.p23PizzaPoints[i] = p23PizzaPointsDefault[i] * StageScale.CurrentScale;
			}
		}

		private static void EditPositionVectors(ILManipulationInfo info)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			ILCursor val = new ILCursor(info.Context);
			int num = 0;
			float num2 = default(float);
			while (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2),
				(Instruction x) => ILPatternMatchingExt.MatchNewobj(x, typeof(Vector3))
			}))
			{
				num++;
				val.EmitDelegate<Func<Vector3, Vector3>>((Func<Vector3, Vector3>)ScalePosition);
			}
			if (num == 0)
			{
				Log.Error("Failed to find patch location");
			}
		}

		private static Vector3 ScalePosition(Vector3 vector)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			return vector * StageScale.CurrentScale;
		}
	}
}