Decompiled source of ChillaxScraps v1.2.3

ChillaxScraps/ChillaxScraps.dll

Decompiled 4 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using ChillaxScraps.CustomEffects;
using ChillaxScraps.NetcodePatcher;
using ChillaxScraps.Utils;
using GameNetcodeStuff;
using HarmonyLib;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using TMPro;
using Unity.Netcode;
using UnityEngine;
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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ChillaxScraps")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+c4dddc3db1111c466df2e13a48fddc01d3d20cdd")]
[assembly: AssemblyProduct("ChillaxScraps")]
[assembly: AssemblyTitle("ChillaxScraps")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: NetcodePatchedAssembly]
internal class <Module>
{
	static <Module>()
	{
	}
}
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

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

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

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace ChillaxScraps
{
	internal class Config
	{
		public readonly ConfigEntry<int> masterSwordDmg;

		public readonly ConfigEntry<bool> evilBoink;

		public readonly ConfigEntry<bool> ocarinaUniqueSongs;

		public readonly List<ConfigEntry<int>> entries = new List<ConfigEntry<int>>();

		public Config(ConfigFile cfg, List<Scrap> scraps)
		{
			cfg.SaveOnConfigSet = false;
			masterSwordDmg = cfg.Bind<int>("Items", "Master Sword damage", 4, "Only the chosen hero can grab this sword, so it's supposed to be strong.");
			evilBoink = cfg.Bind<bool>("Items", "Evil Boink", false, "Activate this to turn Boink into an evil bird, can have negative consequences.");
			ocarinaUniqueSongs = cfg.Bind<bool>("Items", "Ocarina unique songs", false, "Activate this if you want every connected player to have a randomly selected Ocarina song assigned to them.");
			foreach (Scrap scrap in scraps)
			{
				entries.Add(cfg.Bind<int>("Spawn chance", scrap.asset.Split("/")[0], scrap.rarity, (ConfigDescription)null));
			}
			cfg.Save();
			cfg.SaveOnConfigSet = true;
		}
	}
	[BepInPlugin("zigzag.chillaxscraps", "ChillaxScraps", "1.2.3")]
	public class Plugin : BaseUnityPlugin
	{
		private const string GUID = "zigzag.chillaxscraps";

		private const string NAME = "ChillaxScraps";

		private const string VERSION = "1.2.3";

		public static Plugin instance;

		public static List<AudioClip> audioClips;

		public static List<GameObject> gameObjects;

		private readonly Harmony harmony = new Harmony("zigzag.chillaxscraps");

		internal static Config config { get; private set; }

		private void HarmonyPatchAll()
		{
			harmony.CreateClassProcessor(typeof(TotemItemPlayerControllerBPatch), true).Patch();
		}

		private void LoadItemBehaviour(Item item, int behaviourId)
		{
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Expected O, but got Unknown
			GrabbableObject val;
			switch (behaviourId)
			{
			default:
				return;
			case 1:
				val = (GrabbableObject)(object)item.spawnPrefab.AddComponent<DeathNote>();
				break;
			case 2:
				val = (GrabbableObject)(object)item.spawnPrefab.AddComponent<Boink>();
				break;
			case 3:
				val = (GrabbableObject)(object)item.spawnPrefab.AddComponent<Food>();
				break;
			case 4:
				val = (GrabbableObject)(object)item.spawnPrefab.AddComponent<UnoReverse>();
				break;
			case 5:
				val = (GrabbableObject)(object)item.spawnPrefab.AddComponent<EmergencyMeeting>();
				break;
			case 6:
				val = (GrabbableObject)(object)item.spawnPrefab.AddComponent<SuperSneakers>();
				break;
			case 7:
				val = (GrabbableObject)(object)item.spawnPrefab.AddComponent<MasterSword>();
				SetupScript.Copy((Shovel)val, item);
				break;
			case 8:
				val = (GrabbableObject)(object)item.spawnPrefab.AddComponent<Ocarina>();
				SetupScript.Copy((NoisemakerProp)val, item);
				break;
			case 9:
				val = (GrabbableObject)(object)item.spawnPrefab.AddComponent<TotemOfUndying>();
				break;
			}
			val.grabbable = true;
			val.isInFactory = true;
			val.grabbableToEnemies = true;
			val.itemProperties = item;
		}

		private void Awake()
		{
			instance = this;
			string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "chillaxscraps");
			AssetBundle val = AssetBundle.LoadFromFile(text);
			string text2 = "Assets/Data/";
			gameObjects = new List<GameObject>
			{
				val.LoadAsset<GameObject>(text2 + "DeathNote/DeathNoteCanvas.prefab"),
				val.LoadAsset<GameObject>(text2 + "EmergencyMeeting/EmergencyMeetingCanvas.prefab")
			};
			audioClips = new List<AudioClip>
			{
				val.LoadAsset<AudioClip>(text2 + "_audio/Page_Turn_Sound_Effect.wav"),
				val.LoadAsset<AudioClip>(text2 + "_audio/Death_Note_Heart_Attack_Sound_Effect.wav"),
				val.LoadAsset<AudioClip>(text2 + "_audio/Boink.wav"),
				val.LoadAsset<AudioClip>(text2 + "_audio/EatSFX.wav"),
				val.LoadAsset<AudioClip>(text2 + "_audio/uno-reverse-biaatch.wav"),
				val.LoadAsset<AudioClip>(text2 + "_audio/emergencymeeting.wav"),
				val.LoadAsset<AudioClip>(text2 + "_audio/sneakers-activate.wav"),
				val.LoadAsset<AudioClip>(text2 + "_audio/sneakers-deactivate.wav"),
				val.LoadAsset<AudioClip>(text2 + "_audio/OOT_Fanfare_Item.wav"),
				val.LoadAsset<AudioClip>(text2 + "_audio/undying.wav")
			};
			List<Scrap> list = new List<Scrap>
			{
				new Scrap("DeathNote/DeathNoteItem.asset", 5, 1),
				new Scrap("Boink/BoinkItem.asset", 12, 2),
				new Scrap("Eevee/EeveeItem.asset", 10),
				new Scrap("CupNoodle/CupNoodleItem.asset", 11, 3),
				new Scrap("Moai/MoaiItem.asset", 9),
				new Scrap("UnoReverseCard/UnoReverseCardItem.asset", 8, 4),
				new Scrap("FroggyChair/FroggyChairItem.asset", 10),
				new Scrap("EmergencyMeeting/EmergencyMeetingItem.asset", 6, 5),
				new Scrap("SuperSneakers/SuperSneakersItem.asset", 10, 6),
				new Scrap("MasterSword/MasterSwordItem.asset", 7, 7),
				new Scrap("Ocarina/OcarinaItem.asset", 10, 8),
				new Scrap("TotemOfUndying/TotemOfUndyingItem.asset", 6, 9)
			};
			int num = 0;
			config = new Config(((BaseUnityPlugin)this).Config, list);
			SetupScript.Network();
			foreach (Scrap item in list)
			{
				Item val2 = val.LoadAsset<Item>(text2 + item.asset);
				if (item.behaviourId != 0)
				{
					LoadItemBehaviour(val2, item.behaviourId);
				}
				NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
				Utilities.FixMixerGroups(val2.spawnPrefab);
				Items.RegisterScrap(val2, config.entries[num++].Value, (LevelTypes)(-1));
			}
			HarmonyPatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"ChillaxScraps is loaded !");
		}
	}
}
namespace ChillaxScraps.Utils
{
	public class Scrap
	{
		public string asset;

