Decompiled source of Emergency Dice Updated Experimental v1.2.6

MysteryDice.dll

Decompiled 2 months ago
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using KaimiraGames;
using LethalLib.Modules;
using MysteryDice;
using MysteryDice.Dice;
using MysteryDice.Effects;
using MysteryDice.Patches;
using MysteryDice.Visual;
using TMPro;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.Events;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("MysteryDice")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MysteryDice")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c247d947-5d1a-411b-8d87-6f0bc33e5234")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
internal class <Module>
{
	static <Module>()
	{
	}
}
public class ColorGradient : MonoBehaviour
{
	public Renderer CubeRenderer;

	public Renderer MoonRenderer;

	public Renderer SunRenderer;

	public Color NightColor = new Color(0.40392157f, 33f / 85f, 0.8862745f);

	public Color DayColor = new Color(1f, 0.81960785f, 0f);

	private float ColorTimer = 0f;

	private void Start()
	{
		CubeRenderer = ((Component)this).GetComponent<Renderer>();
		SunRenderer = ((Component)((Component)this).transform.Find("Sun")).GetComponent<Renderer>();
		MoonRenderer = ((Component)((Component)this).transform.Find("Moon")).GetComponent<Renderer>();
	}

	private void Update()
	{
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: 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_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0124: Unknown result type (might be due to invalid IL or missing references)
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_017a: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
		ColorTimer -= Time.deltaTime;
		if (!(ColorTimer >= 0f))
		{
			ColorTimer = 1f;
			Color val = DayColor + (NightColor - DayColor) * TimeOfDay.Instance.normalizedTimeOfDay;
			CubeRenderer.material.SetColor("_BaseColor", val);
			CubeRenderer.material.SetColor("_EmissiveColor", val * 3f);
			float normalizedTimeOfDay = TimeOfDay.Instance.normalizedTimeOfDay;
			float num = 1f - normalizedTimeOfDay;
			MoonRenderer.material.SetColor("_BaseColor", new Color(1f, 1f, 1f, normalizedTimeOfDay));
			SunRenderer.material.SetColor("_BaseColor", new Color(1f, 1f, 1f, num));
			MoonRenderer.material.SetColor("_UnlitColor", new Color(1f, 1f, 1f, normalizedTimeOfDay));
			SunRenderer.material.SetColor("_UnlitColor", new Color(1f, 1f, 1f, num));
			MoonRenderer.material.SetColor("_MainColor", new Color(1f, 1f, 1f, normalizedTimeOfDay));
			SunRenderer.material.SetColor("_MainColor", new Color(1f, 1f, 1f, num));
		}
	}
}
public class CycleSigns : MonoBehaviour
{
	private class DiceVisuals
	{
		public Sprite Sprite;

		public Color ModelColor;

		public Color EmissionColor;

		public float Emission;

		public DiceVisuals(Sprite sprite, Color color, Color emissionColor, float emission)
		{
			//IL_0010: 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_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			Sprite = sprite;
			ModelColor = color;
			EmissionColor = emissionColor;
			Emission = emission;
		}
	}

	public float CycleTime = 1f;

	private float CurrentTimer = 0f;

	private int CurrentSprite = 0;

	private bool Stop = false;

	private SpriteRenderer SignSpriteRenderer;

	private Renderer DiceRenderer;

	private List<DiceVisuals> Visuals = new List<DiceVisuals>();

	private void Start()
	{
		//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_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		Visuals.Add(new DiceVisuals(global::MysteryDice.MysteryDice.WarningJester, Color.yellow, Color.yellow, 100f));
		Visuals.Add(new DiceVisuals(global::MysteryDice.MysteryDice.WarningBracken, Color.yellow, Color.yellow, 100f));
		Visuals.Add(new DiceVisuals(global::MysteryDice.MysteryDice.WarningDeath, Color.red, Color.red, 100f));
		Visuals.Add(new DiceVisuals(global::MysteryDice.MysteryDice.WarningLuck, Color.green, Color.green, 300f));
		SignSpriteRenderer = ((Component)((Component)this).transform.Find("Emergency Sign")).gameObject.GetComponent<SpriteRenderer>();
		DiceRenderer = ((Component)this).gameObject.GetComponent<Renderer>();
	}

	private void Update()
	{
		if (!Stop)
		{
			CurrentTimer -= Time.deltaTime;
			if (CurrentTimer <= 0f)
			{
				CurrentTimer = CycleTime;
				CycleSprite();
			}
		}
	}

	private void CycleSprite()
	{
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
		CurrentSprite++;
		if (CurrentSprite >= Visuals.Count)
		{
			CurrentSprite = 0;
		}
		SignSpriteRenderer.sprite = Visuals[CurrentSprite].Sprite;
		DiceRenderer.material.SetColor("_BaseColor", Visuals[CurrentSprite].ModelColor);
		DiceRenderer.material.SetColor("_EmissiveColor", Visuals[CurrentSprite].EmissionColor * Visuals[CurrentSprite].Emission);
	}

	public void HideSigns()
	{
		Stop = true;
		((Component)SignSpriteRenderer).gameObject.SetActive(false);
	}
}
public class Blinking : MonoBehaviour
{
	public float BlinkingTime;

	private float BlinkingTimer = 0f;

	private GameObject GlowSign;

	private GameObject NormalSign;

	private bool Stop = false;

	public bool Glow { get; private set; }

	private void Start()
	{
		BlinkingTime = 0.5f;
		Glow = false;
		NormalSign = ((Component)((Component)this).transform.Find("Emergency Sign")).gameObject;
		GlowSign = ((Component)((Component)this).transform.Find("Emergency Sign Glowing")).gameObject;
	}

	public void HideSigns()
	{
		Stop = true;
		NormalSign.SetActive(false);
		GlowSign.SetActive(false);
	}

	private void Update()
	{
		if (Stop)
		{
			return;
		}
		BlinkingTimer -= Time.deltaTime;
		if (BlinkingTimer <= 0f)
		{
			BlinkingTimer = BlinkingTime;
			if (Glow)
			{
				Glow = false;
				NormalSign.SetActive(true);
				GlowSign.SetActive(false);
			}
			else
			{
				Glow = true;
				NormalSign.SetActive(false);
				GlowSign.SetActive(true);
			}
		}
	}
}
public class Spinner : MonoBehaviour
{
	public bool IsBeingUsed = false;

	private float SpinVelocity = 0f;

	private float SpinAcceleration = 100f;

	private float NormalSpinVelocity = 90f;

	private float CurrentTimer = 0f;

	private float SpinningTime = 3f;

	private Quaternion InitialRotation;

	private Quaternion FromRotation;

	private void Start()
	{
		//IL_0008: 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)
		InitialRotation = ((Component)this).transform.rotation;
	}

	public void StartHyperSpinning(float spinTime)
	{
		IsBeingUsed = true;
		SpinVelocity = NormalSpinVelocity;
		SpinAcceleration = 1000f;
		SpinningTime = spinTime;
	}

	public void StopHyperSpinning()
	{
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		IsBeingUsed = false;
		SpinVelocity = 0f;
		SpinAcceleration = 0f;
		FromRotation = ((Component)this).transform.rotation;
	}

	private void Update()
	{
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c1: 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)
		if (IsBeingUsed)
		{
			CurrentTimer += Time.deltaTime;
			if (CurrentTimer >= SpinningTime)
			{
				StopHyperSpinning();
			}
		}
		if (!IsBeingUsed)
		{
			((Component)this).transform.Rotate(Vector3.up, NormalSpinVelocity * Time.deltaTime);
			return;
		}
		SpinVelocity += SpinAcceleration * Time.deltaTime;
		((Component)this).transform.Rotate(Vector3.up, SpinVelocity * Time.deltaTime);
		((Component)this).transform.Rotate(Vector3.forward, SpinVelocity * Time.deltaTime);
		((Component)this).transform.Rotate(Vector3.right, SpinVelocity * Time.deltaTime);
	}
}
namespace KaimiraGames
{
	public class WeightedList<T> : IEnumerable<T>, IEnumerable
	{
		private readonly List<T> _list = new List<T>();

		private readonly List<int> _weights = new List<int>();

		private readonly List<int> _probabilities = new List<int>();

		private readonly List<int> _alias = new List<int>();

		private readonly Random _rand;

		private int _totalWeight;

		private bool _areAllProbabilitiesIdentical = false;

		private int _minWeight;

		private int _maxWeight;

		public WeightErrorHandlingType BadWeightErrorHandling { get; set; } = WeightErrorHandlingType.SetWeightToOne;


		public int TotalWeight => _totalWeight;

		public int MinWeight => _minWeight;

		public int MaxWeight => _maxWeight;

		public IReadOnlyList<T> Items => _list.AsReadOnly();

		public T this[int index] => _list[index];

		public int Count => _list.Count;

		public WeightedList(Random rand = null)
		{
			_rand = rand ?? new Random();
		}

		public WeightedList(ICollection<WeightedListItem<T>> listItems, Random rand = null)
		{
			_rand = rand ?? new Random();
			foreach (WeightedListItem<T> listItem in listItems)
			{
				_list.Add(listItem._item);
				_weights.Add(listItem._weight);
			}
			Recalculate();
		}

		public T Next()
		{
			if (Count == 0)
			{
				return default(T);
			}
			int index = _rand.Next(Count);
			if (_areAllProbabilitiesIdentical)
			{
				return _list[index];
			}
			int num = _rand.Next(_totalWeight);
			return (num < _probabilities[index]) ? _list[index] : _list[_alias[index]];
		}

		public void AddWeightToAll(int weight)
		{
			if (weight + _minWeight <= 0 && BadWeightErrorHandling == WeightErrorHandlingType.ThrowExceptionOnAdd)
			{
				throw new ArgumentException($"Subtracting {-1 * weight} from all items would set weight to non-positive for at least one element.");
			}
			for (int i = 0; i < Count; i++)
			{
				_weights[i] = FixWeight(_weights[i] + weight);
			}
			Recalculate();
		}

		public void SubtractWeightFromAll(int weight)
		{
			AddWeightToAll(weight * -1);
		}

		public void SetWeightOfAll(int weight)
		{
			if (weight <= 0 && BadWeightErrorHandling == WeightErrorHandlingType.ThrowExceptionOnAdd)
			{
				throw new ArgumentException("Weight cannot be non-positive.");
			}
			for (int i = 0; i < Count; i++)
			{
				_weights[i] = FixWeight(weight);
			}
			Recalculate();
		}

		public IEnumerator<T> GetEnumerator()
		{
			return _list.GetEnumerator();
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return _list.GetEnumerator();
		}

		public void Add(T item, int weight)
		{
			_list.Add(item);
			_weights.Add(FixWeight(weight));
			Recalculate();
		}

		public void Add(ICollection<WeightedListItem<T>> listItems)
		{
			foreach (WeightedListItem<T> listItem in listItems)
			{
				_list.Add(listItem._item);
				_weights.Add(FixWeight(listItem._weight));
			}
			Recalculate();
		}

		public void Clear()
		{
			_list.Clear();
			_weights.Clear();
			Recalculate();
		}

		public void Contains(T item)
		{
			_list.Contains(item);
		}

		public int IndexOf(T item)
		{
			return _list.IndexOf(item);
		}

		public void Insert(int index, T item, int weight)
		{
			_list.Insert(index, item);
			_weights.Insert(index, FixWeight(weight));
			Recalculate();
		}

		public void Remove(T item)
		{
			int index = IndexOf(item);
			RemoveAt(index);
			Recalculate();
		}

		public void RemoveAt(int index)
		{
			_list.RemoveAt(index);
			_weights.RemoveAt(index);
			Recalculate();
		}

		public void SetWeight(T item, int newWeight)
		{
			SetWeightAtIndex(IndexOf(item), FixWeight(newWeight));
		}

		public int GetWeightOf(T item)
		{
			return GetWeightAtIndex(IndexOf(item));
		}

		public void SetWeightAtIndex(int index, int newWeight)
		{
			_weights[index] = FixWeight(newWeight);
			Recalculate();
		}

		public int GetWeightAtIndex(int index)
		{
			return _weights[index];
		}

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append("WeightedList<");
			stringBuilder.Append(typeof(T).Name);
			stringBuilder.Append(">: TotalWeight:");
			stringBuilder.Append(TotalWeight);
			stringBuilder.Append(", Min:");
			stringBuilder.Append(_minWeight);
			stringBuilder.Append(", Max:");
			stringBuilder.Append(_maxWeight);
			stringBuilder.Append(", Count:");
			stringBuilder.Append(Count);
			stringBuilder.Append(", {");
			for (int i = 0; i < _list.Count; i++)
			{
				stringBuilder.Append(_list[i].ToString());
				stringBuilder.Append(":");
				stringBuilder.Append(_weights[i].ToString());
				if (i < _list.Count - 1)
				{
					stringBuilder.Append(", ");
				}
			}
			stringBuilder.Append("}");
			return stringBuilder.ToString();
		}

		private void Recalculate()
		{
			_totalWeight = 0;
			_areAllProbabilitiesIdentical = false;
			_minWeight = 0;
			_maxWeight = 0;
			bool flag = true;
			_alias.Clear();
			_probabilities.Clear();
			List<int> list = new List<int>(Count);
			List<int> list2 = new List<int>(Count);
			List<int> list3 = new List<int>(Count);
			foreach (int weight in _weights)
			{
				if (flag)
				{
					_minWeight = (_maxWeight = weight);
					flag = false;
				}
				_minWeight = ((weight < _minWeight) ? weight : _minWeight);
				_maxWeight = ((_maxWeight < weight) ? weight : _maxWeight);
				_totalWeight += weight;
				list.Add(weight * Count);
				_alias.Add(0);
				_probabilities.Add(0);
			}
			if (_minWeight == _maxWeight)
			{
				_areAllProbabilitiesIdentical = true;
				return;
			}
			for (int i = 0; i < Count; i++)
			{
				if (list[i] < _totalWeight)
				{
					list2.Add(i);
				}
				else
				{
					list3.Add(i);
				}
			}
			while (list2.Count > 0 && list3.Count > 0)
			{
				int index = list2[list2.Count - 1];
				list2.RemoveAt(list2.Count - 1);
				int num = list3[list3.Count - 1];
				list3.RemoveAt(list3.Count - 1);
				_probabilities[index] = list[index];
				_alias[index] = num;
				int num3 = (list[num] = list[num] + list[index] - _totalWeight);
				if (num3 < _totalWeight)
				{
					list2.Add(num);
				}
				else
				{
					list3.Add(num);
				}
			}
			while (list3.Count > 0)
			{
				int index2 = list3[list3.Count - 1];
				list3.RemoveAt(list3.Count - 1);
				_probabilities[index2] = _totalWeight;
			}
		}

		internal static int FixWeightSetToOne(int weight)
		{
			return (weight <= 0) ? 1 : weight;
		}

		internal static int FixWeightExceptionOnAdd(int weight)
		{
			if (weight > 0)
			{
				return weight;
			}
			throw new ArgumentException("Weight cannot be non-positive");
		}

		private int FixWeight(int weight)
		{
			return (BadWeightErrorHandling == WeightErrorHandlingType.ThrowExceptionOnAdd) ? FixWeightExceptionOnAdd(weight) : FixWeightSetToOne(weight);
		}
	}
	public readonly struct WeightedListItem<T>
	{
		internal readonly T _item;

		internal readonly int _weight;

		public WeightedListItem(T item, int weight)
		{
			_item = item;
			_weight = weight;
		}
	}
	public enum WeightErrorHandlingType
	{
		SetWeightToOne,
		ThrowExceptionOnAdd
	}
}
namespace MysteryDice
{
	public class Consts
	{
		public const string Default = "Default";

		public const string Experimentation = "Experimentation";

		public const string Assurance = "Assurance";

		public const string Vow = "Vow";

		public const string Offense = "Offense";

		public const string March = "March";

		public const string Rend = "Rend";

		public const string Dine = "Dine";

		public const string Titan = "Titan";
	}
	[BepInPlugin("Theronguard.EmergencyDice", "Emergency Dice Updated", "1.2.6")]
	public class MysteryDice : BaseUnityPlugin
	{
		private const string modGUID = "Theronguard.EmergencyDice";

		private const string modName = "Emergency Dice Updated";

		private const string modVersion = "1.2.6";

		private readonly Harmony harmony = new Harmony("Theronguard.EmergencyDice");

		public static ManualLogSource CustomLogger;

		public static AssetBundle LoadedAssets;

		public static GameObject NetworkerPrefab;

		public static GameObject JumpscareCanvasPrefab;

		public static GameObject JumpscareOBJ;

		public static GameObject PathfinderPrefab;

		public static GameObject EffectMenuPrefab;

		public static GameObject EffectMenuButtonPrefab;

		public static Jumpscare JumpscareScript;

		public static AudioClip ExplosionSFX;

		public static AudioClip DetonateSFX;

		public static AudioClip MineSFX;

		public static AudioClip AwfulEffectSFX;

		public static AudioClip BadEffectSFX;

		public static AudioClip GoodEffectSFX;

		public static AudioClip JumpscareSFX;

		public static AudioClip AlarmSFX;

		public static AudioClip PurrSFX;

		public static Sprite WarningBracken;

		public static Sprite WarningJester;

		public static Sprite WarningDeath;

		public static Sprite WarningLuck;

		public static Item DieEmergency;

		public static Item DieGambler;

		public static Item DieChronos;

		public static Item DieSacrificer;

		public static Item DieSaint;

		public static Item DieRusty;

		public static Item PathfinderSpawner;

		public static ConfigFile BepInExConfig = null;

		public static Dictionary<string, LevelTypes> RegLevels = new Dictionary<string, LevelTypes>
		{
			{
				"Experimentation",
				(LevelTypes)4
			},
			{
				"Assurance",
				(LevelTypes)8
			},
			{
				"Vow",
				(LevelTypes)16
			},
			{
				"Offense",
				(LevelTypes)32
			},
			{
				"March",
				(LevelTypes)64
			},
			{
				"Rend",
				(LevelTypes)128
			},
			{
				"Dine",
				(LevelTypes)256
			},
			{
				"Titan",
				(LevelTypes)512
			}
		};

		public static List<Item> RegisteredDice = new List<Item>();

		private void Awake()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Expected O, but got Unknown
			CustomLogger = Logger.CreateLogSource("Theronguard.EmergencyDice");
			BepInExConfig = new ConfigFile(Path.Combine(Paths.ConfigPath, "Emergency Dice.cfg"), true);
			ModConfig();
			DieBehaviour.Config();
			NetcodeWeaver();
			LoadedAssets = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "mysterydice"));
			ExplosionSFX = LoadedAssets.LoadAsset<AudioClip>("MineDetonate");
			MineSFX = LoadedAssets.LoadAsset<AudioClip>("MineTrigger");
			AwfulEffectSFX = LoadedAssets.LoadAsset<AudioClip>("Bell2");
			BadEffectSFX = LoadedAssets.LoadAsset<AudioClip>("Bad1");
			GoodEffectSFX = LoadedAssets.LoadAsset<AudioClip>("Good2");
			JumpscareSFX = LoadedAssets.LoadAsset<AudioClip>("glitch");
			PurrSFX = LoadedAssets.LoadAsset<AudioClip>("purr");
			AlarmSFX = LoadedAssets.LoadAsset<AudioClip>("alarmcurse");
			WarningBracken = LoadedAssets.LoadAsset<Sprite>("bracken");
			WarningJester = LoadedAssets.LoadAsset<Sprite>("jester");
			WarningDeath = LoadedAssets.LoadAsset<Sprite>("death");
			WarningLuck = LoadedAssets.LoadAsset<Sprite>("luck");
			NetworkerPrefab = LoadedAssets.LoadAsset<GameObject>("Networker");
			NetworkerPrefab.AddComponent<Networker>();
			EffectMenuPrefab = LoadedAssets.LoadAsset<GameObject>("Choose Effect");
			EffectMenuButtonPrefab = LoadedAssets.LoadAsset<GameObject>("Effect");
			JumpscareCanvasPrefab = LoadedAssets.LoadAsset<GameObject>("JumpscareCanvas");
			JumpscareCanvasPrefab.AddComponent<Jumpscare>();
			PathfinderPrefab = LoadedAssets.LoadAsset<GameObject>("Pathfinder");
			PathfinderPrefab.AddComponent<Pathfinder.PathfindBehaviour>();
			PathfinderSpawner = LoadedAssets.LoadAsset<Item>("Pathblob");
			Pathfinder.BlobspawnerBehaviour blobspawnerBehaviour = PathfinderSpawner.spawnPrefab.AddComponent<Pathfinder.BlobspawnerBehaviour>();
			((GrabbableObject)blobspawnerBehaviour).grabbable = true;
			((GrabbableObject)blobspawnerBehaviour).grabbableToEnemies = true;
			((GrabbableObject)blobspawnerBehaviour).itemProperties = PathfinderSpawner;
			NetworkPrefabs.RegisterNetworkPrefab(PathfinderSpawner.spawnPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(PathfinderPrefab);
			LoadDice();
			harmony.PatchAll();
			CustomLogger.LogInfo((object)"The Emergency Dice mod was initialized!");
		}

		public static Assembly GetAssembly(string name)
		{
			if (Chainloader.PluginInfos.ContainsKey(name))
			{
				return ((object)Chainloader.PluginInfos[name].Instance).GetType().Assembly;
			}
			return null;
		}

		private static void NetcodeWeaver()
		{
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			Type[] array = types;
			foreach (Type type in array)
			{
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array2 = methods;
				foreach (MethodInfo methodInfo in array2)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
		}

		public static void ModConfig()
		{
			ConfigEntry<bool> val = BepInExConfig.Bind<bool>("Clientside", "Pussy mode", true, "Changes the jumpscare effect to a less scary one.");
			JumpscareGlitch.PussyMode = val.Value;
			ConfigEntry<float> val2 = BepInExConfig.Bind<float>("Hypershake", "HyperShake Min Force", 30f, "Changes the minimum that hypershake can move you.");
			HyperShake.minForce = val2.Value;
			ConfigEntry<float> val3 = BepInExConfig.Bind<float>("Hypershake", "HyperShake Max Force", 100f, "Changes the maximum that hypershake can move you.");
			HyperShake.maxForce = val3.Value;
			ConfigEntry<bool> val4 = BepInExConfig.Bind<bool>("Misc", "Have a random spin time", true, "Makes the dice spin a random amount of time before rolling.");
			DieBehaviour.randomUseTimer = val4.Value;
			ConfigEntry<bool> val5 = BepInExConfig.Bind<bool>("Misc", "Updated Chronos Time", false, "Makes the Chronos die have better odds in the morning instead of equal odds in the morning.");
			ChronosDie.differentTimes = val5.Value;
			ConfigEntry<bool> val6 = BepInExConfig.Bind<bool>("Misc", "Use Dice Outside", false, "Allows the use of the Chronos and Gambler outside.");
			GamblerDie.useOutside = val6.Value;
			ChronosDie.useOutside = val6.Value;
			ConfigEntry<bool> val7 = BepInExConfig.Bind<bool>("Admin", "Show effects in the console", false, "Shows what effect has been rolled by the dice in the console. For debug purposes.");
			DieBehaviour.LogEffectsToConsole = val7.Value;
			ConfigEntry<bool> val8 = BepInExConfig.Bind<bool>("Admin", "Allow chat commands", false, "Enables chat commands for the admin. Mainly for debugging.");
			ChatPatch.AllowChatDebug = val8.Value;
		}

		public static void LoadDice()
		{
			//IL_0911: Unknown result type (might be due to invalid IL or missing references)
			DieGambler = LoadedAssets.LoadAsset<Item>("MysteryDiceItem");
			DieGambler.minValue = 100;
			DieGambler.maxValue = 130;
			GamblerDie gamblerDie = DieGambler.spawnPrefab.AddComponent<GamblerDie>();
			((GrabbableObject)gamblerDie).grabbable = true;
			((GrabbableObject)gamblerDie).grabbableToEnemies = true;
			((GrabbableObject)gamblerDie).itemProperties = DieGambler;
			RegisteredDice.Add(DieGambler);
			DieEmergency = LoadedAssets.LoadAsset<Item>("Emergency Dice Script");
			DieEmergency.highestSalePercentage = 80;
			EmergencyDie emergencyDie = DieEmergency.spawnPrefab.AddComponent<EmergencyDie>();
			((GrabbableObject)emergencyDie).grabbable = true;
			((GrabbableObject)emergencyDie).grabbableToEnemies = true;
			((GrabbableObject)emergencyDie).itemProperties = DieEmergency;
			RegisteredDice.Add(DieEmergency);
			DieChronos = LoadedAssets.LoadAsset<Item>("Chronos");
			DieChronos.minValue = 120;
			DieChronos.maxValue = 140;
			ChronosDie chronosDie = DieChronos.spawnPrefab.AddComponent<ChronosDie>();
			((GrabbableObject)chronosDie).grabbable = true;
			((GrabbableObject)chronosDie).grabbableToEnemies = true;
			((GrabbableObject)chronosDie).itemProperties = DieChronos;
			RegisteredDice.Add(DieChronos);
			DieSacrificer = LoadedAssets.LoadAsset<Item>("Sacrificer");
			DieSacrificer.minValue = 170;
			DieSacrificer.maxValue = 230;
			SacrificerDie sacrificerDie = DieSacrificer.spawnPrefab.AddComponent<SacrificerDie>();
			((GrabbableObject)sacrificerDie).grabbable = true;
			((GrabbableObject)sacrificerDie).grabbableToEnemies = true;
			((GrabbableObject)sacrificerDie).itemProperties = DieSacrificer;
			RegisteredDice.Add(DieSacrificer);
			DieSaint = LoadedAssets.LoadAsset<Item>("Saint");
			DieSaint.minValue = 210;
			DieSaint.maxValue = 280;
			SaintDie saintDie = DieSaint.spawnPrefab.AddComponent<SaintDie>();
			((GrabbableObject)saintDie).grabbable = true;
			((GrabbableObject)saintDie).grabbableToEnemies = true;
			((GrabbableObject)saintDie).itemProperties = DieSaint;
			RegisteredDice.Add(DieSaint);
			DieRusty = LoadedAssets.LoadAsset<Item>("Rusty");
			DieRusty.minValue = 90;
			DieRusty.maxValue = 160;
			RustyDie rustyDie = DieRusty.spawnPrefab.AddComponent<RustyDie>();
			((GrabbableObject)rustyDie).grabbable = true;
			((GrabbableObject)rustyDie).grabbableToEnemies = true;
			((GrabbableObject)rustyDie).itemProperties = DieRusty;
			RegisteredDice.Add(DieRusty);
			TerminalNode val = ScriptableObject.CreateInstance<TerminalNode>();
			val.clearPreviousText = true;
			val.displayText = "This handy, unstable device might be your last chance to save yourself.\n\nRolls a number from 1 to 6:\n-Rolling 6 teleports you and players standing closely near you to the ship with all your items.\n-Rolling 4 or 5 teleports you to the ship with all your items.\n-Rolling 3 might be bad, or might be good. You decide? \n-Rolling 2 will causes some problems\n-You dont want to roll a 1\n";
			Items.RegisterShopItem(DieEmergency, (TerminalNode)null, (TerminalNode)null, val, 200);
			Dictionary<(string, string), int> dictionary = new Dictionary<(string, string), int>();
			dictionary.Add((DieGambler.itemName, "Default"), 25);
			dictionary.Add((DieGambler.itemName, "Experimentation"), 13);
			dictionary.Add((DieGambler.itemName, "Assurance"), 13);
			dictionary.Add((DieGambler.itemName, "Vow"), 15);
			dictionary.Add((DieGambler.itemName, "Offense"), 17);
			dictionary.Add((DieGambler.itemName, "March"), 17);
			dictionary.Add((DieGambler.itemName, "Rend"), 33);
			dictionary.Add((DieGambler.itemName, "Dine"), 46);
			dictionary.Add((DieGambler.itemName, "Titan"), 30);
			dictionary.Add((DieChronos.itemName, "Default"), 23);
			dictionary.Add((DieChronos.itemName, "Experimentation"), 17);
			dictionary.Add((DieChronos.itemName, "Assurance"), 17);
			dictionary.Add((DieChronos.itemName, "Vow"), 17);
			dictionary.Add((DieChronos.itemName, "Offense"), 25);
			dictionary.Add((DieChronos.itemName, "March"), 25);
			dictionary.Add((DieChronos.itemName, "Rend"), 22);
			dictionary.Add((DieChronos.itemName, "Dine"), 41);
			dictionary.Add((DieChronos.itemName, "Titan"), 33);
			dictionary.Add((DieSacrificer.itemName, "Default"), 20);
			dictionary.Add((DieSacrificer.itemName, "Experimentation"), 20);
			dictionary.Add((DieSacrificer.itemName, "Assurance"), 20);
			dictionary.Add((DieSacrificer.itemName, "Vow"), 20);
			dictionary.Add((DieSacrificer.itemName, "Offense"), 20);
			dictionary.Add((DieSacrificer.itemName, "March"), 20);
			dictionary.Add((DieSacrificer.itemName, "Rend"), 35);
			dictionary.Add((DieSacrificer.itemName, "Dine"), 38);
			dictionary.Add((DieSacrificer.itemName, "Titan"), 23);
			dictionary.Add((DieSaint.itemName, "Default"), 10);
			dictionary.Add((DieSaint.itemName, "Experimentation"), 10);
			dictionary.Add((DieSaint.itemName, "Assurance"), 10);
			dictionary.Add((DieSaint.itemName, "Vow"), 10);
			dictionary.Add((DieSaint.itemName, "Offense"), 10);
			dictionary.Add((DieSaint.itemName, "March"), 10);
			dictionary.Add((DieSaint.itemName, "Rend"), 12);
			dictionary.Add((DieSaint.itemName, "Dine"), 15);
			dictionary.Add((DieSaint.itemName, "Titan"), 12);
			dictionary.Add((DieRusty.itemName, "Default"), 18);
			dictionary.Add((DieRusty.itemName, "Experimentation"), 15);
			dictionary.Add((DieRusty.itemName, "Assurance"), 15);
			dictionary.Add((DieRusty.itemName, "Vow"), 5);
			dictionary.Add((DieRusty.itemName, "Offense"), 18);
			dictionary.Add((DieRusty.itemName, "March"), 5);
			dictionary.Add((DieRusty.itemName, "Rend"), 16);
			dictionary.Add((DieRusty.itemName, "Dine"), 26);
			dictionary.Add((DieRusty.itemName, "Titan"), 14);
			foreach (Item registeredDie in RegisteredDice)
			{
				NetworkPrefabs.RegisterNetworkPrefab(registeredDie.spawnPrefab);
				Utilities.FixMixerGroups(registeredDie.spawnPrefab);
			}
			foreach (Item registeredDie2 in RegisteredDice)
			{
				if ((Object)(object)registeredDie2 == (Object)(object)DieEmergency)
				{
					continue;
				}
				ConfigEntry<int> val2 = BepInExConfig.Bind<int>(registeredDie2.itemName + " Spawn rates", "Default", dictionary[(registeredDie2.itemName, "Default")], "Default spawn rate for all levels. Mainly for setting up spawn rates for either new beta moons or modded ones.");
				foreach (KeyValuePair<string, LevelTypes> regLevel in RegLevels)
				{
					ConfigEntry<int> val3 = BepInExConfig.Bind<int>(registeredDie2.itemName + " Spawn rates", regLevel.Key, dictionary[(registeredDie2.itemName, regLevel.Key)], "Sets how often this item spawns on this level. 0-10 is very rare, 10-25 is rare, 25+ is common. This is only from my observations.");
					Items.RegisterScrap(registeredDie2, val3.Value, regLevel.Value);
				}
				Items.RegisterScrap(registeredDie2, val2.Value, (LevelTypes)(-1));
			}
		}
	}
	internal class Networker : NetworkBehaviour
	{
		public static Networker Instance;

		public static float RebelTimer = 0f;

		public static bool CoilheadIgnoreStares = false;

		private static Vector2 TimerRange = new Vector2(3f, 6f);

		private static ulong PlayerIDToExplode;

		private static float ExplosionTimer = 0f;

		private Coroutine DoorMalfunctioning = null;

		public override void OnNetworkSpawn()
		{
			Instance = this;
			((NetworkBehaviour)this).OnNetworkSpawn();
			if (!((NetworkBehaviour)this).IsServer)
			{
				DieBehaviour.AllowedEffects.Clear();
				((MonoBehaviour)this).StartCoroutine(SyncRequest());
			}
		}

		public IEnumerator SyncRequest()
		{
			while (!((Component)GameNetworkManager.Instance).GetComponent<NetworkManager>().IsConnectedClient)
			{
				yield return (object)new WaitForSeconds(0.5f);
			}
			while ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null)
			{
				yield return (object)new WaitForSeconds(0.5f);
			}
			RequestEffectConfigServerRPC(GameNetworkManager.Instance.localPlayerController.playerClientId);
		}

		public override void OnNetworkDespawn()
		{
			StartOfRoundPatch.ResetSettingsShared();
			((NetworkBehaviour)this).OnNetworkDespawn();
		}

		private void FixedUpdate()
		{
			UpdateMineTimers();
			Armageddon.BoomTimer();
			HyperShake.FixedUpdate();
			LeverShake.FixedUpdate();
			Drunk.FixedUpdate();
		}

		private void Update()
		{
			ModifyPitch.PitchFluctuate();
			RebelCoilheads();
			AlarmCurse.TimerUpdate();
		}

		[ServerRpc(RequireOwnership = false)]
		public void LogEffectsToOwnerServerRPC(string playerName, string effectName)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: 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 != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2928804663u, val, (RpcDelivery)0);
				bool flag = playerName != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(playerName, false);
				}
				bool flag2 = effectName != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives));
				if (flag2)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(effectName, false);
				}
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2928804663u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost) && DieBehaviour.LogEffectsToConsole)
			{
				MysteryDice.CustomLogger.LogInfo((object)("[Debug] Player: " + playerName + " rolled " + effectName));
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void RequestEffectConfigServerRPC(ulong playerID)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: 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 != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(275565411u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerID);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 275565411u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost))
			{
				return;
			}
			foreach (IEffect allowedEffect in DieBehaviour.AllowedEffects)
			{
				SendConfigClientRPC(playerID, allowedEffect.Name);
			}
		}

		[ClientRpc]
		public void SendConfigClientRPC(ulong playerID, string effectName)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: 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(1079890651u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerID);
				bool flag = effectName != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(effectName, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1079890651u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			string effectName2 = effectName;
			if (!((NetworkBehaviour)this).IsServer && GameNetworkManager.Instance.localPlayerController.playerClientId == playerID)
			{
				DieBehaviour.AllowedEffects.Add(DieBehaviour.AllEffects.Where((IEffect x) => x.Name == effectName2).First());
			}
		}

		public static bool IsPlayerAlive(PlayerControllerB player)
		{
			return !player.isPlayerDead && ((Behaviour)player).isActiveAndEnabled && ((NetworkBehaviour)player).IsSpawned;
		}

		public void UpdateMineTimers()
		{
			if (ExplosionTimer >= 0f)
			{
				ExplosionTimer -= Time.fixedDeltaTime;
				if (ExplosionTimer < 0f)
				{
					DetonatePlayerClientRPC(PlayerIDToExplode);
				}
			}
		}

		public void StartDoomCountdown(ulong playerID)
		{
			PlayerIDToExplode = playerID;
			ExplosionTimer = Random.Range(TimerRange.x, TimerRange.y);
		}

		[ClientRpc]
		public void OnStartRoundClientRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1118192716u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1118192716u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					StartOfRoundPatch.StartGameOnClient();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void DetonateRandomPlayerServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1471895020u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1471895020u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost) && !((Object)(object)StartOfRound.Instance == (Object)null) && !StartOfRound.Instance.inShipPhase && StartOfRound.Instance.shipHasLanded)
				{
					List<PlayerControllerB> list = new List<PlayerControllerB>();
					list = getValidPlayers();
					PlayerControllerB val3 = list[Random.Range(0, list.Count)];
					StartDoomCountdown(val3.playerClientId);
				}
			}
		}

		public List<PlayerControllerB> getValidPlayers()
		{
			List<PlayerControllerB> list = new List<PlayerControllerB>();
			GameObject[] allPlayerObjects = StartOfRound.Instance.allPlayerObjects;
			foreach (GameObject val in allPlayerObjects)
			{
				PlayerControllerB component = val.GetComponent<PlayerControllerB>();
				if (Misc.IsPlayerAliveAndControlled(component))
				{
					list.Add(component);
				}
			}
			return list;
		}

		[ClientRpc]
		public void DetonatePlayerClientRPC(ulong clientID)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: 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(67742074u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, clientID);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 67742074u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost) || StartOfRound.Instance.inShipPhase || !StartOfRound.Instance.shipHasLanded)
			{
				return;
			}
			GameObject[] allPlayerObjects = StartOfRound.Instance.allPlayerObjects;
			foreach (GameObject val3 in allPlayerObjects)
			{
				PlayerControllerB component = val3.GetComponent<PlayerControllerB>();
				if (component.playerClientId == clientID && Misc.IsPlayerAliveAndControlled(component))
				{
					AudioSource.PlayClipAtPoint(MysteryDice.MineSFX, ((Component)component).transform.position);
					((MonoBehaviour)this).StartCoroutine(SpawnExplosionAfterSFX(((Component)component).transform.position));
					break;
				}
			}
		}

		private IEnumerator SpawnExplosionAfterSFX(Vector3 position)
		{
			//IL_000e: 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)
			yield return (object)new WaitForSeconds(0.5f);
			Landmine.SpawnExplosion(position, true, 1f, 5f, 50, 0f, (GameObject)null, false);
		}

		[ServerRpc(RequireOwnership = false)]
		public void ReviveAllPlayersServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3123714467u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3123714467u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost) && !((Object)(object)StartOfRound.Instance == (Object)null))
				{
					ReviveAllPlayersClientRpc();
				}
			}
		}

		[ClientRpc]
		public void ReviveAllPlayersClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(954997453u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 954997453u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((Object)(object)StartOfRound.Instance == (Object)null))
				{
					StartOfRound.Instance.ReviveDeadPlayers();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void TeleportInsideServerRPC(ulong clientID, Vector3 teleportPos)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(905465244u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, clientID);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref teleportPos);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 905465244u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					TeleportInsideClientRPC(clientID, teleportPos);
				}
			}
		}

		[ClientRpc]
		public void TeleportInsideClientRPC(ulong clientID, Vector3 teleportPos)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2679626543u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, clientID);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref teleportPos);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2679626543u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					TeleportInside.TeleportPlayerInside(clientID, teleportPos);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void TeleportToShipServerRPC(ulong clientID)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(658849964u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, clientID);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 658849964u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					TeleportToShipClientRPC(clientID);
				}
			}
		}

		[ClientRpc]
		public void TeleportToShipClientRPC(ulong clientID)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1685682683u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, clientID);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1685682683u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					ReturnToShip.TeleportPlayerToShip(clientID);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void TeleportToPlayerServerRPC(ulong clientID, ulong to)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_0071: 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_0096: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1167604476u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, clientID);
					BytePacker.WriteValueBitPacked(val2, to);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1167604476u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					TeleportToPlayerClientRPC(clientID, to);
				}
			}
		}

		[ClientRpc]
		public void TeleportToPlayerClientRPC(ulong clientID, ulong to)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_0071: 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_0096: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2713405972u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, clientID);
					BytePacker.WriteValueBitPacked(val2, to);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2713405972u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					EveryoneToSomeone.TeleportPlayerToPlayer(clientID, to);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void BlockFireExitsServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(758899621u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 758899621u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					BlockFireExitsClientRPC();
				}
			}
		}

		[ClientRpc]
		public void BlockFireExitsClientRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(905636504u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 905636504u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					FireExitPatch.AreFireExitsBlocked = true;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void FakeFireExitsServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3750907622u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3750907622u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					FakeFireExitsClientRPC();
				}
			}
		}

		[ClientRpc]
		public void FakeFireExitsClientRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: 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(2557817672u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2557817672u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			GameObject[] array = Object.FindObjectsOfType<GameObject>(true);
			for (int i = 0; i < array.Length; i++)
			{
				if (((Object)array[i]).name.Contains("AlleyExitDoorContainer"))
				{
					array[i].SetActive(true);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void InstaJesterServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(642114377u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 642114377u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					InstaJester.SpawnInstaJester();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void OutsideBrackenServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(117164783u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 117164783u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					OutsideBracken.SpawnOutsideBracken();
				}
			}
		}

		[ClientRpc]
		public void SetNavmeshBrackenClientRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(689662337u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 689662337u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					OutsideBracken.SetNavmeshBrackenClient();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void MineOverflowServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1822380635u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1822380635u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					MineOverflow.SpawnMoreMines(MineOverflow.MaxMinesToSpawn);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void MineOverflowOutsideServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3354025460u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3354025460u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					MineOverflowOutside.SpawnMoreMinesOutside();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void ModifyPitchNotifyServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2611363842u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2611363842u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ModifyPitchNotifyClientRPC();
				}
			}
		}

		[ClientRpc]
		public void ModifyPitchNotifyClientRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2473680354u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2473680354u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					ModifyPitch.FluctuatePitch = true;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SwapPlayersServerRPC(ulong userID)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: 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 != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(632101008u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, userID);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 632101008u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost))
			{
				return;
			}
			List<PlayerControllerB> list = new List<PlayerControllerB>();
			PlayerControllerB val3 = null;
			GameObject[] allPlayerObjects = StartOfRound.Instance.allPlayerObjects;
			foreach (GameObject val4 in allPlayerObjects)
			{
				PlayerControllerB component = val4.GetComponent<PlayerControllerB>();
				if (Misc.IsPlayerAliveAndControlled(component) && component.playerClientId != userID)
				{
					list.Add(component);
				}
				if (Misc.IsPlayerAliveAndControlled(component) && component.playerClientId == userID)
				{
					val3 = component;
				}
			}
			if (!((Object)(object)val3 == (Object)null) && list.Count != 0)
			{
				ulong playerClientId = list[Random.Range(0, list.Count)].playerClientId;
				Swap.SwapPlayers(val3.playerClientId, playerClientId);
				SwapPlayerClientRPC(val3.playerClientId, playerClientId);
			}
		}

		[ClientRpc]
		public void SwapPlayerClientRPC(ulong userID, ulong otherUserID)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_0071: 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_0096: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2790719231u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, userID);
					BytePacker.WriteValueBitPacked(val2, otherUserID);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2790719231u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((NetworkBehaviour)this).IsServer)
				{
					Swap.SwapPlayers(userID, otherUserID);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void JackpotServerRPC(ulong userID, int amount)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_0071: 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_0096: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2711760737u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, userID);
					BytePacker.WriteValueBitPacked(val2, amount);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2711760737u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ScrapJackpot.JackpotScrap(userID, amount);
				}
			}
		}

		[ClientRpc]
		public void SyncItemWeightsClientRPC(NetworkObjectReference[] netObjs, float[] scrapWeights)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: 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(2988314943u, val, (RpcDelivery)0);
				bool flag = netObjs != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(netObjs, default(ForNetworkSerializable));
				}
				bool flag2 = scrapWeights != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives));
				if (flag2)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(scrapWeights, default(ForPrimitives));
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2988314943u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			for (int i = 0; i < netObjs.Length; i++)
			{
				if (((NetworkObjectReference)(ref netObjs[i])).TryGet(ref val3, (NetworkManager)null))
				{
					GrabbableObject component = ((Component)val3).GetComponent<GrabbableObject>();
					if ((Object)(object)component == (Object)null)
					{
						break;
					}
					component.itemProperties.weight = scrapWeights[i];
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void HealAllServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(651724430u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 651724430u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					HealAllClientRPC();
				}
			}
		}

		[ClientRpc]
		public void HealAllClientRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: 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(253654510u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 253654510u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			GameObject[] allPlayerObjects = StartOfRound.Instance.allPlayerObjects;
			foreach (GameObject val3 in allPlayerObjects)
			{
				PlayerControllerB component = val3.GetComponent<PlayerControllerB>();
				if ((Object)(object)component == (Object)null || !Misc.IsPlayerAliveAndControlled(component))
				{
					continue;
				}
				Heal(component);
				HUDManager.Instance.UpdateHealthUI(component.health, false);
				GrabbableObject[] itemSlots = component.ItemSlots;
				foreach (GrabbableObject val4 in itemSlots)
				{
					if (!((Object)(object)val4 == (Object)null) && val4.insertedBattery != null)
					{
						val4.insertedBattery.charge = 1f;
						val4.insertedBattery.empty = false;
					}
				}
			}
		}

		public static void Heal(PlayerControllerB player)
		{
			player.bleedingHeavily = false;
			player.criticallyInjured = false;
			player.health = 100;
		}

		[ServerRpc(RequireOwnership = false)]
		public void TurnOffAllLightsServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1611098485u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1611098485u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					TurnOffAllLightsClientRPC();
				}
			}
		}

		[ClientRpc]
		public void TurnOffAllLightsClientRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: 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(569249862u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 569249862u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				RoundManager.Instance.TurnOnAllLights(false);
				BreakerBox val3 = Object.FindObjectOfType<BreakerBox>();
				if ((Object)(object)val3 != (Object)null)
				{
					((Component)val3).gameObject.SetActive(false);
				}
			}
		}

		private void RebelCoilheads()
		{
			if (!RebeliousCoilHeads.IsEnabled)
			{
				CoilheadIgnoreStares = false;
				return;
			}
			RebelTimer -= Time.deltaTime;
			if (RebelTimer <= 0f)
			{
				CoilheadIgnoreStares = !CoilheadIgnoreStares;
				if (CoilheadIgnoreStares)
				{
					RebelTimer = Random.Range(2f, 3f);
				}
				else
				{
					RebelTimer = Random.Range(12f, 20f);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void EnableRebelServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3467711789u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3467711789u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					RebeliousCoilHeads.IsEnabled = true;
					Misc.SpawnEnemyForced(GetEnemies.Coilhead, 1, isInside: true);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void ReturnPlayerToShipServerRPC(ulong clientID)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2994610157u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, clientID);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2994610157u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					TeleportToShipClientRPC(clientID);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SpawnBeehivesServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3343372220u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3343372220u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					Beepocalypse.SpawnBeehives();
				}
			}
		}

		[ClientRpc]
		public void ZeroOutBeehiveScrapClientRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(141816624u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 141816624u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((MonoBehaviour)this).StartCoroutine(ZeroScrapDelay());
				}
			}
		}

		public IEnumerator ZeroScrapDelay()
		{
			yield return (object)new WaitForSeconds(4f);
			Beepocalypse.ZeroAllBeehiveScrap();
		}

		[ServerRpc(RequireOwnership = false)]
		public void SpawnWormssServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1024578127u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1024578127u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					Wormageddon.SpawnWorms();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SetArmageddonServerRPC(bool enable)
		{
			//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)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3302520548u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref enable, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3302520548u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					Armageddon.IsEnabled = enable;
				}
			}
		}

		[ClientRpc]
		public void DetonateAtPosClientRPC(Vector3 position)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1129990815u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1129990815u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Landmine.SpawnExplosion(position, true, 1f, 5f, 50, 0f, (GameObject)null, false);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void JumpscareAllServerRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(591038454u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 591038454u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					JumpscareAllClientRPC();
				}
			}
		}

		[ClientRpc]
		public void JumpscareAllClientRPC()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && n