Decompiled source of ContentAPI v0.0.5

ContentAPI.dll

Decompiled 34 minutes ago
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using ContentAPI.API.Components;
using ContentAPI.API.Enums;
using ContentAPI.API.Features;
using ContentAPI.API.Features.Bots;
using ContentAPI.API.Interface;
using ContentAPI.API.Interface.Events;
using ContentAPI.API.Struct;
using ContentAPI.Events.EventArgs.Content;
using ContentAPI.Events.EventArgs.Monsters;
using ContentAPI.Events.EventArgs.Player;
using ContentAPI.Events.Handlers;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using Photon.Realtime;
using Steamworks;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using Zorro.Core;
using Zorro.Core.CLI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyCompany("CircusStudios")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyCopyright("GNU")]
[assembly: AssemblyDescription("API framework for Content Warning")]
[assembly: AssemblyFileVersion("0.0.5.0")]
[assembly: AssemblyInformationalVersion("0.0.5+eee8da2a714adeab7cce8e8ee149f457ac0b0834")]
[assembly: AssemblyProduct("ContentAPI")]
[assembly: AssemblyTitle("ContentAPI")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/CircusStudios/ContentAPI/")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.5.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace ContentAPI
{
	[BepInPlugin("Circus.ContentAPI", "ContentAPI", "0.0.5")]
	public class ContentBepinLoad : BaseUnityPlugin
	{
		private void Awake()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
			_ = ContentPlugin.GameObject;
			new Harmony("Circus.ContentAPI").PatchAll();
		}
	}
	[ContentWarningPlugin("Circus.ContentAPI", "0.0.5", true)]
	public static class ContentPlugin
	{
		public const string ContentGuid = "Circus.ContentAPI";

		public const string ContentName = "ContentAPI";

		public const string ContentVersion = "0.0.5";

		public const bool ContentVanillaCompatible = true;

		public static GameObject GameObject { get; private set; }

		static ContentPlugin()
		{
			CreateObjects();
		}

		private static void CreateObjects()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			GameObject = new GameObject("ContentAPI");
			((Object)GameObject).hideFlags = (HideFlags)61;
			Object.DontDestroyOnLoad((Object)(object)GameObject);
			GameObject.AddComponent<CustomInputHandler>();
		}
	}
}
namespace ContentAPI.Patch.Generic
{
	[HarmonyPatch(typeof(Pickup), "Awake")]
	internal class PickupWrapPatch
	{
		private static void Postfix(Pickup __instance)
		{
			new Pickup(__instance);
		}
	}
	[HarmonyPatch(typeof(Pickup), "OnDisable")]
	internal class PickupWrapPatch_Remove
	{
		private static void Prefix(Pickup __instance)
		{
			Pickup pickup = Pickup.Get(__instance.m_itemID);
			if (pickup != null)
			{
				Pickup.Items.Remove(pickup);
			}
		}
	}
}
namespace ContentAPI.Patches.Generic
{
	[HarmonyPatch(typeof(Bot), "OnDestroy")]
	internal class BotSpawnPatch
	{
		private static void Postfix(Bot __instance)
		{
			Bot.Get(__instance).Remove();
		}
	}
	[HarmonyPatch(typeof(Bot_Angler), "Start")]
	internal class BotSpawnPatch_Angler
	{
		private static void PostFix(Bot_Angler __instance)
		{
			new Angler(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_BarnacleBall), "Start")]
	internal class BotSpawnPatch_BarnacleBall
	{
		private static void Postfix(Bot_BarnacleBall __instance)
		{
			new BarnacleBall(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_BigSlap), "Start")]
	internal class BotSpawnPatch_BigSlap
	{
		private static void Postfix(Bot_BigSlap __instance)
		{
			new BigSlap(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_CameraCreep), "Start")]
	internal class BotSpawnPatch_CameraCreep
	{
		private static void Postfix(Bot_CameraCreep __instance)
		{
			new CameraCreep(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Chaser), "Start")]
	internal class BotSpawnPatch_Chaser
	{
		private static void Postfix(Bot_Chaser __instance)
		{
			new Chaser(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Drag), "Start")]
	internal class BotSpawnPatch_Drag
	{
		private static void Postfix(Bot_Drag __instance)
		{
			new Drag(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Ear), "Start")]
	internal class BotSpawnPatch_Ear
	{
		private static void Postfix(Bot_Ear __instance)
		{
			new Ear(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_EyeGuy), "Start")]
	internal class BotSpawnPatch_EyeGuy
	{
		private static void Postfix(Bot_EyeGuy __instance)
		{
			new EyeGuy(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Fear), "Start")]
	internal class BotSpawnPatch_Fear
	{
		private static void Postfix(Bot_Fear __instance)
		{
			new Fear(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Ghost), "Start")]
	internal class BotSpawnPatch_Ghost
	{
		private static void Postfix(Bot_Ghost __instance)
		{
			new Ghost(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Infiltrator), "Awake")]
	internal class BotSpawnPatch_Infiltrator
	{
		private static void Postfix(Bot_Infiltrator __instance)
		{
			new Infiltrator(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Jelly), "Start")]
	internal class BotSpawnPatch_Jelly
	{
		private static void Postfix(Bot_Jelly __instance)
		{
			new Jelly(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Knifo), "Start")]
	internal class BotSpawnPatch_Knifo
	{
		private static void Postfix(Bot_Knifo __instance)
		{
			new Knifo(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_LookY), "Start")]
	internal class BotSpawnPatch_LookY
	{
		private static void Postfix(Bot_LookY __instance)
		{
			new LookY(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_MimicInfiltrator), "Awake")]
	internal class BotSpawnPatch_MimicInfiltrator
	{
		private static void Postfix(Bot_MimicInfiltrator __instance)
		{
			new MimicInfiltrator(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Mouth), "Start")]
	internal class BotSpawnPatch_Mouth
	{
		private static void Postfix(Bot_Mouth __instance)
		{
			new Mouth(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Skinny), "Start")]
	internal class BotSpawnPatch_Skinny
	{
		private static void Postfix(Bot_Skinny __instance)
		{
			new Skinny(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Snactcho), "Start")]
	internal class BotSpawnPatch_Snactcho
	{
		private static void Postfix(Bot_Snactcho __instance)
		{
			new Snactcho(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_ToolkitBoy), "Start")]
	internal class BotSpawnPatch_ToolkitBoy
	{
		private static void Postfix(Bot_ToolkitBoy __instance)
		{
			new ToolkitBoy(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Wallo), "Start")]
	internal class BotSpawnPatch_Wallo
	{
		private static void Postfix(Bot_Wallo __instance)
		{
			new Wallo(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Weeping), "Start")]
	internal class BotSpawnPatch_Weeping
	{
		private static void Postfix(Bot_Weeping __instance)
		{
			new Weeping(__instance);
		}
	}
	[HarmonyPatch(typeof(Bot_Zombie), "Start")]
	internal class BotSpawnPatch_Zombie
	{
		private static void Postfix(Bot_Zombie __instance)
		{
			new Zombie(__instance);
		}
	}
	[HarmonyPatch(typeof(DivingBell), "Awake")]
	internal class DivingBellPatch
	{
		private static void Postfix(DivingBell __instance)
		{
			new DivingBell(__instance);
		}
	}
	[HarmonyPatch(typeof(Player), "DoInits")]
	internal class PlayerWrapPatch
	{
		private static void Postfix(Player __instance)
		{
			Player player = new Player(__instance);
			PlayerEventHandler.PlayerCreated.Invoke(new PlayerCreatedEventArgs(player));
		}
	}
	[HarmonyPatch(typeof(Player), "OnDestroy")]
	internal class RemovePlayerPatch
	{
		private static void Prefix(Player __instance)
		{
			PlayerEventHandler.PlayerDestroying.Invoke(new PlayerDestroyingEventArgs(Player.Get(__instance)));
			Player.DestroyPlayer(__instance);
		}
	}
	[HarmonyPatch(typeof(ShopHandler), "InitShopHandler")]
	internal class ShopHandlerPatch
	{
		private static void Postfix(ShopHandler __instance)
		{
			new Shop(__instance);
		}
	}
	[HarmonyPatch(typeof(GameHandler), "Initialize")]
	internal class SpawnItem
	{
		private static void Postfix(GameHandler __instance)
		{
			foreach (Item @object in ((DatabaseAsset<ItemDatabase, Item>)(object)SingletonAsset<ItemDatabase>.Instance).Objects)
			{
				new Item(@object);
			}
		}
	}
}
namespace ContentAPI.Patches.Fixes
{
	[HarmonyPatch(typeof(DebugUIHandler), "Update")]
	internal class DebugUIHandlerPatch
	{
		private static void Postfix(DebugUIHandler __instance)
		{
			if (Input.GetKeyDown((KeyCode)282))
			{
				if (__instance.IsOpen)
				{
					__instance.Hide();
				}
				else
				{
					__instance.Show();
				}
			}
		}
	}
}
namespace ContentAPI.Patches.Events.Player
{
	[HarmonyPatch(typeof(DivingBellSuitCellUI), "Set")]
	internal class DivingBellTextEvent
	{
		private static void Postfix(DivingBellSuitCellUI __instance, Player player, float dst)
		{
			DivingBellTextEventArgs divingBellTextEventArgs = new DivingBellTextEventArgs(ContentAPI.API.Features.Player.Get(player), __instance.m_nameText, __instance.m_oxygenText, __instance.m_distanceText, dst);
			PlayerEventHandler.DivingBellText.Invoke(divingBellTextEventArgs);
		}
	}
	[HarmonyPatch(typeof(SFX_Player), "PlayNoise")]
	internal class PlayNoiseEvent
	{
		private static bool Prefix(ref Vector3 position, ref float distance, ref int alerts)
		{
			//IL_0002: 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)
			NoiseEventArgs noiseEventArgs = new NoiseEventArgs(position, distance, alerts);
			PlayerEventHandler.Noise.Invoke(noiseEventArgs);
			if (!noiseEventArgs.IsAllowed)
			{
				return false;
			}
			position = noiseEventArgs.Position;
			distance = noiseEventArgs.Distance;
			alerts = noiseEventArgs.Alerts;
			return true;
		}
	}
	[HarmonyPatch(typeof(SFX_Player), "PlaySFX")]
	internal class PlayNoiseEvent_PlaySFX
	{
		private static bool Prefix(SFX_Instance SFX, ref Vector3 position, ref float stepNoiseMultiplier, ref int alerts, Transform followTransform = null, SFX_Settings overrideSettings = null, float volumeMultiplier = 1f, bool loop = false, bool local = false, bool isNoise = true)
		{
			//IL_0002: 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)
			NoiseEventArgs noiseEventArgs = new NoiseEventArgs(position, stepNoiseMultiplier, alerts);
			PlayerEventHandler.Noise.Invoke(noiseEventArgs);
			if (!noiseEventArgs.IsAllowed)
			{
				return false;
			}
			position = noiseEventArgs.Position;
			stepNoiseMultiplier = noiseEventArgs.Distance;
			alerts = noiseEventArgs.Alerts;
			return true;
		}
	}
}
namespace ContentAPI.Patches.Events.Content
{
	[HarmonyPatch(typeof(ContentBuffer), "GenerateComments")]
	internal class CommentsEvent
	{
		private static void Postfix(ref List<Comment> __result)
		{
			GenerateCommentEventArgs generateCommentEventArgs = new GenerateCommentEventArgs(__result);
			ContentEventHandler.GenerateComments.Invoke(generateCommentEventArgs);
			__result = generateCommentEventArgs.Comments;
		}
	}
	[HarmonyPatch(typeof(ContentBuffer), "GetScore")]
	internal class PublishingContentEvent
	{
		private static void Postfix(ref float __result)
		{
			ContentScoreEventArgs contentScoreEventArgs = new ContentScoreEventArgs(__result);
			ContentEventHandler.PublishingContent.Invoke(contentScoreEventArgs);
			__result = contentScoreEventArgs.Score;
		}
	}
}
namespace ContentAPI.Patches.Events.Bots
{
	[HarmonyPatch(typeof(Bot), "Alert")]
	internal class BotAlertEvent
	{
		private static bool Prefix(Bot __instance, ref Vector3 alertPosition, ref int alerts)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			MonsterAlertEventArgs monsterAlertEventArgs = new MonsterAlertEventArgs(Bot.Get(__instance), alertPosition, alerts);
			BotEventHandler.MonsterAlerting.Invoke(monsterAlertEventArgs);
			if (!monsterAlertEventArgs.IsAllowed)
			{
				return false;
			}
			alertPosition = monsterAlertEventArgs.Position;
			alerts = monsterAlertEventArgs.Alerts;
			return true;
		}
	}
	[HarmonyPatch(typeof(Bot), "Alert")]
	internal class BotLoosingTargetEvent
	{
		private static bool Prefix(Bot __instance)
		{
			if ((Object)(object)__instance.targetPlayer == (Object)null)
			{
				return true;
			}
			MonsterLosePlayerEventArgs monsterLosePlayerEventArgs = new MonsterLosePlayerEventArgs(Bot.Get(__instance), ContentAPI.API.Features.Player.Get(__instance.targetPlayer));
			BotEventHandler.LoosingPlayer.Invoke(monsterLosePlayerEventArgs);
			if (!monsterLosePlayerEventArgs.IsAllowed)
			{
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(Bot), "OnDestroy")]
	internal class DestroyingEvent
	{
		private static void Prefix(Bot __instance)
		{
			BotEventHandler.MonsterDestroying.Invoke(new MonsterDestroyingEventArgs(Bot.Get(__instance)));
		}
	}
}
namespace ContentAPI.Example
{
	public class InputShowcase : Input
	{
		public override KeyCode Key { get; set; } = (KeyCode)8;