		public int rarity;

		public int behaviourId;

		public Scrap(string asset, int rarity, int behaviourId = 0)
		{
			this.asset = asset;
			this.rarity = rarity;
			this.behaviourId = behaviourId;
		}
	}
	public class SetupScript
	{
		public static void Network()
		{
			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 Copy(NoisemakerProp target, Item item)
		{
			NoisemakerProp component = item.spawnPrefab.GetComponent<NoisemakerProp>();
			((GrabbableObject)target).useCooldown = ((GrabbableObject)component).useCooldown;
			target.noiseAudio = component.noiseAudio;
			target.noiseAudioFar = component.noiseAudioFar;
			target.noiseSFX = (AudioClip[])(object)new AudioClip[component.noiseSFX.Length];
			for (int i = 0; i < component.noiseSFX.Length; i++)
			{
				target.noiseSFX[i] = component.noiseSFX[i];
			}
			target.noiseSFXFar = (AudioClip[])(object)new AudioClip[component.noiseSFXFar.Length];
			for (int j = 0; j < component.noiseSFXFar.Length; j++)
			{
				target.noiseSFXFar[j] = component.noiseSFXFar[j];
			}
			target.noiseRange = component.noiseRange;
			target.maxLoudness = component.maxLoudness;
			target.minLoudness = component.minLoudness;
			target.minPitch = component.minPitch;
			target.maxPitch = component.maxPitch;
			target.triggerAnimator = component.triggerAnimator;
			Object.Destroy((Object)(object)component);
		}

		public static void Copy(Shovel target, Item item)
		{
			Shovel component = item.spawnPrefab.GetComponent<Shovel>();
			target.shovelHitForce = component.shovelHitForce;
			target.reelUp = component.reelUp;
			target.swing = component.swing;
			target.hitSFX = (AudioClip[])(object)new AudioClip[component.hitSFX.Length];
			for (int i = 0; i < component.hitSFX.Length; i++)
			{
				target.hitSFX[i] = component.hitSFX[i];
			}
			target.shovelAudio = component.shovelAudio;
			Object.Destroy((Object)(object)component);
		}

		public static void Copy(SoccerBallProp target, Item item)
		{
			SoccerBallProp component = item.spawnPrefab.GetComponent<SoccerBallProp>();
			target.ballHitUpwardAmount = component.ballHitUpwardAmount;
			target.grenadeFallCurve = component.grenadeFallCurve;
			target.grenadeVerticalFallCurve = component.grenadeVerticalFallCurve;
			target.soccerBallVerticalOffset = component.soccerBallVerticalOffset;
			target.grenadeVerticalFallCurveNoBounce = component.grenadeVerticalFallCurveNoBounce;
			target.hitBallSFX = (AudioClip[])(object)new AudioClip[component.hitBallSFX.Length];
			for (int i = 0; i < component.hitBallSFX.Length; i++)
			{
				target.hitBallSFX[i] = component.hitBallSFX[i];
			}
			target.ballHitFloorSFX = (AudioClip[])(object)new AudioClip[component.ballHitFloorSFX.Length];
			for (int j = 0; j < component.ballHitFloorSFX.Length; j++)
			{
				target.ballHitFloorSFX[j] = component.ballHitFloorSFX[j];
			}
			target.soccerBallAudio = component.soccerBallAudio;
			target.ballCollider = component.ballCollider;
			GrabbableObjectPhysicsTrigger componentInChildren = item.spawnPrefab.GetComponentInChildren<GrabbableObjectPhysicsTrigger>();
			componentInChildren.itemScript = (GrabbableObject)(object)target;
			Object.Destroy((Object)(object)component);
		}
	}
	internal class Effects
	{
		public enum DeathAnimation
		{
			Normal,
			NoHead1,
			Spring,
			Haunted,
			Mask1,
			Mask2,
			Fire,
			CutInHalf,
			NoHead2
		}

		public static int NbOfPlayers()
		{
			return StartOfRound.Instance.connectedPlayersAmount + 1;
		}

		public static List<PlayerControllerB> GetPlayers(bool includeDead = false, bool excludeOutsideFactory = false)
		{
			List<PlayerControllerB> list = Object.FindObjectsOfType<PlayerControllerB>().ToList();
			List<PlayerControllerB> list2 = new List<PlayerControllerB>(list);
			foreach (PlayerControllerB item in list)
			{
				if (item.playerSteamId == 0 || !((NetworkBehaviour)item).IsSpawned || !item.isPlayerControlled || (!includeDead && item.isPlayerDead) || (excludeOutsideFactory && !item.isInsideFactory))
				{
					list2.Remove(item);
				}
			}
			return list2;
		}

		public static List<EnemyAI> GetEnemies(bool includeDead = false, bool includeCanDie = false, bool excludeDaytime = false)
		{
			List<EnemyAI> list = Object.FindObjectsOfType<EnemyAI>().ToList();
			List<EnemyAI> list2 = new List<EnemyAI>(list);
			if (includeDead)
			{
				return list2;
			}
			foreach (EnemyAI item in list)
			{
				if (!((NetworkBehaviour)item).IsSpawned || item.isEnemyDead || (!includeCanDie && !item.enemyType.canDie) || (excludeDaytime && item.enemyType.isDaytimeEnemy))
				{
					list2.Remove(item);
				}
			}
			return list2;
		}

		public static void Damage(PlayerControllerB player, int damageNb, CauseOfDeath cause = 0, int animation = 0, bool criticalBlood = true)
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			if (criticalBlood && player.health - damageNb <= 20)
			{
				player.bleedingHeavily = true;
			}
			player.DamagePlayer(damageNb, true, true, cause, animation, false, default(Vector3));
		}

		public static IEnumerator DamageHost(PlayerControllerB player, int damageNb, CauseOfDeath cause = 0, int animation = 0, bool criticalBlood = true)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			yield return (object)new WaitForEndOfFrame();
			Damage(player, damageNb, cause, animation, criticalBlood);
		}

		public static void Heal(ulong playerID, int health)
		{
			PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerID];
			val.health = health;
			val.criticallyInjured = false;
			val.bleedingHeavily = false;
			val.playerBodyAnimator.SetBool("Limp", false);
		}

		public static void Teleportation(PlayerControllerB player, Vector3 position, bool ship = false, bool exterior = false, bool interior = false)
		{
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			if (ship)
			{
				player.isInElevator = true;
				player.isInHangarShipRoom = true;
				player.isInsideFactory = false;
			}
			if (exterior)
			{
				player.isInElevator = false;
				player.isInHangarShipRoom = false;
				player.isInsideFactory = false;
			}
			if (interior)
			{
				player.isInElevator = false;
				player.isInHangarShipRoom = false;
				player.isInsideFactory = true;
			}
			player.averageVelocity = 0f;
			player.velocityLastFrame = Vector3.zero;
			player.TeleportPlayer(position, true, 0f, false, true);
			player.beamOutParticle.Play();
			HUDManager.Instance.ShakeCamera((ScreenShakeType)1);
		}

		public static void Knockback(Vector3 position, float range, int damage = 0, float physicsForce = 30f)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			Landmine.SpawnExplosion(position, false, 0f, range, damage, physicsForce, (GameObject)null, false);
		}

		public static void DropItem(Vector3 placingPosition = default(Vector3))
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			GameNetworkManager.Instance.localPlayerController.DiscardHeldObject(true, (NetworkObject)null, placingPosition, true);
		}

		public static void Audio(int audioID, float volume)
		{
			RoundManager.PlayRandomClip(HUDManager.Instance.UIAudio, (AudioClip[])(object)new AudioClip[1] { Plugin.audioClips[audioID] }, false, volume, 0, 1000);
		}

		public static void Audio(int audioID, Vector3 position, float volume, bool adjust = true)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: 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)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = position;
			if (adjust)
			{
				val += Vector3.up * 2f;
			}
			AudioSource.PlayClipAtPoint(Plugin.audioClips[audioID], val, volume);
		}

		public static void Audio(int audioID, Vector3 clientPosition, float hostVolume, float clientVolume, PlayerControllerB player)
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)player != (Object)null && GameNetworkManager.Instance.localPlayerController.playerClientId == player.playerClientId)
			{
				Audio(audioID, hostVolume);
			}
			else
			{
				Audio(audioID, clientPosition, clientVolume);
			}
		}

		public static void Audio(int audioID, Vector3 position, float volume, float pitch, bool adjust = true)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Expected O, but got Unknown
			//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)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			AudioClip val = Plugin.audioClips[audioID];
			Vector3 val2 = position;
			if (adjust)
			{
				val2 += Vector3.up * 2f;
			}
			GameObject val3 = new GameObject("One shot audio");
			val3.transform.position = val2;
			AudioSource val4 = (AudioSource)val3.AddComponent(typeof(AudioSource));
			val4.clip = val;
			val4.spatialBlend = 1f;
			val4.volume = volume;
			val4.pitch = pitch;
			val4.Play();
			Object.Destroy((Object)(object)val3, val.length * ((Time.timeScale < 0.01f) ? 0.01f : Time.timeScale));
		}

		public static IEnumerator FadeOutAudio(AudioSource source, float time)
		{
			yield return (object)new WaitForEndOfFrame();
			float volume = source.volume;
			while (source.volume > 0f)
			{
				source.volume -= volume * Time.deltaTime / time;
				yield return null;
			}
			source.Stop();
			source.volume = volume;
		}

		public static void Message(string title, string bottom, bool warning = false)
		{
			HUDManager.Instance.DisplayTip(title, bottom, warning, false, "LC_Tip1");
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class TotemItemPlayerControllerBPatch
	{
		[HarmonyPrefix]
		[HarmonyPatch("DamagePlayer")]
		public static void DamagePlayerTotemPrePatch(PlayerControllerB __instance, int damageNumber)
		{
			if (__instance.health - damageNumber <= 0)
			{
				TotemOfUndying.TrySavePlayer(__instance);
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch("KillPlayer")]
		public static void KillPlayerTotemPrePatch(PlayerControllerB __instance)
		{
			TotemOfUndying.TrySavePlayer(__instance);
		}

		[HarmonyPostfix]
		[HarmonyPatch("DamagePlayer")]
		public static void DamagePlayerTotemPostPatch(PlayerControllerB __instance, int damageNumber)
		{
			if (__instance.health - damageNumber <= 0)
			{
				TotemOfUndying.TryDestroyItem(__instance);
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch("KillPlayer")]
		public static void KillPlayerTotemPostPatch(PlayerControllerB __instance)
		{
			TotemOfUndying.TryDestroyItem(__instance);
		}
	}
}
namespace ChillaxScraps.CustomEffects
{
	internal class Boink : PhysicsProp
	{
		public bool isActive = false;

		public float elapsedTime = 0f;

		public Vector3 force;

		public Boink()
		{
			((GrabbableObject)this).useCooldown = 2f;
		}

		public override void OnNetworkSpawn()
		{
			((NetworkBehaviour)this).OnNetworkSpawn();
			if (((GrabbableObject)this).insertedBattery != null)
			{
				((GrabbableObject)this).insertedBattery.charge = 1f;
			}
		}

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			((GrabbableObject)this).ItemActivate(used, buttonDown);
			if ((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null && ((GrabbableObject)this).insertedBattery != null && ((GrabbableObject)this).insertedBattery.charge > 0f)
			{
				Vector3 val = GetDirection() + Vector3.up;
				BoinkServerRpc(((Vector3)(ref val)).normalized * 500f, 0.5f, 2, ((Component)((GrabbableObject)this).playerHeldBy).transform.position, 0.8f, 2.7f);
			}
		}

		public override void Update()
		{
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: 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)
			((GrabbableObject)this).Update();
			if ((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null && isActive)
			{
				elapsedTime -= Time.deltaTime;
				((GrabbableObject)this).playerHeldBy.externalForces = Vector3.Lerp(((GrabbableObject)this).playerHeldBy.externalForces, force, Time.deltaTime * 5f);
				if (elapsedTime < 0f)
				{
					isActive = false;
				}
			}
		}

		private Vector3 GetDirection()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: 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)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			if (!Plugin.config.evilBoink.Value)
			{
				return -((Component)this).transform.forward;
			}
			int num = Random.Range(0, 10);
			if (num <= 7)
			{
				return -((Component)this).transform.forward;
			}
			if (num == 8)
			{
				if (Random.Range(0, 2) == 0)
				{
					return -((Component)this).transform.right;
				}
				return ((Component)this).transform.right;
			}
			if (Random.Range(0, 2) == 0)
			{
				return ((Component)this).transform.forward;
			}
			return -((Component)this).transform.forward;
		}

		[ServerRpc(RequireOwnership = false)]
		private void BoinkServerRpc(Vector3 force, float duration, int audioID, Vector3 clientPosition, float hostVolume, float clientVolume = 0f)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: 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_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_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2418218142u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref force);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref duration, default(ForPrimitives));
					BytePacker.WriteValueBitPacked(val2, audioID);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref clientPosition);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref hostVolume, default(ForPrimitives));
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref clientVolume, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2418218142u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					BoinkClientRpc(force, duration, audioID, clientPosition, hostVolume, (clientVolume == 0f) ? hostVolume : clientVolume);
				}
			}
		}

		[ClientRpc]
		private void BoinkClientRpc(Vector3 force, float duration, int audioID, Vector3 clientPosition, float hostVolume, float clientVolume)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: 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_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_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: 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)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2019346981u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref force);
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref duration, default(ForPrimitives));
				BytePacker.WriteValueBitPacked(val2, audioID);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref clientPosition);
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref hostVolume, default(ForPrimitives));
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref clientVolume, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2019346981u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				if ((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null)
				{
					this.force = force;
					elapsedTime = duration;
					isActive = true;
				}
				Effects.Audio(audioID, clientPosition, hostVolume, clientVolume, ((GrabbableObject)this).playerHeldBy);
			}
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_Boink()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(2418218142u, new RpcReceiveHandler(__rpc_handler_2418218142));
			NetworkManager.__rpc_func_table.Add(2019346981u, new RpcReceiveHandler(__rpc_handler_2019346981));
		}

		private static void __rpc_handler_2418218142(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: 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_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 val = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref val);
				float duration = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref duration, default(ForPrimitives));
				int audioID = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref audioID);
				Vector3 clientPosition = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref clientPosition);
				float hostVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref hostVolume, default(ForPrimitives));
				float clientVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref clientVolume, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Boink)(object)target).BoinkServerRpc(val, duration, audioID, clientPosition, hostVolume, clientVolume);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2019346981(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: 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_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 val = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref val);
				float duration = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref duration, default(ForPrimitives));
				int audioID = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref audioID);
				Vector3 clientPosition = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref clientPosition);
				float hostVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref hostVolume, default(ForPrimitives));
				float clientVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref clientVolume, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Boink)(object)target).BoinkClientRpc(val, duration, audioID, clientPosition, hostVolume, clientVolume);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "Boink";
		}
	}
	internal class DeathNote : PhysicsProp
	{
		public bool canUseDeathNote = true;

		public bool isOpened = false;

		public List<PlayerControllerB> playerList;

		public List<EnemyAI> enemyList;

		private DeathNoteCanvas canvas;

		private readonly GameObject canvasPrefab;

		public DeathNote()
		{
			((GrabbableObject)this).useCooldown = 2f;
			canvasPrefab = Plugin.gameObjects[0];
		}

		public override void EquipItem()
		{
			SetControlTips();
			((GrabbableObject)this).EnableItemMeshes(true);
			((GrabbableObject)this).isPocketed = false;
			if (!((GrabbableObject)this).hasBeenHeld)
			{
				((GrabbableObject)this).hasBeenHeld = true;
				if (!((GrabbableObject)this).isInShipRoom && !StartOfRound.Instance.inShipPhase && StartOfRound.Instance.currentLevel.spawnEnemiesAndScrap)
				{
					RoundManager instance = RoundManager.Instance;
					instance.valueOfFoundScrapItems += ((GrabbableObject)this).scrapValue;
				}
			}
		}

		public override void SetControlTipsForItem()
		{
			SetControlTips();
		}

		private void SetControlTips()
		{
			string[] array = ((!canUseDeathNote) ? new string[1] { "" } : new string[1] { "Write a name : [RMB]" });
			if (((NetworkBehaviour)this).IsOwner)
			{
				HUDManager.Instance.ChangeControlTipMultiple(array, true, ((GrabbableObject)this).itemProperties);
			}
		}

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			((GrabbableObject)this).ItemActivate(used, buttonDown);
			if (!buttonDown || !((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null) || !((NetworkBehaviour)this).IsOwner || isOpened)
			{
				return;
			}
			if (canUseDeathNote)
			{
				if (!StartOfRound.Instance.inShipPhase)
				{
					AudioServerRpc(0, ((Component)((GrabbableObject)this).playerHeldBy).transform.position, 1f);
					playerList = Effects.GetPlayers();
					enemyList = Effects.GetEnemies(includeDead: false, includeCanDie: false, excludeDaytime: true);
					canvas = Object.Instantiate<GameObject>(canvasPrefab, ((Component)this).transform).GetComponent<DeathNoteCanvas>();
					canvas.Initialize(this);
					isOpened = true;
					Cursor.visible = true;
					Cursor.lockState = (CursorLockMode)0;
					DeathNoteCanvas deathNoteCanvas = canvas;
					deathNoteCanvas.onExit = (Action)Delegate.Combine(deathNoteCanvas.onExit, new Action(CloseDeathNote));
				}
				else
				{
					Effects.Message("Wow...", "That's one way of wasting death's powers.", warning: true);
					canUseDeathNote = false;
					SetControlTips();
				}
			}
			else
			{
				Effects.Message("?", "The book doesn't acknowledge you as one of its owners anymore.");
			}
		}

		private void CloseDeathNote()
		{
			Cursor.visible = false;
			Cursor.lockState = (CursorLockMode)1;
			isOpened = false;
		}

		public override void PocketItem()
		{
			((GrabbableObject)this).PocketItem();
			if ((Object)(object)canvas != (Object)null)
			{
				canvas.Close();
			}
		}

		public override void DiscardItem()
		{
			((GrabbableObject)this).DiscardItem();
			if ((Object)(object)canvas != (Object)null)
			{
				canvas.Close();
			}
		}

		public void ActivateDeathNote(GameObject objectToKill)
		{
			bool flag = true;
			CloseDeathNote();
			PlayerControllerB val = default(PlayerControllerB);
			EnemyAI val2 = default(EnemyAI);
			if (((Component)objectToKill.transform).TryGetComponent<PlayerControllerB>(ref val) && (Object)(object)val != (Object)null && !val.isPlayerDead && ((NetworkBehaviour)val).IsSpawned && val.isPlayerControlled)
			{
				KillPlayerDeathNoteServerRpc(val.playerClientId, ((NetworkBehaviour)val).OwnerClientId);
			}
			else if (((Component)objectToKill.transform).TryGetComponent<EnemyAI>(ref val2) && (Object)(object)val2 != (Object)null && !val2.isEnemyDead && ((NetworkBehaviour)val2).IsSpawned)
			{
				val2.KillEnemyServerRpc(false);
			}
			else
			{
				flag = false;
			}
			if (flag)
			{
				canUseDeathNote = false;
				SetControlTips();
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void AudioServerRpc(int audioID, Vector3 clientPosition, float hostVolume, float clientVolume = 0f)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: 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_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: 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_00b8: 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_010e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3001411326u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, audioID);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref clientPosition);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref hostVolume, default(ForPrimitives));
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref clientVolume, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3001411326u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					AudioClientRpc(audioID, clientPosition, hostVolume, (clientVolume == 0f) ? hostVolume : clientVolume);
				}
			}
		}

		[ClientRpc]
		private void AudioClientRpc(int audioID, Vector3 clientPosition, float hostVolume, float clientVolume)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: 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_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: 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_00b8: 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_010d: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2987616561u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, audioID);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref clientPosition);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref hostVolume, default(ForPrimitives));
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref clientVolume, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2987616561u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Effects.Audio(audioID, clientPosition, hostVolume, clientVolume, ((GrabbableObject)this).playerHeldBy);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void KillPlayerDeathNoteServerRpc(ulong playerId, 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_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)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: 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_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2351612478u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					BytePacker.WriteValueBitPacked(val2, clientId);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2351612478u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>();
					ClientRpcParams val3 = default(ClientRpcParams);
					val3.Send = new ClientRpcSendParams
					{
						TargetClientIds = new ulong[1] { clientId }
					};
					ClientRpcParams clientRpcParams = val3;
					KillPlayerDeathNoteClientRpc(component.playerClientId, clientRpcParams);
				}
			}
		}

		[ClientRpc]
		private void KillPlayerDeathNoteClientRpc(ulong playerId, ClientRpcParams clientRpcParams = default(ClientRpcParams))
		{
			//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)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3777474104u, clientRpcParams, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val, playerId);
					((NetworkBehaviour)this).__endSendClientRpc(ref val, 3777474104u, clientRpcParams, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					PlayerControllerB component = StartOfRound.Instance.allPlayerObjects[playerId].GetComponent<PlayerControllerB>();
					((MonoBehaviour)this).StartCoroutine(DeathNoteKill(component));
				}
			}
		}

		private IEnumerator DeathNoteKill(PlayerControllerB player)
		{
			if (((NetworkBehaviour)player).IsOwner)
			{
				Effects.Audio(1, 2.5f);
			}
			yield return (object)new WaitForSeconds(3f);
			Effects.Damage(player, 100, (CauseOfDeath)0, 3);
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_DeathNote()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(3001411326u, new RpcReceiveHandler(__rpc_handler_3001411326));
			NetworkManager.__rpc_func_table.Add(2987616561u, new RpcReceiveHandler(__rpc_handler_2987616561));
			NetworkManager.__rpc_func_table.Add(2351612478u, new RpcReceiveHandler(__rpc_handler_2351612478));
			NetworkManager.__rpc_func_table.Add(3777474104u, new RpcReceiveHandler(__rpc_handler_3777474104));
		}

		private static void __rpc_handler_3001411326(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int audioID = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref audioID);
				Vector3 clientPosition = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref clientPosition);
				float hostVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref hostVolume, default(ForPrimitives));
				float clientVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref clientVolume, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((DeathNote)(object)target).AudioServerRpc(audioID, clientPosition, hostVolume, clientVolume);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2987616561(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int audioID = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref audioID);
				Vector3 clientPosition = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref clientPosition);
				float hostVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref hostVolume, default(ForPrimitives));
				float clientVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref clientVolume, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((DeathNote)(object)target).AudioClientRpc(audioID, clientPosition, hostVolume, clientVolume);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2351612478(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong playerId = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				ulong clientId = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref clientId);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((DeathNote)(object)target).KillPlayerDeathNoteServerRpc(playerId, clientId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3777474104(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong playerId = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				ClientRpcParams client = rpcParams.Client;
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((DeathNote)(object)target).KillPlayerDeathNoteClientRpc(playerId, client);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "DeathNote";
		}
	}
	internal class DeathNoteCanvas : MonoBehaviour
	{
		[SerializeField]
		private Button closeButton;

		[SerializeField]
		private GameObject namesPrefab;

		[SerializeField]
		private Transform contentContainer;

		private DeathNote _deathNote;

		public Action onExit;

		public void Initialize(DeathNote deathNote)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Expected O, but got Unknown
			foreach (Transform item in contentContainer)
			{
				Transform val = item;
				Object.Destroy((Object)(object)((Component)val).gameObject);
			}
			((UnityEvent)closeButton.onClick).AddListener(new UnityAction(Close));
			_deathNote = deathNote;
			onExit = (Action)Delegate.Combine(onExit, new Action(OnExit));
			foreach (PlayerControllerB player in deathNote.playerList)
			{
				DeathNoteName component = Object.Instantiate<GameObject>(namesPrefab, contentContainer).GetComponent<DeathNoteName>();
				component.Initialize(((Component)player).gameObject, _deathNote, this);
			}
			foreach (EnemyAI enemy in deathNote.enemyList)
			{
				DeathNoteName component2 = Object.Instantiate<GameObject>(namesPrefab, contentContainer).GetComponent<DeathNoteName>();
				component2.Initialize(((Component)enemy).gameObject, _deathNote, this);
			}
		}

		private void OnExit()
		{
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}

		public void Close()
		{
			onExit?.Invoke();
		}
	}
	internal class DeathNoteName : MonoBehaviour
	{
		[SerializeField]
		private TMP_Text nameText;

		[SerializeField]
		private Button killButton;

		private GameObject _objectToKill;

		private DeathNote _deathNote;

		private DeathNoteCanvas _deathNoteCanvas;

		public void Initialize(GameObject objectToKill, DeathNote deathNote, DeathNoteCanvas deathNoteCanvas)
		{
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			_deathNote = deathNote;
			_objectToKill = objectToKill;
			_deathNoteCanvas = deathNoteCanvas;
			PlayerControllerB val = default(PlayerControllerB);
			EnemyAI val2 = default(EnemyAI);
			if (((Component)objectToKill.transform).TryGetComponent<PlayerControllerB>(ref val))
			{
				nameText.text = val.playerUsername;
			}
			else if (((Component)objectToKill.transform).TryGetComponent<EnemyAI>(ref val2))
			{
				nameText.text = ((object)val2.enemyType).ToString();
			}
			((UnityEvent)killButton.onClick).AddListener(new UnityAction(Kill));
		}

		private void Kill()
		{
			_deathNote.ActivateDeathNote(_objectToKill);
			_deathNoteCanvas.Close();
		}
	}
	internal class EmergencyMeeting : PhysicsProp
	{
		public bool hasBeenUsed = false;

		public List<PlayerControllerB> playerList;

		private readonly GameObject canvasPrefab;

		public EmergencyMeeting()
		{
			((GrabbableObject)this).useCooldown = 1f;
			canvasPrefab = Plugin.gameObjects[1];
		}

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			((GrabbableObject)this).ItemActivate(used, buttonDown);
			if (!buttonDown || !((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null))
			{
				return;
			}
			if (!StartOfRound.Instance.inShipPhase && StartOfRound.Instance.shipHasLanded && ((GrabbableObject)this).playerHeldBy.isInsideFactory)
			{
				playerList = Effects.GetPlayers(includeDead: false, excludeOutsideFactory: true);
				playerList.Remove(((GrabbableObject)this).playerHeldBy);
				if (playerList.Count <= 0)
				{
					Effects.Message("?", "The button has been pushed, yet your crewmates are nowhere to be seen.");
					return;
				}
				hasBeenUsed = true;
				MeetingEffect();
				EmergencyMeetingServerRpc(((Component)((GrabbableObject)this).playerHeldBy).transform.position, ((GrabbableObject)this).playerHeldBy.playerClientId, playerList.Select((PlayerControllerB p) => ((NetworkBehaviour)p).OwnerClientId).ToArray());
				DestroyObjectServerRpc(StartOfRound.Instance.localPlayerController.playerClientId);
			}
			else
			{
				Effects.Message("Meetings can only be held inside the facility", "");
			}
		}

		private void MeetingEffect()
		{
			Effects.Audio(5, 1.5f);
			GameObject val = Object.Instantiate<GameObject>(canvasPrefab);
			Object.Destroy((Object)(object)val, 5f);
		}

		[ServerRpc(RequireOwnership = false)]
		private void EmergencyMeetingServerRpc(Vector3 position, ulong originalPlayerId, ulong[] targetedClientIds)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: 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_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: 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_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: 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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(229189672u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
				BytePacker.WriteValueBitPacked(val2, originalPlayerId);
				bool flag = targetedClientIds != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe<ulong>(targetedClientIds, default(ForPrimitives));
				}
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 229189672u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val3 = default(ClientRpcParams);
				val3.Send = new ClientRpcSendParams
				{
					TargetClientIds = targetedClientIds
				};
				ClientRpcParams clientRpcParams = val3;
				PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[originalPlayerId];
				bool flag2 = val4.isInHangarShipRoom && val4.isInElevator;
				bool isInsideFactory = val4.isInsideFactory;
				bool exterior = !flag2 && !isInsideFactory;
				EmergencyMeetingClientRpc(position, flag2, exterior, isInsideFactory, clientRpcParams);
			}
		}

		[ClientRpc]
		private void EmergencyMeetingClientRpc(Vector3 position, bool ship, bool exterior, bool interior, ClientRpcParams clientRpcParams = default(ClientRpcParams))
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: 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_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_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: 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_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2439106301u, clientRpcParams, (RpcDelivery)0);
					((FastBufferWriter)(ref val)).WriteValueSafe(ref position);
					((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref ship, default(ForPrimitives));
					((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref exterior, default(ForPrimitives));
					((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref interior, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val, 2439106301u, clientRpcParams, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					MeetingEffect();
					Effects.Teleportation(StartOfRound.Instance.localPlayerController, position, ship, exterior, interior);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void DestroyObjectServerRpc(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)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3719848167u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerID);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3719848167u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					DestroyObjectClientRpc(playerID);
				}
			}
		}

		[ClientRpc]
		private void DestroyObjectClientRpc(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)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4283889686u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerID);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4283889686u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((GrabbableObject)this).DestroyObjectInHand(StartOfRound.Instance.allPlayerScripts[playerID]);
				}
			}
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_EmergencyMeeting()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(229189672u, new RpcReceiveHandler(__rpc_handler_229189672));
			NetworkManager.__rpc_func_table.Add(2439106301u, new RpcReceiveHandler(__rpc_handler_2439106301));
			NetworkManager.__rpc_func_table.Add(3719848167u, new RpcReceiveHandler(__rpc_handler_3719848167));
			NetworkManager.__rpc_func_table.Add(4283889686u, new RpcReceiveHandler(__rpc_handler_4283889686));
		}

		private static void __rpc_handler_229189672(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0030: 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_004f: 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_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				ulong originalPlayerId = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref originalPlayerId);
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				ulong[] targetedClientIds = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe<ulong>(ref targetedClientIds, default(ForPrimitives));
				}
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((EmergencyMeeting)(object)target).EmergencyMeetingServerRpc(position, originalPlayerId, targetedClientIds);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2439106301(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: 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_00bb: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 position = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref position);
				bool ship = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref ship, default(ForPrimitives));
				bool exterior = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref exterior, default(ForPrimitives));
				bool interior = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref interior, default(ForPrimitives));
				ClientRpcParams client = rpcParams.Client;
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((EmergencyMeeting)(object)target).EmergencyMeetingClientRpc(position, ship, exterior, interior, client);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3719848167(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong playerID = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerID);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((EmergencyMeeting)(object)target).DestroyObjectServerRpc(playerID);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_4283889686(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong playerID = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerID);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((EmergencyMeeting)(object)target).DestroyObjectClientRpc(playerID);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "EmergencyMeeting";
		}
	}
	internal class Food : PhysicsProp
	{
		public int healPower = 50;

		public float staminaPower = 0.5f;

		public Vector3 originalPosition = new Vector3(-0.1f, 0.1f, -0.1f);

		public Vector3 originalRotation = new Vector3(90f, 0f, -90f);

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			((GrabbableObject)this).ItemActivate(used, buttonDown);
			if ((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null && !((GrabbableObject)this).playerHeldBy.activatingItem)
			{
				UpdatePosRotServerRpc(new Vector3(0.1f, 0.1f, 0f), new Vector3(90f, 90f, -90f));
				((GrabbableObject)this).playerHeldBy.activatingItem = buttonDown;
				((GrabbableObject)this).playerHeldBy.playerBodyAnimator.SetBool("useTZPItem", buttonDown);
				((MonoBehaviour)this).StartCoroutine(FoodEffect(((GrabbableObject)this).playerHeldBy));
			}
		}

		private IEnumerator FoodEffect(PlayerControllerB player)
		{
			yield return (object)new WaitForSeconds(0.8f);
			AudioServerRpc(3, ((Component)player).transform.position, 1f, 1.5f);
			UpdatePosRotServerRpc(originalPosition, originalRotation);
			player.playerBodyAnimator.SetBool("useTZPItem", false);
			player.activatingItem = false;
			if (!player.isPlayerDead && !StartOfRound.Instance.inShipPhase)
			{
				ulong playerID = StartOfRound.Instance.localPlayerController.playerClientId;
				if (player.sprintMeter + staminaPower > 1f)
				{
					player.sprintMeter = 1f;
				}
				else
				{
					player.sprintMeter += staminaPower;
				}
				if (player.health + healPower > 100)
				{
					HealPlayerServerRpc(playerID, 100);
				}
				else
				{
					HealPlayerServerRpc(playerID, player.health + healPower);
				}
				HUDManager.Instance.UpdateHealthUI(player.health, false);
				DestroyObjectServerRpc(playerID);
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void AudioServerRpc(int audioID, Vector3 clientPosition, float hostVolume, float clientVolume = 0f)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: 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_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: 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_00b8: 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_010e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(194644253u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, audioID);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref clientPosition);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref hostVolume, default(ForPrimitives));
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref clientVolume, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 194644253u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					AudioClientRpc(audioID, clientPosition, hostVolume, (clientVolume == 0f) ? hostVolume : clientVolume);
				}
			}
		}

		[ClientRpc]
		private void AudioClientRpc(int audioID, Vector3 clientPosition, float hostVolume, float clientVolume)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: 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_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: 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_00b8: 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_010d: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(279624341u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, audioID);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref clientPosition);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref hostVolume, default(ForPrimitives));
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref clientVolume, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 279624341u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Effects.Audio(audioID, clientPosition, hostVolume, clientVolume, ((GrabbableObject)this).playerHeldBy);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void UpdatePosRotServerRpc(Vector3 newPos, Vector3 newRot)
		{
			//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_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)
			//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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3113443793u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref newPos);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref newRot);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3113443793u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					UpdatePosRotClientRpc(newPos, newRot);
				}
			}
		}

		[ClientRpc]
		private void UpdatePosRotClientRpc(Vector3 newPos, Vector3 newRot)
		{
			//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_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1494030016u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref newPos);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref newRot);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1494030016u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((GrabbableObject)this).itemProperties.positionOffset = newPos;
					((GrabbableObject)this).itemProperties.rotationOffset = newRot;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void HealPlayerServerRpc(ulong playerID, int health)
		{
			//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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2791320175u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerID);
					BytePacker.WriteValueBitPacked(val2, health);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2791320175u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					HealPlayerClientRpc(playerID, health);
				}
			}
		}

		[ClientRpc]
		private void HealPlayerClientRpc(ulong playerID, int health)
		{
			//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)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1275218439u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerID);
					BytePacker.WriteValueBitPacked(val2, health);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1275218439u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Effects.Heal(playerID, health);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void DestroyObjectServerRpc(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)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2783069665u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerID);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2783069665u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					DestroyObjectClientRpc(playerID);
				}
			}
		}

		[ClientRpc]
		private void DestroyObjectClientRpc(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)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2838702744u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerID);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2838702744u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((GrabbableObject)this).DestroyObjectInHand(StartOfRound.Instance.allPlayerScripts[playerID]);
				}
			}
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_Food()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(194644253u, new RpcReceiveHandler(__rpc_handler_194644253));
			NetworkManager.__rpc_func_table.Add(279624341u, new RpcReceiveHandler(__rpc_handler_279624341));
			NetworkManager.__rpc_func_table.Add(3113443793u, new RpcReceiveHandler(__rpc_handler_3113443793));
			NetworkManager.__rpc_func_table.Add(1494030016u, new RpcReceiveHandler(__rpc_handler_1494030016));
			NetworkManager.__rpc_func_table.Add(2791320175u, new RpcReceiveHandler(__rpc_handler_2791320175));
			NetworkManager.__rpc_func_table.Add(1275218439u, new RpcReceiveHandler(__rpc_handler_1275218439));
			NetworkManager.__rpc_func_table.Add(2783069665u, new RpcReceiveHandler(__rpc_handler_2783069665));
			NetworkManager.__rpc_func_table.Add(2838702744u, new RpcReceiveHandler(__rpc_handler_2838702744));
		}

		private static void __rpc_handler_194644253(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int audioID = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref audioID);
				Vector3 clientPosition = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref clientPosition);
				float hostVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref hostVolume, default(ForPrimitives));
				float clientVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref clientVolume, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Food)(object)target).AudioServerRpc(audioID, clientPosition, hostVolume, clientVolume);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_279624341(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int audioID = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref audioID);
				Vector3 clientPosition = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref clientPosition);
				float hostVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref hostVolume, default(ForPrimitives));
				float clientVolume = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref clientVolume, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Food)(object)target).AudioClientRpc(audioID, clientPosition, hostVolume, clientVolume);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3113443793(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 newPos = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref newPos);
				Vector3 newRot = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref newRot);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Food)(object)target).UpdatePosRotServerRpc(newPos, newRot);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1494030016(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 newPos = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref newPos);
				Vector3 newRot = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref newRot);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Food)(object)target).UpdatePosRotClientRpc(newPos, newRot);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2791320175(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong playerID = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerID);
				int health = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref health);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Food)(object)target).HealPlayerServerRpc(playerID, health);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1275218439(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong playerID = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerID);
				int health = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref h