Decompiled source of MirageRevive v1.3.0

BepInEx/plugins/MirageRevive.dll

Decompiled a week ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security.Permissions;
using System.Threading;
using <StartupCode$MirageRevive>.$Mirage.Revive.Domain;
using <StartupCode$MirageRevive>.$Mirage.Revive.Hook;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using FSharpPlus;
using FSharpPlus.Control;
using GameNetcodeStuff;
using LobbyCompatibility.Enums;
using LobbyCompatibility.Features;
using Microsoft.FSharp.Collections;
using Microsoft.FSharp.Control;
using Microsoft.FSharp.Core;
using Microsoft.FSharp.Core.CompilerServices;
using Mirage.Revive.Domain;
using Mirage.Revive.Hook;
using Mirage.Revive.Unity;
using MirageRevive.NetcodePatcher;
using On;
using On.GameNetcodeStuff;
using Unity.Collections;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.AI;

[assembly: FSharpInterfaceDataVersion(2, 0, 0)]
[assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: IgnoresAccessChecksTo("ClientNetworkTransform")]
[assembly: IgnoresAccessChecksTo("DissonanceVoip")]
[assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")]
[assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")]
[assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")]
[assembly: IgnoresAccessChecksTo("Unity.Burst")]
[assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")]
[assembly: IgnoresAccessChecksTo("Unity.Collections")]
[assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")]
[assembly: IgnoresAccessChecksTo("Unity.Jobs")]
[assembly: IgnoresAccessChecksTo("Unity.Mathematics")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")]
[assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")]
[assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")]
[assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")]
[assembly: IgnoresAccessChecksTo("Unity.Services.QoS")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Relay")]
[assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")]
[assembly: IgnoresAccessChecksTo("Unity.Timeline")]
[assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UI")]
[assembly: AssemblyCompany("MirageRevive")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+d41cd2350b5d2d7a20194d6f7cabb0be6d76c8e5")]
[assembly: AssemblyProduct("MirageRevive")]
[assembly: AssemblyTitle("MirageRevive")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: NetcodePatchedAssembly]
internal class <Module>
{
	static <Module>()
	{
	}
}
namespace Mirage.Revive
{
	[Serializable]
	[BepInPlugin("qwbarch.MirageRevive", "MirageRevive", "1.3.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		public void Awake()
		{
			Mirage.Revive.Domain.Config.initConfig(((BaseUnityPlugin)this).Config);
			Mirage.Revive.Domain.Netcode.initNetcodePatcher();
			Compatibility.initLobbyCompatibility();
			Mirage.Revive.Hook.Config.syncConfig();
			Mirage.Revive.Hook.MaskedPlayerEnemy.revivePlayersOnDeath();
		}
	}
}
namespace <StartupCode$MirageRevive>
{
	internal static class $Plugin
	{
	}
}
namespace Mirage.Revive.Hook
{
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public static class MaskedPlayerEnemy
	{
		[Serializable]
		[SpecialName]
		[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static class revivePlayersOnDeath@61
		{
			internal static void Invoke(orig_Awake orig, PlayerControllerB self)
			{
				orig.Invoke(self);
				BodyDeactivator.BodyDeactivator bodyDeactivator = ((Component)self).gameObject.AddComponent<BodyDeactivator.BodyDeactivator>();
			}
		}

		[Serializable]
		[SpecialName]
		[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static class revivePlayersOnDeath@67-1
		{
			internal static void Invoke(orig_Start orig, GameNetworkManager self)
			{
				orig.Invoke(self);
				List<NetworkPrefab> prefabs = ((Component)self).GetComponent<NetworkManager>().NetworkConfig.Prefabs.m_Prefabs;
				foreach (NetworkPrefab item in prefabs)
				{
					MaskedPlayerEnemy component = item.Prefab.gameObject.GetComponent<MaskedPlayerEnemy>();
					if ((object)component != null && string.Equals(((EnemyAI)component).enemyType.enemyName, "Masked"))
					{
						MaskedPlayerEnemy.maskedEnemyPrefab = ((Component)component).gameObject;
					}
				}
				GameObject maskedEnemyPrefab = MaskedPlayerEnemy.maskedEnemyPrefab;
				if ((object)maskedEnemyPrefab == null)
				{
					Mirage.Revive.Domain.Logger.logWarning.Invoke("HauntedMaskItem prefab is missing. Another mod is messing with this prefab when they shouldn't be.");
				}
			}
		}

		[Serializable]
		[SpecialName]
		[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static class revivePlayersOnDeath@79-2
		{
			internal static void Invoke(orig_StartGame orig, StartOfRound self)
			{
				orig.Invoke(self);
				killedPlayers.Clear();
			}
		}

		[Serializable]
		[SpecialName]
		[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static class revivePlayersOnDeath@85-3
		{
			internal static void Invoke(orig_KillPlayerServerRpc orig, PlayerControllerB self, int playerId, bool spawnBody, Vector3 bodyVelocity, int causeOfDeath, int deathAnimation, Vector3 positionOffset)
			{
				//IL_0004: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self, playerId, spawnBody, bodyVelocity, causeOfDeath, deathAnimation, positionOffset);
				if (((NetworkBehaviour)self).IsHost)
				{
					PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController;
					if (!HashCompare.GenericEqualityIntrinsic<PlayerControllerB>(self, localPlayerController))
					{
						spawnMaskedEnemy<Vector3>(self, causeOfDeath, deathAnimation, spawnBody, bodyVelocity);
					}
				}
			}
		}

		[Serializable]
		[SpecialName]
		[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static class revivePlayersOnDeath@90-4
		{
			internal static void Invoke(orig_KillPlayer orig, PlayerControllerB self, Vector3 bodyVelocity, bool spawnBody, CauseOfDeath causeOfDeath, int deathAnimation, Vector3 positionOffset)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0004: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0036: Expected I4, but got Unknown
				orig.Invoke(self, bodyVelocity, spawnBody, causeOfDeath, deathAnimation, positionOffset);
				if (((NetworkBehaviour)self).IsHost && HashCompare.GenericEqualityIntrinsic<PlayerControllerB>(self, StartOfRound.Instance.localPlayerController))
				{
					spawnMaskedEnemy<Vector3>(self, (int)causeOfDeath, deathAnimation, spawnBody, bodyVelocity);
				}
			}
		}

		[Serializable]
		[SpecialName]
		[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal sealed class revivePlayersOnDeath@101-6 : GeneratedSequenceBase<IEnumerator>
		{
			public orig_EndOfGame orig;

			public StartOfRound self;

			public int bodiesEnsured;

			public int connectedPlayersOnServer;

			public int scrapCollected;

			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public IEnumerator<PlayerControllerB> @enum;

			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public int pc;

			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public IEnumerator current;

			public revivePlayersOnDeath@101-6(orig_EndOfGame orig, StartOfRound self, int bodiesEnsured, int connectedPlayersOnServer, int scrapCollected, IEnumerator<PlayerControllerB> @enum, int pc, IEnumerator current)
			{
				this.orig = orig;
				this.self = self;
				this.bodiesEnsured = bodiesEnsured;
				this.connectedPlayersOnServer = connectedPlayersOnServer;
				this.scrapCollected = scrapCollected;
				this.@enum = @enum;
				this.pc = pc;
				this.current = current;
				base..ctor();
			}

			public override int GenerateNext(ref IEnumerable<IEnumerator> next)
			{
				switch (pc)
				{
				default:
					pc = 1;
					current = orig.Invoke(self, bodiesEnsured, connectedPlayersOnServer, scrapCollected);
					return 1;
				case 1:
					@enum = ((IEnumerable<PlayerControllerB>)self.allPlayerScripts).GetEnumerator();
					pc = 2;
					while (@enum.MoveNext())
					{
						PlayerControllerB val = @enum.Current;
						val.deadBody = null;
					}
					goto case 2;
				case 2:
					pc = 3;
					IntrinsicFunctions.Dispose<IEnumerator<PlayerControllerB>>(@enum);
					@enum = null;
					pc = 3;
					break;
				case 3:
					break;
				}
				current = null;
				return 0;
			}

			public override void Close()
			{
				Exception ex = default(Exception);
				while (true)
				{
					switch (pc)
					{
					case 3:
						if (ex != null)
						{
							throw ex;
						}
						return;
					}
					try
					{
						switch (pc)
						{
						default:
							pc = 3;
							IntrinsicFunctions.Dispose<IEnumerator<PlayerControllerB>>(@enum);
							break;
						case 0:
						case 1:
						case 3:
							break;
						}
						pc = 3;
						current = null;
					}
					catch (object obj)
					{
						Exception ex2 = (Exception)obj;
						ex = ex2;
					}
				}
			}

			public override bool get_CheckClose()
			{
				switch (pc)
				{
				default:
					return true;
				case 1:
					return false;
				case 0:
				case 3:
					return false;
				}
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			public override IEnumerator get_LastGenerated()
			{
				return current;
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			public override IEnumerator<IEnumerator> GetFreshEnumerator()
			{
				return (IEnumerator<IEnumerator>)(object)new revivePlayersOnDeath@101-6(orig, self, bodiesEnsured, connectedPlayersOnServer, scrapCollected, null, 0, null);
			}
		}

		[Serializable]
		[SpecialName]
		[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static class revivePlayersOnDeath@99-5
		{
			internal static IEnumerator Invoke(orig_EndOfGame orig, StartOfRound self, int bodiesEnsured, int connectedPlayersOnServer, int scrapCollected)
			{
				return (IEnumerator)(object)new revivePlayersOnDeath@101-6(orig, self, bodiesEnsured, connectedPlayersOnServer, scrapCollected, null, 0, null);
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static Random random => <StartupCode$MirageRevive>.$Mirage.Revive.Hook.MaskedPlayerEnemy.random@14;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static HashSet<ulong> killedPlayers => <StartupCode$MirageRevive>.$Mirage.Revive.Hook.MaskedPlayerEnemy.killedPlayers@17;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static GameObject maskedEnemyPrefab
		{
			get
			{
				return <StartupCode$MirageRevive>.$Mirage.Revive.Hook.MaskedPlayerEnemy.maskedEnemyPrefab@19;
			}
			set
			{
				<StartupCode$MirageRevive>.$Mirage.Revive.Hook.MaskedPlayerEnemy.maskedEnemyPrefab@19 = value;
			}
		}

		internal static bool spawnRateSuccess@38(Mirage.Revive.Domain.Config.SyncedConfig config, Unit unitVar0)
		{
			return random.Next(1, 101) <= config.reviveChance@;
		}

		[CompilationArgumentCounts(new int[] { 1, 1, 1, 1, 1 })]
		internal static void spawnMaskedEnemy<a>(PlayerControllerB player, int causeOfDeath, int deathAnimation, bool spawnBody, a bodyVelocity)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: 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_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			if (killedPlayers.Add(player.playerClientId))
			{
				Vector3 position = ((Component)player).transform.position;
				NavMeshHit val = default(NavMeshHit);
				bool flag = NavMesh.SamplePosition(position, ref val, 1f, -1) && Mathf.Approximately(position.x, ((NavMeshHit)(ref val)).position.x) && Mathf.Approximately(position.z, ((NavMeshHit)(ref val)).position.z);
				int num;
				if (causeOfDeath == 5 && spawnBody)
				{
					a val2 = bodyVelocity;
					num = (val2.Equals(Vector3.zero) ? 1 : 0);
				}
				else
				{
					num = 0;
				}
				bool flag2 = (byte)num != 0;
				bool flag3 = causeOfDeath == 4 && deathAnimation == 4;
				Mirage.Revive.Domain.Config.SyncedConfig config = Mirage.Revive.Domain.Config.getConfig();
				bool flag4 = !config.reviveOnlyWhenPlayerAlone@ || player.isPlayerAlone;
				if ((flag || (player.isInHangarShipRoom && StartOfRound.Instance.shipHasLanded)) && !flag2 && !flag3 && spawnBody && flag4 && spawnRateSuccess@38(config, null))
				{
					float y = ((Component)player).transform.eulerAngles.y;
					GameObject val3 = Object.Instantiate<GameObject>(maskedEnemyPrefab, ((Component)player).transform.position, Quaternion.Euler(new Vector3(0f, y, 0f)));
					MaskedPlayerEnemy component = val3.GetComponent<MaskedPlayerEnemy>();
					component.mimickingPlayer = player;
					val3.GetComponentInChildren<NetworkObject>().Spawn(true);
					((Component)player).GetComponent<BodyDeactivator.BodyDeactivator>().DeactivateBody((EnemyAI)(object)component);
				}
			}
		}

		public static void revivePlayersOnDeath()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Expected O, but got Unknown
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Expected O, but got Unknown
			PlayerControllerB.Awake += new hook_Awake(revivePlayersOnDeath@61.Invoke);
			GameNetworkManager.Start += new hook_Start(revivePlayersOnDeath@67-1.Invoke);
			StartOfRound.StartGame += new hook_StartGame(revivePlayersOnDeath@79-2.Invoke);
			PlayerControllerB.KillPlayerServerRpc += new hook_KillPlayerServerRpc(revivePlayersOnDeath@85-3.Invoke);
			PlayerControllerB.KillPlayer += new hook_KillPlayer(revivePlayersOnDeath@90-4.Invoke);
			StartOfRound.EndOfGame += new hook_EndOfGame(revivePlayersOnDeath@99-5.Invoke);
		}
	}
}
namespace <StartupCode$MirageRevive>.$Mirage.Revive.Hook
{
	internal static class MaskedPlayerEnemy
	{
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal static readonly Random random@14;

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal static readonly HashSet<ulong> killedPlayers@17;

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal static GameObject maskedEnemyPrefab@19;

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		[CompilerGenerated]
		[DebuggerNonUserCode]
		internal static int init@;

		static MaskedPlayerEnemy()
		{
			random@14 = new Random();
			killedPlayers@17 = new HashSet<ulong>();
			maskedEnemyPrefab@19 = null;
		}
	}
}
namespace Mirage.Revive.Unity
{
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public static class BodyDeactivator
	{
		[Serializable]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public class BodyDeactivator : NetworkBehaviour
		{
			public void DeactivateBody(EnemyAI enemy)
			{
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				PlayerControllerB component = ((Component)this).GetComponent<PlayerControllerB>();
				DeadBodyInfo deadBody = component.deadBody;
				if ((object)deadBody != null && 0 == 0)
				{
					component.redirectToEnemy = enemy;
					component.deadBody.DeactivateBody(false);
					if (((NetworkBehaviour)this).IsHost)
					{
						DeactivateBodyClientRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)this).NetworkObject));
					}
				}
			}

			[ClientRpc]
			public void DeactivateBodyClientRpc(NetworkObjectReference reference)
			{
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				//IL_002e: Invalid comparison between Unknown and I4
				//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b1: Invalid comparison between Unknown and I4
				//IL_005f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0068: Unknown result type (might be due to invalid IL or missing references)
				//IL_006d: Unknown result type (might be due to invalid IL or missing references)
				//IL_007d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0083: Unknown result type (might be due to invalid IL or missing references)
				//IL_0097: Unknown result type (might be due to invalid IL or missing references)
				NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
				if (networkManager == null || !networkManager.IsListening)
				{
					return;
				}
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(727223059u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref reference, default(ForNetworkSerializable));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 727223059u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((NetworkBehaviour)this).IsHost)
				{
					NetworkObject val3 = null;
					if (((NetworkObjectReference)(ref reference)).TryGet(ref val3, (NetworkManager)null))
					{
						DeactivateBody(((Component)val3).GetComponent<EnemyAI>());
					}
					else
					{
						Mirage.Revive.Domain.Logger.logError.Invoke("DeactivateBodyClientRpc received an invalid network object reference.");
					}
				}
			}

			protected override void __initializeVariables()
			{
				((NetworkBehaviour)this).__initializeVariables();
			}

			[RuntimeInitializeOnLoadMethod]
			internal static void InitializeRPCS_BodyDeactivator()
			{
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Expected O, but got Unknown
				NetworkManager.__rpc_func_table.Add(727223059u, new RpcReceiveHandler(__rpc_handler_727223059));
			}

			private static void __rpc_handler_727223059(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
			{
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_004f: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				NetworkManager networkManager = target.NetworkManager;
				if (networkManager != null && networkManager.IsListening)
				{
					NetworkObjectReference reference = default(NetworkObjectReference);
					((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref reference, default(ForNetworkSerializable));
					target.__rpc_exec_stage = (__RpcExecStage)2;
					((BodyDeactivator)(object)target).DeactivateBodyClientRpc(reference);
					target.__rpc_exec_stage = (__RpcExecStage)0;
				}
			}

			[MethodImpl(MethodImplOptions.NoInlining)]
			protected internal override string __getTypeName()
			{
				return "BodyDeactivator";
			}
		}
	}
}
namespace <StartupCode$MirageRevive>.$Mirage.Revive.Unity
{
	internal static class BodyDeactivator
	{
	}
}
namespace Mirage.Revive.Hook
{
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public static class Config
	{
		[Serializable]
		[SpecialName]
		[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static class syncConfig@7
		{
			internal static void Invoke(orig_ConnectClientToPlayerObject orig, PlayerControllerB self)
			{
				orig.Invoke(self);
				if (NetworkManager.Singleton.IsHost)
				{
					Mirage.Revive.Domain.Config.registerHandler(Mirage.Revive.Domain.Config.SyncAction.RequestSync);
					return;
				}
				Mirage.Revive.Domain.Config.registerHandler(Mirage.Revive.Domain.Config.SyncAction.ReceiveSync);
				Mirage.Revive.Domain.Config.requestSync();
			}
		}

		[Serializable]
		[SpecialName]
		[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static class syncConfig@16-1
		{
			internal static void Invoke(orig_StartDisconnect orig, GameNetworkManager self)
			{
				orig.Invoke(self);
				Mirage.Revive.Domain.Config.revertSync();
			}
		}

		public static void syncConfig()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			PlayerControllerB.ConnectClientToPlayerObject += new hook_ConnectClientToPlayerObject(syncConfig@7.Invoke);
			GameNetworkManager.StartDisconnect += new hook_StartDisconnect(syncConfig@16-1.Invoke);
		}
	}
}
namespace <StartupCode$MirageRevive>.$Mirage.Revive.Hook
{
	internal static class Config
	{
	}
}
namespace Mirage.Revive.Domain
{
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public static class Config
	{
		[Serializable]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public class LocalConfig
		{
			internal ConfigEntry<int> ReviveChance@;

			internal ConfigEntry<bool> ReviveOnlyWhenPlayerAlone@;

			public ConfigEntry<int> ReviveChance
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return ReviveChance@;
				}
			}

			public ConfigEntry<bool> ReviveOnlyWhenPlayerAlone
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return ReviveOnlyWhenPlayerAlone@;
				}
			}

			public LocalConfig(ConfigFile config)
			{
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Expected O, but got Unknown
				ReviveChance@ = config.Bind<int>("Revive", "Revive chance", 10, new ConfigDescription("The chance a player will revive as a masked enemy, on player death.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
				ReviveOnlyWhenPlayerAlone@ = config.Bind<bool>("Revive", "Revive only when alone", false, "If enabled, revivals only happen when the player dies alone (where others will almost never see the masked enemy come to life from your body)." + "If disabled, revivals will always happen based on the configured chance, which means players that are near you can see the masked enemy coming back to life.");
			}
		}

		[Serializable]
		[Serializable]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public sealed class SyncedConfig : IEquatable<SyncedConfig>, IStructuralEquatable, IComparable<SyncedConfig>, IComparable, IStructuralComparable
		{
			[CompilerGenerated]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			internal int reviveChance@;

			[CompilerGenerated]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			internal bool reviveOnlyWhenPlayerAlone@;

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			public int reviveChance
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return reviveChance@;
				}
			}

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			public bool reviveOnlyWhenPlayerAlone
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return reviveOnlyWhenPlayerAlone@;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(SyncedConfig))]
			public SyncedConfig(int reviveChance, bool reviveOnlyWhenPlayerAlone)
			{
				reviveChance@ = reviveChance;
				reviveOnlyWhenPlayerAlone@ = reviveOnlyWhenPlayerAlone;
			}

			[CompilerGenerated]
			public override string ToString()
			{
				return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<SyncedConfig, string>>((PrintfFormat<FSharpFunc<SyncedConfig, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<SyncedConfig, string>, Unit, string, string, SyncedConfig>("%+A")).Invoke(this);
			}

			[CompilerGenerated]
			public sealed int CompareTo(SyncedConfig obj)
			{
				if (this != null)
				{
					if (obj != null)
					{
						IComparer genericComparer = LanguagePrimitives.GenericComparer;
						int num = reviveChance@;
						int num2 = obj.reviveChance@;
						int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0);
						if (num3 < 0)
						{
							return num3;
						}
						if (num3 > 0)
						{
							return num3;
						}
						genericComparer = LanguagePrimitives.GenericComparer;
						bool flag = reviveOnlyWhenPlayerAlone@;
						bool flag2 = obj.reviveOnlyWhenPlayerAlone@;
						return (flag ? 1 : 0) - (flag2 ? 1 : 0);
					}
					return 1;
				}
				if (obj != null)
				{
					return -1;
				}
				return 0;
			}

			[CompilerGenerated]
			public sealed int CompareTo(object obj)
			{
				return CompareTo((SyncedConfig)obj);
			}

			[CompilerGenerated]
			public sealed int CompareTo(object obj, IComparer comp)
			{
				SyncedConfig syncedConfig = (SyncedConfig)obj;
				if (this != null)
				{
					if ((SyncedConfig)obj != null)
					{
						int num = reviveChance@;
						int num2 = syncedConfig.reviveChance@;
						int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0);
						if (num3 < 0)
						{
							return num3;
						}
						if (num3 > 0)
						{
							return num3;
						}
						bool flag = reviveOnlyWhenPlayerAlone@;
						bool flag2 = syncedConfig.reviveOnlyWhenPlayerAlone@;
						return (flag ? 1 : 0) - (flag2 ? 1 : 0);
					}
					return 1;
				}
				if ((SyncedConfig)obj != null)
				{
					return -1;
				}
				return 0;
			}

			[CompilerGenerated]
			public sealed int GetHashCode(IEqualityComparer comp)
			{
				if (this != null)
				{
					int num = 0;
					num = -1640531527 + ((reviveOnlyWhenPlayerAlone@ ? 1 : 0) + ((num << 6) + (num >> 2)));
					return -1640531527 + (reviveChance@ + ((num << 6) + (num >> 2)));
				}
				return 0;
			}

			[CompilerGenerated]
			public sealed override int GetHashCode()
			{
				return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
			}

			[CompilerGenerated]
			public bool Equals(SyncedConfig obj, IEqualityComparer comp)
			{
				if (this != null)
				{
					if (obj != null)
					{
						if (reviveChance@ == obj.reviveChance@)
						{
							return reviveOnlyWhenPlayerAlone@ == obj.reviveOnlyWhenPlayerAlone@;
						}
						return false;
					}
					return false;
				}
				return obj == null;
			}

			[CompilerGenerated]
			public sealed bool Equals(object obj, IEqualityComparer comp)
			{
				if (obj is SyncedConfig obj2)
				{
					return Equals(obj2, comp);
				}
				return false;
			}

			[CompilerGenerated]
			public sealed bool Equals(SyncedConfig obj)
			{
				if (this != null)
				{
					if (obj != null)
					{
						if (reviveChance@ == obj.reviveChance@)
						{
							return reviveOnlyWhenPlayerAlone@ == obj.reviveOnlyWhenPlayerAlone@;
						}
						return false;
					}
					return false;
				}
				return obj == null;
			}

			[CompilerGenerated]
			public sealed override bool Equals(object obj)
			{
				if (obj is SyncedConfig obj2)
				{
					return Equals(obj2);
				}
				return false;
			}
		}

		[Serializable]
		[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
		[DebuggerDisplay("{__DebugDisplay(),nq}")]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public sealed class SyncAction : IEquatable<SyncAction>, IStructuralEquatable, IComparable<SyncAction>, IComparable, IStructuralComparable
		{
			public static class Tags
			{
				public const int RequestSync = 0;

				public const int ReceiveSync = 1;
			}

			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal static readonly SyncAction _unique_RequestSync = new SyncAction(0);

			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal static readonly SyncAction _unique_ReceiveSync = new SyncAction(1);

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[field: DebuggerNonUserCode]
			public int Tag
			{
				[DebuggerNonUserCode]
				get;
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			public static SyncAction RequestSync
			{
				[CompilationMapping(/*Could not decode attribute arguments.*/)]
				get
				{
					return _unique_RequestSync;
				}
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			public bool IsRequestSync
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return Tag == 0;
				}
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			public static SyncAction ReceiveSync
			{
				[CompilationMapping(/*Could not decode attribute arguments.*/)]
				get
				{
					return _unique_ReceiveSync;
				}
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			public bool IsReceiveSync
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return Tag == 1;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicNestedTypes | DynamicallyAccessedMemberTypes.NonPublicNestedTypes | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(SyncAction))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal SyncAction(int _tag)
			{
				this._tag = _tag;
			}

			[SpecialName]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal object __DebugDisplay()
			{
				return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<SyncAction, string>>((PrintfFormat<FSharpFunc<SyncAction, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<SyncAction, string>, Unit, string, string, string>("%+0.8A")).Invoke(this);
			}

			[CompilerGenerated]
			public override string ToString()
			{
				return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<SyncAction, string>>((PrintfFormat<FSharpFunc<SyncAction, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<SyncAction, string>, Unit, string, string, SyncAction>("%+A")).Invoke(this);
			}

			[CompilerGenerated]
			public sealed int CompareTo(SyncAction obj)
			{
				if (this != null)
				{
					if (obj != null)
					{
						int tag = _tag;
						int tag2 = obj._tag;
						if (tag == tag2)
						{
							return 0;
						}
						return tag - tag2;
					}
					return 1;
				}
				if (obj != null)
				{
					return -1;
				}
				return 0;
			}

			[CompilerGenerated]
			public sealed int CompareTo(object obj)
			{
				return CompareTo((SyncAction)obj);
			}

			[CompilerGenerated]
			public sealed int CompareTo(object obj, IComparer comp)
			{
				SyncAction syncAction = (SyncAction)obj;
				if (this != null)
				{
					if ((SyncAction)obj != null)
					{
						int tag = _tag;
						int tag2 = syncAction._tag;
						if (tag == tag2)
						{
							return 0;
						}
						return tag - tag2;
					}
					return 1;
				}
				if ((SyncAction)obj != null)
				{
					return -1;
				}
				return 0;
			}

			[CompilerGenerated]
			public sealed int GetHashCode(IEqualityComparer comp)
			{
				return this?._tag ?? 0;
			}

			[CompilerGenerated]
			public sealed override int GetHashCode()
			{
				return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
			}

			[CompilerGenerated]
			public bool Equals(SyncAction obj, IEqualityComparer comp)
			{
				if (this != null)
				{
					if (obj != null)
					{
						int tag = _tag;
						int tag2 = obj._tag;
						return tag == tag2;
					}
					return false;
				}
				return obj == null;
			}

			[CompilerGenerated]
			public sealed bool Equals(object obj, IEqualityComparer comp)
			{
				if (obj is SyncAction obj2)
				{
					return Equals(obj2, comp);
				}
				return false;
			}

			[CompilerGenerated]
			public sealed bool Equals(SyncAction obj)
			{
				if (this != null)
				{
					if (obj != null)
					{
						int tag = _tag;
						int tag2 = obj._tag;
						return tag == tag2;
					}
					return false;
				}
				return obj == null;
			}

			[CompilerGenerated]
			public sealed override bool Equals(object obj)
			{
				if (obj is SyncAction obj2)
				{
					return Equals(obj2);
				}
				return false;
			}
		}

		[Serializable]
		internal sealed class getConfig@65 : FSharpFunc<Unit, SyncedConfig>
		{
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public SyncedConfig k;

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal getConfig@65(SyncedConfig k)
			{
				this.k = k;
			}

			public override SyncedConfig Invoke(Unit _arg1)
			{
				return k;
			}
		}

		[Serializable]
		internal sealed class onReceiveSync@116 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>
		{
			internal static readonly onReceiveSync@116 @_instance = new onReceiveSync@116();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal onReceiveSync@116()
			{
			}

			public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1);
			}
		}

		[Serializable]
		internal sealed class onReceiveSync@120-1 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>
		{
			internal static readonly onReceiveSync@120-1 @_instance = new onReceiveSync@120-1();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal onReceiveSync@120-1()
			{
			}

			public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1);
			}
		}

		[Serializable]
		internal sealed class onReceiveSync@124-2 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>
		{
			internal static readonly onReceiveSync@124-2 @_instance = new onReceiveSync@124-2();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal onReceiveSync@124-2()
			{
			}

			public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1);
			}
		}

		[Serializable]
		internal sealed class callback@135 : FSharpFunc<ulong, FastBufferReader, Unit>
		{
			internal static readonly callback@135 @_instance = new callback@135();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal callback@135()
			{
			}

			public override Unit Invoke(ulong clientId, FastBufferReader arg10@)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				onRequestSync<FastBufferReader>(clientId, arg10@);
				return null;
			}
		}

		[Serializable]
		internal sealed class callback@136-1 : FSharpFunc<ulong, FastBufferReader, Unit>
		{
			internal static readonly callback@136-1 @_instance = new callback@136-1();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal callback@136-1()
			{
			}

			public override Unit Invoke(ulong arg00@, FastBufferReader reader)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				onReceiveSync(arg00@, reader);
				return null;
			}
		}

		[Serializable]
		[SpecialName]
		[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal sealed class registerHandler@137
		{
			public FSharpFunc<ulong, FSharpFunc<FastBufferReader, Unit>> callback;

			public registerHandler@137(FSharpFunc<ulong, FSharpFunc<FastBufferReader, Unit>> callback)
			{
				this.callback = callback;
				base..ctor();
			}

			internal void Invoke(ulong delegateArg0, FastBufferReader delegateArg1)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				FSharpFunc<ulong, FastBufferReader>.InvokeFast<Unit>(callback, delegateArg0, delegateArg1);
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static FSharpOption<LocalConfig> localConfig
		{
			get
			{
				return <StartupCode$MirageRevive>.$Mirage.Revive.Domain.Config.localConfig@45;
			}
			set
			{
				<StartupCode$MirageRevive>.$Mirage.Revive.Domain.Config.localConfig@45 = value;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static FSharpOption<SyncedConfig> syncedConfig
		{
			get
			{
				return <StartupCode$MirageRevive>.$Mirage.Revive.Domain.Config.syncedConfig@46;
			}
			set
			{
				<StartupCode$MirageRevive>.$Mirage.Revive.Domain.Config.syncedConfig@46 = value;
			}
		}

		internal static SyncedConfig toSyncedConfig()
		{
			return new SyncedConfig(localConfig.Value.ReviveChance@.Value, localConfig.Value.ReviveOnlyWhenPlayerAlone@.Value);
		}

		internal static string toNamedMessage(SyncAction _arg1)
		{
			if (_arg1.Tag != 1)
			{
				return "qwbarch.MirageRevive" + "_OnRequestConfigSync";
			}
			return "qwbarch.MirageRevive" + "_OnReceiveConfigSync";
		}

		internal static CustomMessagingManager messageManager()
		{
			return NetworkManager.Singleton.CustomMessagingManager;
		}

		internal static bool isClient()
		{
			return NetworkManager.Singleton.IsClient;
		}

		internal static bool isHost()
		{
			return NetworkManager.Singleton.IsHost;
		}

		internal static void initConfig(ConfigFile configFile)
		{
			localConfig = FSharpOption<LocalConfig>.Some(new LocalConfig(configFile));
		}

		public static SyncedConfig getConfig()
		{
			SyncedConfig k = toSyncedConfig();
			FSharpFunc<Unit, SyncedConfig> val = new getConfig@65(k);
			FSharpOption<SyncedConfig> val2 = syncedConfig;
			if (val2 == null)
			{
				return val.Invoke((Unit)null);
			}
			return val2.Value;
		}

		internal static byte[] serializeToBytes<A>(A value)
		{
			DataContractSerializer dataContractSerializer = new DataContractSerializer(typeof(A));
			using MemoryStream memoryStream = new MemoryStream();
			try
			{
				dataContractSerializer.WriteObject(memoryStream, value);
				return memoryStream.ToArray();
			}
			catch (object obj)
			{
				Exception ex = (Exception)obj;
				Logger.logError.Invoke(PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, Exception>("Failed to serialize value: %P()", new object[1] { ex }, (Type[])null)));
				return null;
			}
		}

		internal static A deserializeFromBytes<A>(byte[] data)
		{
			DataContractSerializer dataContractSerializer = new DataContractSerializer(typeof(A));
			using MemoryStream stream = new MemoryStream(data);
			try
			{
				return IntrinsicFunctions.UnboxGeneric<A>(dataContractSerializer.ReadObject(stream));
			}
			catch (object obj)
			{
				Exception ex = (Exception)obj;
				Logger.logError.Invoke(PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, Exception>("Failed to deserialize bytes: %P()", new object[1] { ex }, (Type[])null)));
				A result = default(A);
				return result;
			}
		}

		[CompilationArgumentCounts(new int[] { 1, 1, 1 })]
		internal static void sendMessage(SyncAction action, ulong clientId, FastBufferWriter stream)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			NetworkDelivery val = (NetworkDelivery)((((FastBufferWriter)(ref stream)).Capacity <= 1300) ? 2 : 4);
			NetworkManager.Singleton.CustomMessagingManager.SendNamedMessage(toNamedMessage(action), clientId, stream, val);
		}

		internal static void revertSync()
		{
			syncedConfig = null;
		}

		internal unsafe static void requestSync()
		{
			//IL_0015: 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)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkManager.Singleton.IsClient)
			{
				FastBufferWriter stream = new FastBufferWriter(sizeof(int), (Allocator)2, -1);
				try
				{
					sendMessage(SyncAction.RequestSync, 0uL, stream);
				}
				finally
				{
					((IDisposable)(FastBufferWriter)(ref stream)).Dispose();
				}
			}
		}

		[CompilationArgumentCounts(new int[] { 1, 1 })]
		internal unsafe static void onRequestSync<a>(ulong clientId, a _arg1)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkManager.Singleton.IsHost)
			{
				return;
			}
			byte[] array = serializeToBytes(getConfig());
			int num = array.Length;
			FastBufferWriter stream = new FastBufferWriter(num + sizeof(int), (Allocator)2, -1);
			try
			{
				ForPrimitives val = default(ForPrimitives);
				((FastBufferWriter)(ref stream)).WriteValueSafe<int>(ref num, val);
				((FastBufferWriter)(ref stream)).WriteBytesSafe(array, -1, 0);
				sendMessage(SyncAction.ReceiveSync, clientId, stream);
			}
			catch (object obj)
			{
				Exception ex = (Exception)obj;
				Logger.logError.Invoke(PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, Exception>("Failed during onRequestSync: %P()", new object[1] { ex }, (Type[])null)));
			}
			finally
			{
				((IDisposable)(FastBufferWriter)(ref stream)).Dispose();
			}
		}

		[CompilerGenerated]
		internal static FSharpResult<Unit, string> f@1-1(FastBufferReader reader, FSharpRef<int> bytesLength, Unit unitVar0)
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			byte[] array = ArrayModule.ZeroCreate<byte>(bytesLength.contents);
			((FastBufferReader)(ref reader)).ReadBytesSafe(ref new FSharpRef<byte[]>(array).contents@, bytesLength.contents, 0);
			syncedConfig = FSharpOption<SyncedConfig>.Some(deserializeFromBytes<SyncedConfig>(array));
			FSharpResult<Unit, string> item = default(FSharpResult<Unit, string>);
			return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)onReceiveSync@124-2.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, item), (Unit)null);
		}

		[CompilerGenerated]
		internal static FSharpResult<Unit, string> f@1(FastBufferReader reader, Unit unitVar0)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: 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_0070: Unknown result type (might be due to invalid IL or missing references)
			FSharpRef<int> val = new FSharpRef<int>(0);
			ForPrimitives val2 = default(ForPrimitives);
			((FastBufferReader)(ref reader)).ReadValueSafe<int>(ref val.contents@, val2);
			FSharpResult<Unit, string> item = default(FSharpResult<Unit, string>);
			FSharpResult<Unit, string> val3 = (((FastBufferReader)(ref reader)).TryBeginRead(val.contents) ? FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)onReceiveSync@120-1.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, item), (Unit)null) : FSharpResult<Unit, string>.NewError("onReceiveSync failed. Host could not synchronize config."));
			Bind val4 = null;
			FSharpResult<Unit, string> val5 = default(FSharpResult<Unit, string>);
			item = val5;
			if (val3.Tag != 0)
			{
				return FSharpResult<Unit, string>.NewError(val3.ErrorValue);
			}
			return f@1-1(reader, val, val3.ResultValue);
		}

		[CompilationArgumentCounts(new int[] { 1, 1 })]
		internal unsafe static void onReceiveSync<a>(a _arg1, FastBufferReader reader)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: 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_0074: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkManager.Singleton.IsHost)
			{
				MonadFxStrictBuilder<FSharpResult<Unit, string>> val = new MonadFxStrictBuilder<FSharpResult<Unit, string>>();
				FSharpResult<Unit, string> item = default(FSharpResult<Unit, string>);
				FSharpResult<Unit, string> val2 = (((FastBufferReader)(ref reader)).TryBeginRead(sizeof(int)) ? FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)onReceiveSync@116.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, item), (Unit)null) : FSharpResult<Unit, string>.NewError("onReceiveSync failed while reading beginning of buffer."));
				Bind val3 = null;
				FSharpResult<Unit, string> val4 = default(FSharpResult<Unit, string>);
				item = val4;
				FSharpResult<Unit, string> val5 = ((val2.Tag == 0) ? f@1(reader, val2.ResultValue) : FSharpResult<Unit, string>.NewError(val2.ErrorValue));
				if (val5.Tag == 1)
				{
					Logger.logError.Invoke(val5.ErrorValue);
				}
			}
		}

		internal static void registerHandler(SyncAction action)
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Expected O, but got Unknown
			string text = toNamedMessage(action);
			object @_instance;
			if (action.Tag != 1)
			{
				syncedConfig = FSharpOption<SyncedConfig>.Some(toSyncedConfig());
				@_instance = callback@135.@_instance;
			}
			else
			{
				@_instance = callback@136-1.@_instance;
			}
			FSharpFunc<ulong, FSharpFunc<FastBufferReader, Unit>> callback = (FSharpFunc<ulong, FSharpFunc<FastBufferReader, Unit>>)@_instance;
			HandleNamedMessageDelegate val = new HandleNamedMessageDelegate(new registerHandler@137(callback).Invoke);
			NetworkManager.Singleton.CustomMessagingManager.RegisterNamedMessageHandler(text, val);
		}
	}
}
namespace <StartupCode$MirageRevive>.$Mirage.Revive.Domain
{
	internal static class Config
	{
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal static FSharpOption<Mirage.Revive.Domain.Config.LocalConfig> localConfig@45;

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal static FSharpOption<Mirage.Revive.Domain.Config.SyncedConfig> syncedConfig@46;

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		[CompilerGenerated]
		[DebuggerNonUserCode]
		internal static int init@;

		static Config()
		{
			localConfig@45 = null;
			syncedConfig@46 = null;
		}
	}
}
namespace Mirage.Revive.Domain
{
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public static class Logger
	{
		[Serializable]
		[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Size = 1)]
		[Struct]
		[DebuggerDisplay("{__DebugDisplay(),nq}")]
		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal struct LogType : IEquatable<LogType>, IStructuralEquatable, IComparable<LogType>, IComparable, IStructuralComparable
		{
			internal static class Tags
			{
				public const int LogInfo = 0;

				public const int LogDebug = 1;

				public const int LogWarning = 2;

				public const int LogError = 3;
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[field: DebuggerNonUserCode]
			internal int Tag
			{
				[DebuggerNonUserCode]
				get;
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			internal static LogType LogInfo
			{
				[CompilationMapping(/*Could not decode attribute arguments.*/)]
				get
				{
					return new LogType(0);
				}
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			internal bool IsLogInfo
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return Tag == 0;
				}
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			internal static LogType LogDebug
			{
				[CompilationMapping(/*Could not decode attribute arguments.*/)]
				get
				{
					return new LogType(1);
				}
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			internal bool IsLogDebug
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return Tag == 1;
				}
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			internal static LogType LogWarning
			{
				[CompilationMapping(/*Could not decode attribute arguments.*/)]
				get
				{
					return new LogType(2);
				}
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			internal bool IsLogWarning
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return Tag == 2;
				}
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			internal static LogType LogError
			{
				[CompilationMapping(/*Could not decode attribute arguments.*/)]
				get
				{
					return new LogType(3);
				}
			}

			[CompilerGenerated]
			[DebuggerNonUserCode]
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			internal bool IsLogError
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return Tag == 3;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(LogType))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal LogType(int _tag)
			{
				this._tag = _tag;
			}

			[SpecialName]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal object __DebugDisplay()
			{
				return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<LogType, string>>((PrintfFormat<FSharpFunc<LogType, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<LogType, string>, Unit, string, string, string>("%+0.8A")).Invoke(this);
			}

			[CompilerGenerated]
			public override string ToString()
			{
				return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<LogType, string>>((PrintfFormat<FSharpFunc<LogType, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<LogType, string>, Unit, string, string, LogType>("%+A")).Invoke(this);
			}

			[CompilerGenerated]
			public sealed int CompareTo(LogType obj)
			{
				int tag = _tag;
				int tag2 = obj._tag;
				if (tag == tag2)
				{
					return 0;
				}
				return tag - tag2;
			}

			[CompilerGenerated]
			public sealed int CompareTo(object obj)
			{
				return CompareTo((LogType)obj);
			}

			[CompilerGenerated]
			public sealed int CompareTo(object obj, IComparer comp)
			{
				LogType logType = (LogType)obj;
				int tag = _tag;
				int tag2 = logType._tag;
				if (tag == tag2)
				{
					return 0;
				}
				return tag - tag2;
			}

			[CompilerGenerated]
			public sealed int GetHashCode(IEqualityComparer comp)
			{
				return _tag;
			}

			[CompilerGenerated]
			public sealed override int GetHashCode()
			{
				return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
			}

			[CompilerGenerated]
			internal bool Equals(LogType obj, IEqualityComparer comp)
			{
				int tag = _tag;
				int tag2 = obj._tag;
				return tag == tag2;
			}

			[CompilerGenerated]
			public sealed bool Equals(object obj, IEqualityComparer comp)
			{
				if (obj is LogType obj2)
				{
					return Equals(obj2, comp);
				}
				return false;
			}

			[CompilerGenerated]
			public sealed bool Equals(LogType obj)
			{
				int tag = _tag;
				int tag2 = obj._tag;
				return tag == tag2;
			}

			[CompilerGenerated]
			public sealed override bool Equals(object obj)
			{
				if (obj is LogType)
				{
					return Equals((LogType)obj);
				}
				return false;
			}
		}

		[Serializable]
		internal sealed class logMessage@12 : FSharpFunc<string, Unit>
		{
			internal static readonly logMessage@12 @_instance = new logMessage@12();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal logMessage@12()
			{
			}

			public override Unit Invoke(string data)
			{
				logger.LogInfo((object)data);
				return null;
			}
		}

		[Serializable]
		internal sealed class logMessage@13-1 : FSharpFunc<string, Unit>
		{
			internal static readonly logMessage@13-1 @_instance = new logMessage@13-1();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal logMessage@13-1()
			{
			}

			public override Unit Invoke(string data)
			{
				logger.LogDebug((object)data);
				return null;
			}
		}

		[Serializable]
		internal sealed class logMessage@14-2 : FSharpFunc<string, Unit>
		{
			internal static readonly logMessage@14-2 @_instance = new logMessage@14-2();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal logMessage@14-2()
			{
			}

			public override Unit Invoke(string data)
			{
				logger.LogWarning((object)data);
				return null;
			}
		}

		[Serializable]
		internal sealed class logMessage@15-3 : FSharpFunc<string, Unit>
		{
			internal static readonly logMessage@15-3 @_instance = new logMessage@15-3();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal logMessage@15-3()
			{
			}

			public override Unit Invoke(string data)
			{
				logger.LogError((object)data);
				return null;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static ManualLogSource logger => <StartupCode$MirageRevive>.$Mirage.Revive.Domain.Logger.logger@8;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static FSharpFunc<string, Unit> logInfo => <StartupCode$MirageRevive>.$Mirage.Revive.Domain.Logger.logInfo@17;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static FSharpFunc<string, Unit> logDebug => <StartupCode$MirageRevive>.$Mirage.Revive.Domain.Logger.logDebug@18;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static FSharpFunc<string, Unit> logWarning => <StartupCode$MirageRevive>.$Mirage.Revive.Domain.Logger.logWarning@19;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal static FSharpFunc<string, Unit> logError => <StartupCode$MirageRevive>.$Mirage.Revive.Domain.Logger.logError@20;

		internal static FSharpFunc<string, Unit> logMessage(LogType logType)
		{
			return (FSharpFunc<string, Unit>)(logType.Tag switch
			{
				1 => logMessage@13-1.@_instance, 
				2 => logMessage@14-2.@_instance, 
				3 => logMessage@15-3.@_instance, 
				_ => logMessage@12.@_instance, 
			});
		}
	}
}
namespace <StartupCode$MirageRevive>.$Mirage.Revive.Domain
{
	internal static class Logger
	{
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal static readonly ManualLogSource logger@8;

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal static readonly FSharpFunc<string, Unit> logInfo@17;

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal static readonly FSharpFunc<string, Unit> logDebug@18;

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal static readonly FSharpFunc<string, Unit> logWarning@19;

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal static readonly FSharpFunc<string, Unit> logError@20;

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		[CompilerGenerated]
		[DebuggerNonUserCode]
		internal static int init@;

		static Logger()
		{
			logger@8 = Logger.CreateLogSource("qwbarch.MirageRevive");
			logInfo@17 = Mirage.Revive.Domain.Logger.logMessage(Mirage.Revive.Domain.Logger.LogType.LogInfo);
			logDebug@18 = Mirage.Revive.Domain.Logger.logMessage(Mirage.Revive.Domain.Logger.LogType.LogDebug);
			logWarning@19 = Mirage.Revive.Domain.Logger.logMessage(Mirage.Revive.Domain.Logger.LogType.LogWarning);
			logError@20 = Mirage.Revive.Domain.Logger.logMessage(Mirage.Revive.Domain.Logger.LogType.LogError);
		}
	}
}
namespace Mirage.Revive.Domain
{
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public static class Netcode
	{
		[Serializable]
		internal sealed class initNetcodePatcher@41 : FSharpFunc<Type, MethodInfo[]>
		{
			internal static readonly initNetcodePatcher@41 @_instance = new initNetcodePatcher@41();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal initNetcodePatcher@41()
			{
			}

			public override MethodInfo[] Invoke(Type _arg1)
			{
				return _arg1.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
			}
		}

		[Serializable]
		internal sealed class initNetcodePatcher@41-1 : FSharpFunc<MethodInfo, Unit>
		{
			internal static readonly initNetcodePatcher@41-1 @_instance = new initNetcodePatcher@41-1();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal initNetcodePatcher@41-1()
			{
			}

			public override Unit Invoke(MethodInfo method)
			{
				invokeMethod(method);
				return null;
			}
		}

		[Literal]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal const BindingFlags flags = BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic;

		internal static void invokeMethod(MethodInfo method)
		{
			object[] customAttributes = method.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
			if (customAttributes.Length > 0)
			{
				object obj = method.Invoke(null, null);
			}
		}

		public static void initNetcodePatcher()
		{
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			FSharpFunc<Type, MethodInfo[]> @_instance;
			@_instance = initNetcodePatcher@41.@_instance;
			Bind val = null;
			MethodInfo[] array = null;
			MethodInfo[] array2 = ArrayModule.Collect<Type, MethodInfo>(@_instance, types);
			Iterate val2 = null;
			Iterate.Iterate<MethodInfo>(array2, (FSharpFunc<MethodInfo, Unit>)initNetcodePatcher@41-1.@_instance);
		}
	}
}
namespace <StartupCode$MirageRevive>.$Mirage.Revive.Domain
{
	internal static class Netcode
	{
	}
}
namespace Mirage.Revive
{
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public static class Compatibility
	{
		[Serializable]
		internal sealed class initLobbyCompatibility@14 : FSharpFunc<Unit, FSharpAsync<Unit>>
		{
			internal static readonly initLobbyCompatibility@14 @_instance = new initLobbyCompatibility@14();

			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal initLobbyCompatibility@14()
			{
			}

			public override FSharpAsync<Unit> Invoke(Unit unitVar)
			{
				PluginHelper.RegisterPlugin("MirageRevive", Version.Parse("1.3.0"), (CompatibilityLevel)2, (VersionStrictness)2);
				return ExtraTopLevelOperators.DefaultAsyncBuilder.Zero();
			}
		}

		public static void initLobbyCompatibility()
		{
			if (Chainloader.PluginInfos.ContainsKey("BMX.LobbyCompatibility"))
			{
				FSharpAsync<Unit> val = ExtraTopLevelOperators.DefaultAsyncBuilder.Delay<Unit>((FSharpFunc<Unit, FSharpAsync<Unit>>)initLobbyCompatibility@14.@_instance);
				FSharpAsync.RunSynchronously<Unit>(val, (FSharpOption<int>)null, (FSharpOption<CancellationToken>)null);
			}
		}
	}
}
namespace <StartupCode$MirageRevive>.$Mirage.Revive
{
	internal static class Compatibility
	{
	}
}
namespace Mirage.Revive
{
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public static class PluginInfo
	{
		[Literal]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public const string pluginName = "MirageRevive";

		[Literal]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public const string pluginId = "qwbarch.MirageRevive";

		[Literal]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public const string pluginVersion = "1.3.0";
	}
}
namespace <StartupCode$MirageRevive>.$Mirage.Revive
{
	internal static class PluginInfo
	{
	}
}
[CompilationMapping(/*Could not decode attribute arguments.*/)]
public static class AssemblyInfo
{
}
namespace <StartupCode$MirageRevive>
{
	internal static class $AssemblyInfo
	{
	}
}
namespace <StartupCode$MirageRevive>.$.NETStandard,Version=v2.1
{
	internal static class AssemblyAttributes
	{
	}
}
namespace <StartupCode$MirageRevive>.$MirageRevive
{
	internal static class AssemblyInfo
	{
	}
}
namespace System.Diagnostics.CodeAnalysis
{
	[Serializable]
	[Flags]
	[CompilerGenerated]
	[DebuggerNonUserCode]
	internal enum DynamicallyAccessedMemberTypes
	{
		All = -1,
		None = 0,
		PublicParameterlessConstructor = 1,
		PublicConstructors = 3,
		NonPublicConstructors = 4,
		PublicMethods = 8,
		NonPublicMethods = 0x10,
		PublicFields = 0x20,
		NonPublicFields = 0x40,
		PublicNestedTypes = 0x80,
		NonPublicNestedTypes = 0x100,
		PublicProperties = 0x200,
		NonPublicProperties = 0x400,
		PublicEvents = 0x800,
		NonPublicEvents = 0x1000,
		Interfaces = 0x2000
	}
	[CompilerGenerated]
	internal class DynamicDependencyAttribute : Attribute
	{
		[CompilerGenerated]
		[DebuggerNonUserCode]
		private DynamicallyAccessedMemberTypes MemberType@;

		[CompilerGenerated]
		[DebuggerNonUserCode]
		private Type Type@;

		[CompilerGenerated]
		[DebuggerNonUserCode]
		public DynamicallyAccessedMemberTypes MemberType
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return MemberType@;
			}
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		public Type Type
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Type@;
			}
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes MemberType, Type Type)
		{
			MemberType@ = MemberType;
			Type@ = Type;
		}
	}
}
namespace MirageRevive.NetcodePatcher
{
	[AttributeUsage(AttributeTargets.Module)]
	internal class NetcodePatchedAssemblyAttribute : Attribute
	{
	}
}