		public override void ProcessInput()
		{
			Debug.Log((object)"YOOO! The player clicked Backspace.");
		}
	}
	public class ModalShowcase : Modal
	{
		public override string Title { get; set; } = "Do you want a cookie?";


		public override string Body { get; set; } = "Click 'Cookie!!' for a special cookie.";


		public override List<ModalOption> Options { get; set; } = new List<ModalOption>();


		public ModalShowcase()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: 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
			Options.Add(new ModalOption("No Cookie", (Action)delegate
			{
				HandleButtonClick(1);
			}));
			Options.Add(new ModalOption("Cookie!!", (Action)delegate
			{
				HandleButtonClick(2);
			}));
		}

		protected override void OnClosed()
		{
			Debug.Log((object)"Cookie closed.");
			base.OnClosed();
		}

		protected override void HandleButtonClick(int buttonNumber)
		{
			switch (buttonNumber)
			{
			case 1:
				Debug.Log((object)"No cookie :(");
				break;
			case 2:
				Debug.Log((object)"Cookie :)");
				break;
			case 3:
				Debug.Log((object)"Wut bugged cookie??????");
				break;
			}
			base.HandleButtonClick(buttonNumber);
		}
	}
}
namespace ContentAPI.Events.Handlers
{
	public static class BotEventHandler
	{
		public static UnityEvent<MonsterCreatingEventArgs> MonsterCreating { get; } = new UnityEvent<MonsterCreatingEventArgs>();


		public static UnityEvent<MonsterDestroyingEventArgs> MonsterDestroying { get; } = new UnityEvent<MonsterDestroyingEventArgs>();


		public static UnityEvent<MonsterAlertEventArgs> MonsterAlerting { get; } = new UnityEvent<MonsterAlertEventArgs>();


		public static UnityEvent<MonsterLosePlayerEventArgs> LoosingPlayer { get; } = new UnityEvent<MonsterLosePlayerEventArgs>();

	}
	public static class ContentEventHandler
	{
		public static UnityEvent<ContentScoreEventArgs> PublishingContent { get; } = new UnityEvent<ContentScoreEventArgs>();


		public static UnityEvent<GenerateCommentEventArgs> GenerateComments { get; } = new UnityEvent<GenerateCommentEventArgs>();

	}
	public static class PlayerEventHandler
	{
		public static UnityEvent<PlayerCreatedEventArgs> PlayerCreated { get; } = new UnityEvent<PlayerCreatedEventArgs>();


		public static UnityEvent<PlayerDestroyingEventArgs> PlayerDestroying { get; } = new UnityEvent<PlayerDestroyingEventArgs>();


		public static UnityEvent<NoiseEventArgs> Noise { get; } = new UnityEvent<NoiseEventArgs>();


		public static UnityEvent<DivingBellTextEventArgs> DivingBellText { get; } = new UnityEvent<DivingBellTextEventArgs>();

	}
}
namespace ContentAPI.Events.EventArgs.Player
{
	public class DivingBellTextEventArgs
	{
		public ContentAPI.API.Features.Player Player { get; }

		public TextMeshProUGUI Name { get; }

		public TextMeshProUGUI Oxygen { get; }

		public TextMeshProUGUI DistanceText { get; }

		public float Distance { get; }

		public DivingBellTextEventArgs(ContentAPI.API.Features.Player player, TextMeshProUGUI name, TextMeshProUGUI oxygen, TextMeshProUGUI distance_text, float distance)
		{
			Player = player;
			Name = name;
			Oxygen = oxygen;
			DistanceText = distance_text;
			Distance = distance;
		}
	}
	public class NoiseEventArgs : IDeniableEvent
	{
		public Vector3 Position { get; set; }

		public float Distance { get; set; }

		public int Alerts { get; set; }

		public bool IsAllowed { get; set; }

		public NoiseEventArgs(Vector3 position, float distance, int alerts, bool isAllowed = true)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			Position = position;
			Distance = distance;
			Alerts = alerts;
			IsAllowed = isAllowed;
		}
	}
	public class PlayerCreatedEventArgs
	{
		public ContentAPI.API.Features.Player Player { get; }

		public PlayerCreatedEventArgs(ContentAPI.API.Features.Player player)
		{
			Player = player;
		}
	}
	public class PlayerDestroyingEventArgs
	{
		public ContentAPI.API.Features.Player Player { get; }

		public PlayerDestroyingEventArgs(ContentAPI.API.Features.Player player)
		{
			Player = player;
		}
	}
}
namespace ContentAPI.Events.EventArgs.Monsters
{
	public class MonsterAlertEventArgs : IDeniableEvent
	{
		public Bot Bot { get; }

		public Vector3 Position { get; set; }

		public int Alerts { get; set; }

		public bool IsAllowed { get; set; }

		public MonsterAlertEventArgs(Bot bot, Vector3 position, int alerts, bool isAllowed = true)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			Bot = bot;
			Position = position;
			Alerts = alerts;
			IsAllowed = isAllowed;
		}
	}
	public class MonsterCreatingEventArgs : IDeniableEvent
	{
		public Bot Bot { get; }

		public bool IsAllowed { get; set; }

		public MonsterCreatingEventArgs(Bot bot, bool isAllowed = true)
		{
			Bot = bot;
			IsAllowed = isAllowed;
		}
	}
	public class MonsterDestroyingEventArgs
	{
		public Bot Bot { get; }

		public MonsterDestroyingEventArgs(Bot bot)
		{
			Bot = bot;
		}
	}
	public class MonsterLosePlayerEventArgs : IDeniableEvent
	{
		public Bot Bot { get; }

		public ContentAPI.API.Features.Player Player { get; }

		public bool IsAllowed { get; set; }

		public MonsterLosePlayerEventArgs(Bot bot, ContentAPI.API.Features.Player player, bool isAllowed = true)
		{
			Bot = bot;
			Player = player;
			IsAllowed = isAllowed;
		}
	}
}
namespace ContentAPI.Events.EventArgs.Content
{
	public class ContentScoreEventArgs
	{
		public float Score { get; set; }

		public ContentScoreEventArgs(float score)
		{
			Score = score;
		}
	}
	public class GenerateCommentEventArgs
	{
		public List<Comment> Comments { get; set; }

		public GenerateCommentEventArgs(List<Comment> comments)
		{
			Comments = comments;
		}
	}
}
namespace ContentAPI.API.Struct
{
	public struct CameraUpgrades
	{
		public byte ID;

		public CameraUpgradeType Upgrade;

		public Item Item;

		public CameraUpgrades(CameraUpgradeItem item)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			ID = item.upgradeId;
			Upgrade = item.UpgradeType;
			Item = (Item)(object)item;
		}
	}
}
namespace ContentAPI.API.Interface
{
	public interface IWorldSpace
	{
		Vector3 Position { get; }

		Quaternion Rotation { get; }
	}
	public interface IWrapper<T>
	{
		T Base { get; }
	}
}
namespace ContentAPI.API.Interface.Events
{
	public interface IDeniableEvent
	{
		bool IsAllowed { get; set; }
	}
}
namespace ContentAPI.API.Features
{
	public class Camera : Item
	{
		private static List<CameraUpgrades> upgrades = new List<CameraUpgrades>();

		public static CameraUpgradesDatabase Instance { get; } = SingletonAsset<CameraUpgradesDatabase>.Instance;


		public static List<CameraUpgrades> AllUpgrades
		{
			get
			{
				if (upgrades.Count <= 0)
				{
					foreach (CameraUpgradeItem item in ((DatabaseAsset<CameraUpgradesDatabase, CameraUpgradeItem>)(object)Instance).Objects.ToList())
					{
						upgrades.Add(new CameraUpgrades(item));
					}
				}
				return upgrades;
			}
		}

		public Camera(Item item)
			: base(item)
		{
		}
	}
	public class Content
	{
		public ContentEvent Base { get; private set; }

		public float Value => Base.GetContentValue();

		public Content(ContentEvent content)
		{
			Base = content;
		}

		public static Content GetContent(ContentType contentType)
		{
			return new Content(ContentEventIDMapper.GetContentEvent((ushort)contentType));
		}
	}
	public class DivingBell : IWrapper<DivingBell>
	{
		private Dictionary<BellsState, DivingBellState> status;

		public static DivingBell Instance { get; private set; }

		public DivingBell Base { get; private set; }

		public bool LockDoor
		{
			get
			{
				return Base.locked;
			}
			set
			{
				Base.locked = value;
			}
		}

		public bool IsSurface => Base.onSurface;

		public bool IsUnderground => !Base.onSurface;

		public BellsState State
		{
			get
			{
				return status.FirstOrDefault((KeyValuePair<BellsState, DivingBellState> kv) => kv.Value == ((StateMachine<DivingBellState>)(object)Base.StateMachine).CurrentState).Key;
			}
			set
			{
				if (value != BellsState.Custom && status.TryGetValue(value, out var value2))
				{
					((StateMachine<DivingBellState>)(object)Base.StateMachine).SwitchState(((object)value2).GetType());
				}
			}
		}

		internal DivingBell(DivingBell divingBell)
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Expected O, but got Unknown
			Instance = this;
			Instance.Base = divingBell;
			DivingBell instance = Instance;
			Dictionary<BellsState, DivingBellState> dictionary = new Dictionary<BellsState, DivingBellState>();
			dictionary[BellsState.Ready] = (DivingBellState)new DivingBellReadyState(Instance.Base.onSurface);
			dictionary[BellsState.NotReady] = (DivingBellState)new DivingBellNotReadyDoorOpenState();
			dictionary[BellsState.MissingPlayer] = (DivingBellState)new DivingBellNotReadyMissingPlayersState();
			dictionary[BellsState.Ready] = (DivingBellState)new DivingBellRechargingState();
			instance.status = dictionary;
			foreach (DivingBellState value in Instance.status.Values)
			{
				((StateMachine<DivingBellState>)(object)Instance.Base.StateMachine).RegisterState(value);
			}
		}

		public void Close()
		{
			Base.AttemptSetOpen(false);
		}

		public void Open()
		{
			Base.AttemptSetOpen(true);
		}

		public void GoUnderGround()
		{
			Base.GoUnderground();
		}

		public void GoToSurface()
		{
			Base.GoToSurface();
		}

		public void PlaySound()
		{
			Base.sfx.PlayStartTransition();
		}
	}
	public abstract class Input
	{
		public static HashSet<Input> Registered { get; } = new HashSet<Input>();


		public abstract KeyCode Key { get; set; }

		public abstract void ProcessInput();

		public void Register()
		{
			if (!Registered.Contains(this))
			{
				Registered.Add(this);
			}
		}

		public void UnRegister()
		{
			Registered.Remove(this);
		}
	}
	public class Item : IWrapper<Item>
	{
		public static List<Item> List => Items.Keys.ToList();

		public Item Base { get; private set; }

		public ItemType Type => (ItemType)Base.id;

		public RARITY SpawnRarity
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				return Base.toolSpawnRarity;
			}
			set
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				Base.toolSpawnRarity = value;
			}
		}

		public int Price
		{
			get
			{
				return Base.price;
			}
			set
			{
				Base.price = value;
			}
		}

		public ShopItemCategory ShopCategory => Base.Category;

		internal static Dictionary<Item, Item> Items { get; } = new Dictionary<Item, Item>();


		public Item(Item item)
		{
			if (Get(item.id) == null)
			{
				Items.Add(this, item);
				Base = item;
			}
		}

		public static Item Get(byte id)
		{
			return List.FirstOrDefault((Item x) => x.Base.id == id);
		}

		public static Item Get(Item item)
		{
			return List.FirstOrDefault((Item x) => (Object)(object)x.Base == (Object)(object)item);
		}
	}
	public static class Lobby
	{
		private static IslandUnlock[] islandUnlocks;

		public static RoomStatsHolder Instance => SurfaceNetworkHandler.RoomStats;

		public static CSteamID? LobbyOwner
		{
			get
			{
				//IL_0023: Unknown result type (might be due to invalid IL or missing references)
				if (!PhotonNetwork.InRoom)
				{
					return null;
				}
				return SurfaceNetworkHandler.Instance.m_SteamLobby.LobbyOwner;
			}
		}

		public static int DaysPerQuota
		{
			get
			{
				return Instance.DaysPerQutoa;
			}
			set
			{
				if (PhotonNetwork.IsMasterClient)
				{
					Instance.DaysPerQutoa = value;
					Instance.OnStatsUpdated();
				}
			}
		}

		public static int Money
		{
			get
			{
				return Instance.Money;
			}
			set
			{
				if (PhotonNetwork.IsMasterClient)
				{
					Instance.Money = value;
					Instance.OnStatsUpdated();
				}
			}
		}

		public static int CurrentDay
		{
			get
			{
				return Instance.CurrentDay;
			}
			set
			{
				if (PhotonNetwork.IsMasterClient)
				{
					Instance.CurrentDay = value;
					Instance.OnStatsUpdated();
				}
			}
		}

		public static int CurrentQuotaDay
		{
			get
			{
				return Instance.CurrentQuotaDay;
			}
			set
			{
				if (PhotonNetwork.IsMasterClient)
				{
					Instance.CurrentQuotaDay = value;
					Instance.OnStatsUpdated();
				}
			}
		}

		public static int QuotaToReach
		{
			get
			{
				return Instance.QuotaToReach;
			}
			set
			{
				if (PhotonNetwork.IsMasterClient)
				{
					Instance.QuotaToReach = value;
					Instance.OnStatsUpdated();
				}
			}
		}

		public static int CurrentQuota
		{
			get
			{
				return Instance.CurrentQuota;
			}
			set
			{
				if (PhotonNetwork.IsMasterClient)
				{
					Instance.CurrentQuota = value;
					Instance.OnStatsUpdated();
				}
			}
		}

		public static bool ReceivedQuota
		{
			get
			{
				return Instance.ReceivedQuota;
			}
			set
			{
				if (PhotonNetwork.IsMasterClient)
				{
					Instance.ReceivedQuota = value;
					Instance.OnStatsUpdated();
				}
			}
		}

		public static int Seed
		{
			get
			{
				return Instance.MatchSeed;
			}
			set
			{
				if (value == -1)
				{
					Instance.RegenerateSeed();
				}
				else
				{
					Instance.MatchSeed = value;
				}
			}
		}

		public static int LevelToPlay
		{
			get
			{
				return Instance.LevelToPlay;
			}
			set
			{
				if (value == -1)
				{
					Instance.NewMapToPlay();
				}
				else
				{
					Instance.LevelToPlay = value;
				}
			}
		}

		public static int CurrentRun => Instance.CurrentRun;

		public static bool ComputerRoomIsUnlocked => Instance.ComputerRoomDoorUnlocked;

		public static bool IsQuotaDay => Instance.IsQuotaDay;

		public static TimeOfDay Time
		{
			get
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				return TimeOfDayHandler.TimeOfDay;
			}
			set
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				TimeOfDayHandler.SetTimeOfDay(value);
			}
		}

		public static IslandUnlock[] AllIslandUnlock
		{
			get
			{
				if (islandUnlocks == null)
				{
					islandUnlocks = Object.FindObjectsOfType<IslandUnlock>();
				}
				return islandUnlocks;
			}
		}

		public static void Save()
		{
			SaveSystem.SaveToDisk();
		}

		public static void StartGame()
		{
			SurfaceNetworkHandler.Instance.RPCM_StartGame();
		}

		public static void OpenDoor()
		{
			SurfaceNetworkHandler.Instance.RPCA_OpenDoor();
		}

		public static void QuotaFail()
		{
			SurfaceNetworkHandler.Instance.RPC_QuotaFailed();
		}

		public static void LoadScene(string sceneName)
		{
			SurfaceNetworkHandler.Instance.RPC_LoadScene(sceneName);
		}

		public static void AddMetaCoins(int amount)
		{
			MetaProgressionHandler.SetMetaCoins(amount);
		}

		public static void SetTickRate(float tick)
		{
			float num = 0.01666f / tick;
			Time.timeScale = tick;
			if (tick < 0.5f)
			{
				Time.fixedDeltaTime *= 2f;
			}
			else
			{
				Time.fixedDeltaTime = Mathf.Max(num, 0.0001f);
			}
		}

		public static void ResetTickRate()
		{
			Time.timeScale = 1f;
			Time.fixedDeltaTime = 0.01666f;
		}

		public static void RemoveMetaCoins(int amount)
		{
			MetaProgressionHandler.RemoveMetaCoins(amount);
		}

		public static void UnlockAllHats()
		{
			MetaProgressionHandler.UnlockAllHats();
		}
	}
	public abstract class Modal
	{
		public abstract string Title { get; set; }

		public abstract string Body { get; set; }

		public abstract List<ModalOption> Options { get; set; }

		public void Show()
		{
			if (Options.Count == 0)
			{
				Debug.Log((object)"No options present going in safe mode.");
				Modal.ShowError(Title, Body);
			}
			else
			{
				Modal.Show(Title, Body, Options.ToArray(), (Action)delegate
				{
					OnClosed();
				});
			}
		}

		protected virtual void OnClosed()
		{
		}

		protected virtual void HandleButtonClick(int buttonNumber)
		{
		}
	}
	public class Pickup : IWorldSpace, IWrapper<Pickup>
	{
		public static List<Pickup> List => Items.Keys.ToList();

		public Pickup Base { get; private set; }

		public Item Item => Item.Get(Base.itemInstance.item);

		public Vector3 Position
		{
			get
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				return ((Component)Base).transform.position;
			}
			set
			{
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				((Component)Base).transform.position = value;
				Sync();
			}
		}

		public Quaternion Rotation
		{
			get
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				return ((Component)Base).transform.rotation;
			}
			set
			{
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				((Component)Base).transform.rotation = value;
				Sync();
			}
		}

		public ItemType Type => (ItemType)Base.m_itemID;

		internal static Dictionary<Pickup, Pickup> Items { get; } = new Dictionary<Pickup, Pickup>();


		public Pickup(Pickup item)
		{
			if (Get(item.m_itemID) == null)
			{
				Items.Add(this, item);
				Base = item;
			}
		}

		public static Pickup Get(byte id)
		{
			return List.FirstOrDefault((Pickup x) => x.Base.m_itemID == id);
		}

		public static Pickup Create(ItemType itemType, Vector3 position, Quaternion rotation)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			return new Pickup(PickupHandler.CreatePickup((byte)itemType, new ItemInstanceData(Guid.NewGuid()), position, rotation));
		}

		public void Remove()
		{
			Base.RPC_Remove();
		}

		public void Sync()
		{
			Base.ForceSync();
		}

		public void SetVelocity(Vector3 vel, Vector3 angVel)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			Base.RPC_SetVelocity(vel, angVel);
		}
	}
	public class Player : IWrapper<Player>, IWorldSpace
	{
		private Player playerAPI;

		private PlayerRefs playerRefs;

		private PlayerData playerData;

		public static Dictionary<GameObject, Player> Dictionary { get; } = new Dictionary<GameObject, Player>();


		public static IReadOnlyCollection<Player> List => Dictionary.Values;

		public static Player HostPlayer => List.FirstOrDefault((Player p) => p.IsLobbyOwner);

		public static Player LocalPlayer => Get(Player.localPlayer);

		public Player Base
		{
			get
			{
				return playerAPI;
			}
			private set
			{
				playerAPI = value ?? throw new NullReferenceException("Player reference cannot be null!");
				playerRefs = value.refs;
				playerData = value.data;
			}
		}

		public Vector3 Position
		{
			get
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				return playerRefs.ragdoll.GetBodypart((BodypartType)0).rig.position;
			}
			set
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				playerRefs.ragdoll.GetBodypart((BodypartType)0).rig.position = value;
			}
		}

		public Quaternion Rotation
		{
			get
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				return playerRefs.ragdoll.GetBodypart((BodypartType)0).rig.rotation;
			}
			set
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				playerRefs.ragdoll.GetBodypart((BodypartType)0).rig.rotation = value;
			}
		}

		public float Health
		{
			get
			{
				return playerData.health;
			}
			set
			{
				playerData.health = value;
			}
		}

		public float Oxygen
		{
			get
			{
				return playerData.remainingOxygen;
			}
			set
			{
				playerData.remainingOxygen = value;
			}
		}

		public float MaxOxygen
		{
			get
			{
				return playerData.maxOxygen;
			}
			set
			{
				playerData.maxOxygen = value;
			}
		}

		public bool UsingOxygen
		{
			get
			{
				return playerData.usingOxygen;
			}
			set
			{
				playerData.usingOxygen = value;
			}
		}

		public float Stamina
		{
			get
			{
				return playerData.currentStamina;
			}
			set
			{
				playerData.currentStamina = value;
			}
		}

		public float Mass
		{
			get
			{
				return playerData.totalMass;
			}
			set
			{
				playerData.totalMass = value;
			}
		}

		public PhotonView PhotonView => ((MonoBehaviourPun)playerData.player).photonView;

		public Player PhotonPlayer => PhotonView.Controller;

		public CSteamID? SteamID
		{
			get
			{
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				CSteamID value = default(CSteamID);
				return SteamAvatarHandler.TryGetSteamIDForPlayer(PhotonPlayer, ref value) ? new CSteamID?(value) : null;
			}
		}

		public bool IsLobbyOwner
		{
			get
			{
				//IL_004d: 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_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				if (!PhotonNetwork.InRoom)
				{
					return false;
				}
				if (!SteamID.HasValue)
				{
					return false;
				}
				if (!Lobby.LobbyOwner.HasValue)
				{
					return false;
				}
				CSteamID lobbyOwner = SteamMatchmaking.GetLobbyOwner(Lobby.LobbyOwner.Value);
				CSteamID? steamID = SteamID;
				return steamID.HasValue && lobbyOwner == steamID.GetValueOrDefault();
			}
		}

		public bool IsLocal
		{
			get
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_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)
				CSteamID? steamID = SteamID;
				CSteamID steamID2 = SteamUser.GetSteamID();
				return steamID.HasValue && (!steamID.HasValue || steamID.GetValueOrDefault() == steamID2);
			}
		}

		internal Player(Player player)
		{
			Base = player;
			if (!Dictionary.ContainsKey(((Component)player).gameObject))
			{
				Dictionary.Add(((Component)player).gameObject, this);
			}
		}

		internal Player(GameObject gameObject)
		{
			Player @base = default(Player);
			if (!gameObject.TryGetComponent<Player>(ref @base))
			{
				throw new ArgumentException("Could not find Player component in GameObject");
			}
			Base = @base;
			Dictionary.Add(gameObject, this);
		}

		public static Player Get(GameObject gameObject)
		{
			Player value;
			return Dictionary.TryGetValue(gameObject, out value) ? value : null;
		}

		public static Player Get(ulong userId)
		{
			return List.FirstOrDefault((Player p) => p.SteamID.HasValue && p.SteamID.Value.m_SteamID == userId);
		}

		public static Player Get(Player player)
		{
			Player value;
			return Dictionary.TryGetValue(((Component)player).gameObject, out value) ? value : null;
		}

		public void Dance(DanceType danceType)
		{
			PhotonView.RPC("RPC_PlayEmote", (RpcTarget)0, new object[1] { (byte)danceType });
		}

		public void Kill()
		{
			Base.RPCA_PlayerDie();
		}

		public void Revive()
		{
			Base.RPCA_PlayerRevive();
		}

		public void Ragdoll(float seconds = 20f)
		{
			PhotonView.RPC("RPCA_Fall", (RpcTarget)0, new object[1] { seconds });
		}

		public void SetFace(float hue, int colorIndex, string faceText, float faceRotation, float faceSize)
		{
			PhotonView.RPC("RPCA_SetAllFaceSettings", (RpcTarget)3, new object[5] { hue, colorIndex, faceText, faceRotation, faceSize });
		}

		public void SetFace(string text, bool safeCheck = true)
		{
			if (IsLocal)
			{
				((TMP_Text)playerRefs.visor.visorFaceText).text = (safeCheck ? playerRefs.visor.SafetyCheckVisorText(text) : text);
			}
		}

		public void SendMessage(string message, float time)
		{
			HelmetText.Instance.SetHelmetText(message, time);
		}

		internal static void DestroyPlayer(Player player)
		{
			Dictionary.Remove(((Component)player).gameObject);
		}
	}
	public class Shop : IWrapper<ShopHandler>
	{
		public static Shop Instance { get; private set; }

		public List<ShopItem> Items => Base.m_ItemsForSaleDictionary.Values.ToList();

		public List<ShopItem> ItemsInCart => Base.GetItemsInCart();

		public float CartValue => Base.GetCurrentCartValue();

		public float AmountOfItems => Base.GetNumberOfItemsInCart();

		public ShopHandler Base { get; private set; }

		public ShoppingCart ShoppingCart => Base.m_ShoppingCart;

		internal Shop(ShopHandler shopHandler)
		{
			Base = shopHandler;
			Instance = this;
		}

		public void Buy()
		{
			Base.BuyItem(Base.m_ShoppingCart);
		}

		public void SpawnDrone()
		{
			Base.RPCA_SpawnDrone(Array.Empty<byte>());
		}

		public void SpawnDrone(List<ItemType> items)
		{
			Base.RPCA_SpawnDrone(items.Select((ItemType item) => (byte)item).ToArray());
		}

		public void AddItem(ShopItem item)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			ShoppingCart.AddItemToCart(item);
		}

		public void AddItem(ItemType item)
		{
			Base.RPCA_AddItemToCart((byte)item);
		}

		public void ClearCart()
		{
			ShoppingCart.ClearCart();
		}

		public void Order()
		{
			Base.OnOrderCartClicked();
		}
	}
}
namespace ContentAPI.API.Features.Pools
{
	public class ListPool<T>
	{
		private readonly ConcurrentQueue<List<T>> pool = new ConcurrentQueue<List<T>>();

		public static ListPool<T> Pool { get; } = new ListPool<T>();


		public List<T> Rent()
		{
			List<T> result;
			return pool.TryDequeue(out result) ? result : new List<T>(512);
		}

		public List<T> Rent(IEnumerable<T> enumerable)
		{
			if (!pool.TryDequeue(out var result))
			{
				return new List<T>(enumerable);
			}
			result.AddRange(enumerable);
			return result;
		}

		public void Return(List<T> list)
		{
			list.Clear();
			pool.Enqueue(list);
		}
	}
}
namespace ContentAPI.API.Features.Bots
{
	public class Angler : Bot, IWrapper<Bot_Angler>
	{
		public new Bot_Angler Base { get; }

		public bool IsSucking
		{
			get
			{
				return Base.isSucking;
			}
			set
			{
				Base.isSucking = value;
			}
		}

		public Player PlayerToMimic
		{
			get
			{
				return Player.Get(Base.mimicingPlayer);
			}
			set
			{
				Base.mimicingPlayer = value.Base;
			}
		}

		public Angler(Bot_Angler angler)
			: base(angler.bot)
		{
			Base = angler;
		}

		public void SpawnMimic()
		{
			Base.SpawnMimic();
		}

		public void ForceFind()
		{
			Base.FindAndSetPlayerToMimic();
		}
	}
	public class BarnacleBall : Bot, IWrapper<Bot_BarnacleBall>
	{
		public new Bot_BarnacleBall Base { get; }

		public bool IsGas
		{
			get
			{
				return Base.releaseGas;
			}
			set
			{
				Base.TrySyncGas(value);
			}
		}

		public BarnacleBall(Bot_BarnacleBall barnacleBall)
			: base(barnacleBall.bot)
		{
			Base = barnacleBall;
		}

		public void TryAttack()
		{
			Base.TryToAttack();
		}

		public void ForceTentacle()
		{
			Base.view.RPC("RPCA_DoTentacleAttack", (RpcTarget)0, new object[1] { Base.bot.targetPlayer.refs.view.ViewID });
		}
	}
	public class BigSlap : Bot, IWrapper<Bot_BigSlap>
	{
		public new Bot_BigSlap Base { get; }

		public BigSlap(Bot_BigSlap bigSlap)
			: base(bigSlap.bot)
		{
			Base = bigSlap;
		}
	}
	public class Bot : IWorldSpace, IWrapper<Bot>
	{
		public static Dictionary<GameObject, Bot> Dictionary { get; } = new Dictionary<GameObject, Bot>();


		public static IReadOnlyCollection<Bot> List => Dictionary.Values;

		public Bot Base { get; }

		public Vector3 Position
		{
			get
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				return Base.groundTransform.position;
			}
			set
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				Base.Teleport(value);
			}
		}

		public Quaternion Rotation
		{
			get
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				return Quaternion.Euler(Base.syncData.lookDireciton);
			}
			set
			{
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				Base.syncData.lookDireciton = ((Quaternion)(ref value)).eulerAngles;
			}
		}

		public Bot Leader
		{
			get
			{
				return Get(Base.patrolLeader);
			}
			set
			{
				Base.patrolLeader = value.Base;
			}
		}

		public List<PatrolGroup> Group
		{
			get
			{
				return Base.patrolGroups;
			}
			set
			{
				Base.patrolGroups = value;
			}
		}

		public Bot(Bot bot)
		{
			Base = bot;
			MonsterCreatingEventArgs monsterCreatingEventArgs = new MonsterCreatingEventArgs(this);
			BotEventHandler.MonsterCreating.Invoke(monsterCreatingEventArgs);
			if (!monsterCreatingEventArgs.IsAllowed)
			{
				PhotonNetwork.Destroy(((Component)Base).gameObject);
			}
			else
			{
				Dictionary.Add(((Component)bot).gameObject, this);
			}
		}

		public static Bot Get(Bot bot)
		{
			return List.FirstOrDefault((Bot p) => (Object)(object)p.Base == (Object)(object)bot);
		}

		public static IEnumerable<T> Get<T>() where T : Bot
		{
			foreach (Bot bot in List)
			{
				if (bot is T value)
				{
					yield return value;
				}
			}
		}

		public static void DestroyAll()
		{
			BotHandler.instance.DestroyAll();
		}

		public void Alert(Vector3 position, int amount = 1)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			Base.Alert(position, amount);
		}

		public void Move(Vector3 position)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			Base.WorldMoveTo(position);
		}

		public void Look(Vector3 direction, float rotation_speed = 3f)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			Base.Look(direction, rotation_speed);
		}

		public void Investigate()
		{
			Base.Investigate();
		}

		public void LoseTarget()
		{
			Base.LoseTarget();
		}

		public void SetTarget(Player player)
		{
			Base.SetTargetPlayer(player.Base);
		}

		public void RemoveAI()
		{
			Base.DoNothing();
		}

		public void WakeUpAI()
		{
			Base.Walk();
		}

		public void Destroy()
		{
			Base.OnDestroy();
			Remove();
		}

		internal void Remove()
		{
			Dictionary.Remove(((Component)Base).gameObject);
		}
	}
	public class CameraCreep : Bot, IWrapper<Bot_CameraCreep>
	{
		public new Bot_CameraCreep Base { get; }

		public CameraCreep(Bot_CameraCreep cameraCreep)
			: base(cameraCreep.bot)
		{
			Base = cameraCreep;
		}

		public void Attack()
		{
			Base.RPCA_DoCreepAttack(Base.bot.targetPlayer.refs.view.ViewID);
		}

		public void TeleportAway()
		{
			Base.TeleportAway();
		}

		public void Chase(Player player)
		{
			Base.ChaseTarget(player.Base);
		}
	}
	public class Chaser : Bot, IWrapper<Bot_Chaser>
	{
		public new Bot_Chaser Base { get; }

		public Chaser(Bot_Chaser chaser)
			: base(chaser.bot)
		{
			Base = chaser;
		}
	}
	public class Drag : Bot, IWrapper<Bot_Drag>
	{
		public new Bot_Drag Base { get; }

		public Drag(Bot_Drag drag)
			: base(drag.bot)
		{
			Base = drag;
		}
	}
	public class Ear : Bot, IWrapper<Bot_Ear>
	{
		public new Bot_Ear Base { get; }

		public bool EarHurt
		{
			get
			{
				return Base.bot.hurt;
			}
			set
			{
				Base.RPCA_EarSetHurt(value);
			}
		}

		public Ear(Bot_Ear ear)
			: base(ear.bot)
		{
			Base = ear;
		}

		public void Flee()
		{
			Base.RPCA_EarFlee();
		}
	}
	public class EyeGuy : Bot, IWrapper<Bot_EyeGuy>
	{
		public new Bot_EyeGuy Base { get; }

		public EyeGuy(Bot_EyeGuy eye)
			: base(eye.bot)
		{
			Base = eye;
		}
	}
	public class Fear : Bot, IWrapper<Bot_Fear>
	{
		public new Bot_Fear Base { get; }

		public Fear(Bot_Fear fear)
			: base(fear.bot)
		{
			Base = fear;
		}
	}
	public class Ghost : Bot, IWrapper<Bot_Ghost>
	{
		public new Bot_Ghost Base { get; }

		public bool IsStunned
		{
			get
			{
				return Base.hurt;
			}
			set
			{
				Base.RPCA_DisplayBlinded(value);
			}
		}

		public bool DisplayFrenzy
		{
			get
			{
				return Base.displayFrensy;
			}
			set
			{
				Base.RPCA_DisplayFrenzy(value);
			}
		}

		public Ghost(Bot_Ghost ghost)
			: base(ghost.bot)
		{
			Base = ghost;
		}

		public void HauntPlayer()
		{
			Base.HauntPlayer();
		}

		public void Flee()
		{
			Base.StartFlee();
		}

		public void TryGrab()
		{
			Base.TryToGrabPlayer();
		}
	}
	public class Infiltrator : Bot, IWrapper<Bot_Infiltrator>
	{
		public new Bot_Infiltrator Base { get; }

		public bool IsAngry
		{
			get
			{
				return Base.isAngry;
			}
			set
			{
				Base.MakeAngry();
			}
		}

		public Player MimickingPlayer
		{
			get
			{
				return Player.Get(Base.mimickingPlayer);
			}
			set
			{
				Base.mimickingPlayer = value.Base;
			}
		}

		public Player Target
		{
			get
			{
				return Player.Get(Base.hitTarget);
			}
			set
			{
				Base.hitTarget = value.Base;
			}
		}

		public Infiltrator(Bot_Infiltrator infiltrator)
			: base(infiltrator.bot)
		{
			Base = infiltrator;
		}

		public void Infiltrate(Player player, Player target)
		{
			Base.Init(player.Base, target.Base);
		}

		public void Exfiltrate()
		{
			Base.Exfiltrate();
		}

		public void VisuallyAngry()
		{
			Base.RPC_AngryVisuals();
		}

		public void LessAwkward()
		{
			Base.MakeItLessAwkward();
		}

		public void Reset()
		{
			Base.ResetStates();
		}
	}
	public class Jelly : Bot, IWrapper<Bot_Jelly>
	{
		public new Bot_Jelly Base { get; }

		public bool IsFleeing
		{
			get
			{
				return Base.fleeing;
			}
			set
			{
				Base.RPCA_DropAndFlee();
			}
		}

		public Jelly(Bot_Jelly jelly)
			: base(jelly.bot)
		{
			Base = jelly;
		}
	}
	public class Knifo : Bot, IWrapper<Bot_Knifo>
	{
		public new Bot_Knifo Base { get; }

		public Knifo(Bot_Knifo knifo)
			: base(knifo.bot)
		{
			Base = knifo;
		}
	}
	public class LookY : Bot, IWrapper<Bot_LookY>
	{
		public new Bot_LookY Base { get; }

		public LookY(Bot_LookY lookY)
			: base(lookY.bot)
		{
			Base = lookY;
		}
	}
	public class MimicInfiltrator : Bot, IWrapper<Bot_MimicInfiltrator>
	{
		public new Bot_MimicInfiltrator Base { get; }

		public bool IsInfiltrating => Base.IsInfiltrating;

		public bool IsAngry
		{
			get
			{
				return Base.isAngry;
			}
			set
			{
				Base.MakeAngry();
			}
		}

		public Player MimickingPlayer
		{
			get
			{
				return Player.Get(Base.mimickingPlayer);
			}
			set
			{
				Base.mimickingPlayer = value.Base;
			}
		}

		public Player Target
		{
			get
			{
				return Player.Get(Base.hitTarget);
			}
			set
			{
				Base.hitTarget = value.Base;
			}
		}

		public MimicInfiltrator(Bot_MimicInfiltrator mimicInfiltrator)
			: base(mimicInfiltrator.bot)
		{
			Base = mimicInfiltrator;
		}

		public void Infiltrate(Player player, Player target, Vector3 position)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			Base.Infiltrate(player.Base, target.Base, position);
		}

		public void Infiltrate(Player player, Player target)
		{
			Base.MimickPlayer(player.Base, target.Base);
		}

		public void Exfiltrate()
		{
			Base.Despawn();
		}

		public void VisuallyAngry()
		{
			Base.RPC_AngryVisuals();
		}

		public void LessAwkward()
		{
			Base.MakeItLessAwkward();
		}
	}
	public class Mouth : Bot, IWrapper<Bot_Mouth>
	{
		public new Bot_Mouth Base { get; }

		public Mouth(Bot_Mouth mouth)
			: base(mouth.bot)
		{
			Base = mouth;
		}

		public void Flee()
		{
			Base.Flee();
		}
	}
	public class Skinny : Bot, IWrapper<Bot_Skinny>
	{
		public new Bot_Skinny Base { get; }

		public bool IsInDimension => Base.fullyInDimention;

		public Skinny(Bot_Skinny skinny)
			: base(skinny.bot)
		{
			Base = skinny;
		}

		public void SwitchDimension()
		{
			Base.DimentionSwitching();
		}

		public void ExitDimension()
		{
			Base.ExitDimentionFully();
		}

		public void ClearTargets()
		{
			Base.ClearTargets();
		}

		public void Stare()
		{
			Base.Stare();
		}

		public void ForceAttack(Player player)
		{
			Base.AttackPlayer(player.Base);
		}

		public void TryAttack(Player player)
		{
			Base.TryAttackPlayer(player.Base);
		}

		public void FailToAttack(Player player)
		{
			Base.FailToAttackPlayer(player.Base);
		}
	}
	public class Snactcho : Bot, IWrapper<Bot_Snactcho>
	{
		public new Bot_Snactcho Base { get; }

		public Player Snatched
		{
			get
			{
				return Player.Get(Base.snatchedPlayer);
			}
			set
			{
				Base.snatchedPlayer = value.Base;
			}
		}

		public Snactcho(Bot_Snactcho snactcho)
			: base(snactcho.bot)
		{
			Base = snactcho;
		}

		public void Flee()
		{
			Base.TeleportAway();
		}

		public void TryToSnatch()
		{
			Base.Snatching();
		}
	}
	public class ToolkitBoy : Bot, IWrapper<Bot_ToolkitBoy>
	{
		public new Bot_ToolkitBoy Base { get; }

		public bool IsCharging
		{
			get
			{
				return Base.isCharging;
			}
			set
			{
				Base.SetCharging(value);
			}
		}

		public Player PlayerToBonk
		{
			get
			{
				return Player.Get(Base.player);
			}
			set
			{
				Base.player = value.Base;
			}
		}

		public ToolkitBoy(Bot_ToolkitBoy toolkitBoy)
			: base(toolkitBoy.bot)
		{
			Base = toolkitBoy;
		}

		public void ForceBonk()
		{
			Base.RPCA_BonkTool();
		}
	}
	public class Wallo : Bot, IWrapper<Bot_Wallo>
	{
		public new Bot_Wallo Base { get; }

		public WalloState State
		{
			get
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				return Base.walloState;
			}
			set
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				Base.SetState(value);
			}
		}

		public Player Target
		{
			get
			{
				return Player.Get(Base.targetPlayer);
			}
			set
			{
				Base.targetPlayer = value.Base;
			}
		}

		public Wallo(Bot_Wallo wallo)
			: base(wallo.bot)
		{
			Base = wallo;
		}

		public void Steal()
		{
			Base.DoSteal();
		}

		public void Drag()
		{
			Base.DragPlayerIn();
		}

		public void Flee()
		{
			Base.GoToFailedPoint();
		}
	}
	public class Weeping : Bot, IWrapper<Bot_Weeping>
	{
		public new Bot_Weeping Base { get; }

		public bool HasCapturedPlayer => Base.HasCapturedPlayer;

		public bool HasPlayerInCaptchaGame => Base.HasPlayerInCaptchaGame;

		public Vector3 CapturePoint => Base.CapturePoint;

		public bool IsFinished => Base.captchaGameFinished;

		public Player CapturedPlayer => Player.Get(Base.capturedPlayer);

		public Player PlayerResolving => Player.Get(Base.playerInCaptchaGame);

		public Weeping(Bot_Weeping weeping)
			: base(weeping.bot)
		{
			Base = weeping;
		}

		public void Reset()
		{
			Base.RPCA_RelasePlayerAndRestartCaptchaThings();
		}

		public void JoinCaptcha(Player player)
		{
			Base.PlayerInteracted(player.PhotonView);
		}

		public void TryCatch()
		{
			Base.TryCapturePlayer();
		}

		public void ForceCapture(Player player)
		{
			Base.RPCA_CapturePlayer(player.PhotonView.ViewID);
		}

		public void ForceFail()
		{
			Base.RPCA_CaptchaGameFailed();
		}

		public void ForceWin()
		{
			Base.RPCA_CaptchaGameSuccess();
		}

		public void LeaveCaptcha()
		{
			Base.RPCA_LeaveCaptchaGame();
		}

		public void SetTries(int fails, float max)
		{
			Base.capturedCanvas.SetTries(fails, max);
		}

		public void SetTimer(float left, float max)
		{
			Base.capturedCanvas.SetGameTimer(left, max);
		}

		public void SetProgress(int progress)
		{
			Base.capturedCanvas.SetProgress(progress);
		}

		public void FailScreen(bool shake = true)
		{
			Base.capturedCanvas.DoFailStuff(shake);
		}
	}
	public class Zombie : Bot, IWrapper<Bot_Zombie>
	{
		public new Bot_Zombie Base { get; }

		public Zombie(Bot_Zombie zombie)
			: base(zombie.bot)
		{
			Base = zombie;
		}
	}
}
namespace ContentAPI.API.Extensions
{
	public static class AssetBundleExtensions
	{
		public static AssetBundle GetAssetBundle(this string path)
		{
			return AssetBundle.LoadFromFile(path);
		}
	}
	public static class CollectionExtensions
	{
		public static T GetRandomValue<T>(this IEnumerable<T> collection)
		{
			if (collection == null)
			{
				return default(T);
			}
			T[] array2 = ((collection is T[] array) ? array : collection.ToArray());
			return ArrayExtensions.GetRandom<T>(array2);
		}
	}
}
namespace ContentAPI.API.Enums
{
	public enum BellsState
	{
		Ready,
		NotReady,
		MissingPlayer,
		Recharging,
		Custom
	}
	public enum ContentType
	{
		PlayerContent = 1000,
		BigSlap_Peaceful,
		BigSlap_Agro,
		Zombie,
		Flicker,
		Jello,
		Knifo,
		Weeping,
		Ear,
		Mouth,
		Slurper,
		Snatcho,
		BarnacleBall,
		ToolkitWhisk,
		Weeping_Capture,
		Weeping_Fail,
		Weeping_Success,
		Bombs,
		Larva,
		Spider,
		Player_Dead,
		Player_Ragdoll,
		Player_Falling,
		Player_Emote,
		Dog,
		EyeGuy,
		Creep,
		GoodCatch,
		Player_Damaged,
		Multiple_Monsters,
		Bomb,
		Player_Shroom,
		Player_Holding_Mic,
		Interview,
		Taunt,
		Robot_Button,
		Wallo,
		Harpooner,
		Streamer,
		Worm,
		Snail_Spawner,
		Fire_Monster,
		Puffo,
		BlackHole,
		Player_Hat,
		Mime
	}
	public enum DanceType
	{
		Applause = 48,
		Choke,
		Choked,
		Dance1,
		Dance2,
		Dance3,
		Dance4TokTok,
		FingerScratch,
		HalfBackflip,
		Handstand,
		HuggerHeal,
		JumpJack,
		MiddleFings,
		Peace,
		PushUp,
		Shrug,
		Stretch,
		Thumbnail1,
		Thumbnail2,
		ThumbsUp
	}
	public enum ItemType
	{
		BoomMic,
		Camera,
		CameraBroken,
		Clapper,
		Defibrilator,
		Disc,
		FakeOldFlashlight,
		Flare,
		GooBall,
		GrabberArm,
		Hugger,
		LongFlashlightPro,
		LongFlashlight,
		LostDisc,
		ModernFlashlightPro,
		ModernFlashlight,
		OldFlashlight,
		PartyPopper,
		ReporterMic,
		RescueHook,
		ShockStick,
		SoundPlayer,
		TitleCardItemBgBlack,
		TitleCardItemBgWhite,
		WalkieTalkie,
		WideFlashlight2,
		WideFlashlight3,
		Winch,
		AminalStateu,
		AnimalStatue,
		Apple,
		Bone,
		BrainOnAStick,
		Chorby,
		Container,
		OldPainting,
		PersistantRadio,
		Radio,
		Ribcage,
		Shroom,
		Skull,
		Spine,
		Fov1,
		Fov2,
		Fov3,
		Zoom1,
		Zoom2,
		Zoom3,
		Applause,
		Choke,
		Choked,
		Dance1,
		Dance2,
		Dance3,
		Dance4TokTok,
		FingerScratch,
		HalfBackflip,
		Handstand,
		HuggerHeal,
		JumpJack,
		MiddleFings,
		Peace,
		PushUp,
		Shrug,
		Stretch,
		Thumbnail1,
		Thumbnail2,
		ThumbsUp,
		Bomb,
		FredGull,
		HardHat,
		HermansBag,
		NorfGun,
		SirMonsterBurger
	}
}
namespace ContentAPI.API.Monobehavior
{
	public class CustomKeybind : MonoBehaviour
	{
		private void Update()
		{
			foreach (Input item in Input.Registered.Where((Input input) => Input.GetKeyDown(input.Key)))
			{
				item.ProcessInput();
			}
		}
	}
}
namespace ContentAPI.API.Components
{
	public class CustomInputHandler : MonoBehaviour
	{
		private void Update()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			foreach (Input item in Input.Registered)
			{
				if (Input.GetKeyDown(item.Key))
				{
					item.ProcessInput();
				}
			}
		}
	}
}