Decompiled source of TestAccountVariety v1.23.1

BepInEx/plugins/TestAccount666-TestAccountVariety/TestAccountVariety.dll

Decompiled 5 days ago
using System;
using System.Collections;
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 BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using DoorBreach;
using GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TestAccount666.TestAccountVariety.NetcodePatcher;
using TestAccountCore;
using TestAccountCore.Dependencies;
using TestAccountCore.Dependencies.Compatibility;
using TestAccountVariety.Dependencies;
using TestAccountVariety.Items.ExtendedItems;
using TestAccountVariety.Items.ShibaPlush.Functions;
using TestAccountVariety.Items.ThrowableCube.Patches;
using TestAccountVariety.Patches;
using Unity.Mathematics;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.InputSystem;
using UnityEngine.Rendering.HighDefinition;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: IgnoresAccessChecksTo("ClientNetworkTransform")]
[assembly: IgnoresAccessChecksTo("DissonanceVoip")]
[assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")]
[assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")]
[assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")]
[assembly: IgnoresAccessChecksTo("Unity.Burst")]
[assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")]
[assembly: IgnoresAccessChecksTo("Unity.Collections")]
[assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")]
[assembly: IgnoresAccessChecksTo("Unity.Jobs")]
[assembly: IgnoresAccessChecksTo("Unity.Mathematics")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")]
[assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")]
[assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")]
[assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")]
[assembly: IgnoresAccessChecksTo("Unity.Services.QoS")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Relay")]
[assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")]
[assembly: IgnoresAccessChecksTo("Unity.Timeline")]
[assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UI")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("TestAccount666.TestAccountVariety")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Random stuff from TestAccount")]
[assembly: AssemblyFileVersion("1.23.1.0")]
[assembly: AssemblyInformationalVersion("1.23.1+f60a2c76d251fe969c37056ec12b913335d4ddd1")]
[assembly: AssemblyProduct("TestAccountVariety")]
[assembly: AssemblyTitle("TestAccount666.TestAccountVariety")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.23.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[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;
		}
	}
	[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 TestAccountVariety
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency("TestAccount666.TestAccountCore", "1.9.0")]
	[BepInPlugin("TestAccount666.TestAccountVariety", "TestAccountVariety", "1.23.1")]
	public class TestAccountVariety : BaseUnityPlugin
	{
		public static TestAccountVariety Instance { get; private set; }

		internal static ManualLogSource Logger { get; private set; }

		internal static Harmony? Harmony { get; set; }

		internal static void Patch()
		{
			//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)
			//IL_0018: Expected O, but got Unknown
			if (Harmony == null)
			{
				Harmony = new Harmony("TestAccount666.TestAccountVariety");
			}
			Logger.LogDebug((object)"Patching...");
			Harmony.PatchAll(typeof(ThrowableCubePatch));
			Harmony.PatchAll(typeof(ShovelPatch));
			Logger.LogDebug((object)"Finished patching!");
		}

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			Instance = this;
			if (DependencyChecker.IsLobbyCompatibilityInstalled())
			{
				Logger.LogInfo((object)"Found LobbyCompatibility Mod, initializing support :)");
				LobbyCompatibilitySupport.Initialize("TestAccount666.TestAccountVariety", "1.23.1", (CompatibilityLevel)2, (VersionStrictness)2);
			}
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			Netcode.ExecuteNetcodePatcher(executingAssembly);
			AssetLoader.LoadBundle(executingAssembly, "TestAccountVariety");
			AssetLoader.LoadItems(((BaseUnityPlugin)this).Config);
			AssetLoader.LoadHazards(((BaseUnityPlugin)this).Config);
			AssetLoader.LoadUnlockables(((BaseUnityPlugin)this).Config);
			AssetLoader.LoadCustomScripts(((BaseUnityPlugin)this).Config);
			VarietyConfig.Initialize(((BaseUnityPlugin)this).Config);
			Patch();
			Logger.LogInfo((object)"TestAccount666.TestAccountVariety v1.23.1 has loaded!");
		}

		internal static void Unpatch()
		{
			Logger.LogDebug((object)"Unpatching...");
			Harmony? harmony = Harmony;
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
			Logger.LogDebug((object)"Finished unpatching!");
		}
	}
	internal static class VarietyConfig
	{
		public static ConfigEntry<int> cubeExplodeChance;

		public static ConfigEntry<int> yippeeParticleChance;

		public static ConfigEntry<bool> giftMimicSpawnsOutsideEnemies;

		public static ConfigEntry<int> giftMimicAlternativeVariantChance;

		public static ConfigEntry<bool> fixTwoHandedWeapons;

		public static void Initialize(ConfigFile configFile)
		{
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Expected O, but got Unknown
			cubeExplodeChance = configFile.Bind<int>("Cube", "6. Cube Explode Chance", 50, "Chance for the cube to explode.");
			yippeeParticleChance = configFile.Bind<int>("Yippee", "6. Yippee Particle Chance", 60, "Chance for the yippee scrap to throw confetti.");
			giftMimicSpawnsOutsideEnemies = configFile.Bind<bool>("Gift Mimic", "3. Spawns Outside Enemies", false, "If set to true, will also spawn outside enemies. Starlancer AI Fix Required!!!.");
			giftMimicAlternativeVariantChance = configFile.Bind<int>("Gift Mimic", "4. Gift Mimic Alternative Variant Chance", 35, new ConfigDescription("Defines the chance for the Gift Mimic to use an alternative texture. Best when combined with UpturnedVariety.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			fixTwoHandedWeapons = configFile.Bind<bool>("Bug Fixes", "Fix Two Handed Weapons", true, "If set to true, will fix the two Handed Weapons. If you swing a two Handed Weapon, you can switch to a different item. This option prevents this behavior.");
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "TestAccount666.TestAccountVariety";

		public const string PLUGIN_NAME = "TestAccountVariety";

		public const string PLUGIN_VERSION = "1.23.1";
	}
}
namespace TestAccountVariety.Patches
{
	[HarmonyPatch(typeof(Shovel))]
	public static class ShovelPatch
	{
		[HarmonyPatch("HitShovel")]
		[HarmonyPostfix]
		public static void FixTwoHandedShovels(Shovel __instance, bool cancel)
		{
			if (!(!VarietyConfig.fixTwoHandedWeapons.Value || cancel))
			{
				__instance.previousPlayerHeldBy.twoHanded = ((GrabbableObject)__instance).itemProperties.twoHanded;
			}
		}
	}
}
namespace TestAccountVariety.Items.Yippee
{
	public class YippeeParticles : NetworkBehaviour
	{
		public ParticleSystem particleSystem;

		public GrabbableObject grabbableObject;

		private Random _random;

		public void Start()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			_random = new Random((uint)(DateTime.Now.Ticks & 0xFFFF));
		}

		private void OnEnable()
		{
			if (((NetworkBehaviour)grabbableObject).IsOwner)
			{
				PlayParticlesServerRpc();
			}
		}

		private void OnDisable()
		{
			if (Object.op_Implicit((Object)(object)particleSystem))
			{
				particleSystem.Stop();
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void PlayParticlesServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2334083020u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2334083020u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				int num = ((Random)(ref _random)).NextInt(1, 100);
				if (num < VarietyConfig.yippeeParticleChance.Value)
				{
					PlayParticlesClientRpc();
				}
			}
		}

		[ClientRpc]
		public void PlayParticlesClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1965948094u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1965948094u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && Object.op_Implicit((Object)(object)particleSystem))
				{
					particleSystem.time = 0f;
					particleSystem.Play();
				}
			}
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_YippeeParticles()
		{
			//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(2334083020u, new RpcReceiveHandler(__rpc_handler_2334083020));
			NetworkManager.__rpc_func_table.Add(1965948094u, new RpcReceiveHandler(__rpc_handler_1965948094));
		}

		private static void __rpc_handler_2334083020(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((YippeeParticles)(object)target).PlayParticlesServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1965948094(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((YippeeParticles)(object)target).PlayParticlesClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "YippeeParticles";
		}
	}
}
namespace TestAccountVariety.Items.WebleyPyramid
{
	[CreateAssetMenu(menuName = "ScriptableObjects/AudioClipWithWeight", order = 1)]
	public class AudioClipWithWeight : ScriptableObject
	{
		public AudioClip audioClip;

		public int weight;

		public bool isDeadly;
	}
	public class WebleyPyramid : MonoBehaviour
	{
		private static readonly int _UntriggerAnimatorHash = Animator.StringToHash("Untrigger");

		public GrabbableObject grabbableObject;

		public AudioSource audioSource;

		public List<AudioClipWithWeight> audioClips;

		public Animator animator;

		private void OnEnable()
		{
			if (audioSource.isPlaying)
			{
				animator.SetTrigger(_UntriggerAnimatorHash);
				return;
			}
			if (!grabbableObject.isHeld)
			{
				animator.SetTrigger(_UntriggerAnimatorHash);
				return;
			}
			PlayerControllerB playerHeldBy = grabbableObject.playerHeldBy;
			PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController;
			if ((Object)(object)playerHeldBy != (Object)(object)localPlayerController)
			{
				animator.SetTrigger(_UntriggerAnimatorHash);
				return;
			}
			int num = audioClips.Select((AudioClipWithWeight _, int weight) => weight).Sum();
			Random val = default(Random);
			((Random)(ref val))..ctor((uint)(DateTime.Now.Ticks & 0xFFFF));
			int num2 = ((Random)(ref val)).NextInt(num * 3, num * 12 + 1);
			AudioClipWithWeight audioClipWithWeight = null;
			bool flag;
			do
			{
				flag = false;
				foreach (AudioClipWithWeight audioClip in audioClips)
				{
					num2 -= audioClip.weight;
					if (num2 > 0)
					{
						continue;
					}
					audioClipWithWeight = audioClip;
					flag = true;
					break;
				}
			}
			while (!flag);
			grabbableObject.currentUseCooldown = audioClipWithWeight.audioClip.length;
			audioSource.PlayOneShot(audioClipWithWeight.audioClip);
			if (!audioClipWithWeight.isDeadly)
			{
				animator.SetTrigger(_UntriggerAnimatorHash);
			}
			else
			{
				((MonoBehaviour)this).StartCoroutine(KillPlayerAfterClip());
			}
		}

		public IEnumerator KillPlayerAfterClip()
		{
			yield return (object)new WaitUntil((Func<bool>)(() => !Object.op_Implicit((Object)(object)audioSource) || !audioSource.isPlaying));
			PlayerControllerB localPlayer = StartOfRound.Instance.localPlayerController;
			if ((Object)(object)localPlayer == (Object)null || !Object.op_Implicit((Object)(object)localPlayer))
			{
				if (Object.op_Implicit((Object)(object)animator))
				{
					animator.SetTrigger(_UntriggerAnimatorHash);
				}
				yield break;
			}
			if (localPlayer.isPlayerDead)
			{
				if (Object.op_Implicit((Object)(object)animator))
				{
					animator.SetTrigger(_UntriggerAnimatorHash);
				}
				yield break;
			}
			localPlayer.DamagePlayer(int.MaxValue, true, true, (CauseOfDeath)15, 1, false, default(Vector3));
			if (Object.op_Implicit((Object)(object)animator))
			{
				animator.SetTrigger(_UntriggerAnimatorHash);
			}
		}
	}
}
namespace TestAccountVariety.Items.ToyCar
{
	public class ToyCar : HoldableNoisemakerProp
	{
		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "ToyCar";
		}
	}
}
namespace TestAccountVariety.Items.ThrowableCube
{
	public class ThrowableCube : StunGrenadeItem
	{
		private static InputAction? _interactInputAction;

		private static InputAction? _discardInputAction;

		private const float KILL_RANGE = 1f;

		private const float DAMAGE_RANGE = 3f;

		private Random _random;

		public override void Start()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			((StunGrenadeItem)this).Start();
			_random = new Random((uint)(DateTime.Now.Ticks & 0xFFFF));
		}

		public override void Update()
		{
			if (!((GrabbableObject)this).isHeld)
			{
				((StunGrenadeItem)this).Update();
				return;
			}
			PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController;
			if ((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)(object)localPlayerController)
			{
				((StunGrenadeItem)this).Update();
				return;
			}
			if (_interactInputAction == null)
			{
				_interactInputAction = IngamePlayerSettings.Instance.playerInput.actions.FindAction("Interact", false);
			}
			if (_discardInputAction == null)
			{
				_discardInputAction = IngamePlayerSettings.Instance.playerInput.actions.FindAction("Discard", false);
			}
			base.explodeOnCollision = !_interactInputAction.IsPressed() && !_discardInputAction.IsPressed();
			((StunGrenadeItem)this).Update();
		}

		[ServerRpc(RequireOwnership = false)]
		public void ExplodeServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(437332633u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 437332633u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					int num = ((Random)(ref _random)).NextInt(1, 100);
					bool explode = num < VarietyConfig.cubeExplodeChance.Value;
					ExplodeClientRpc(explode);
				}
			}
		}

		[ClientRpc]
		public void ExplodeClientRpc(bool explode)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2048215277u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref explode, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2048215277u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					ExplodeStunGrenade(explode);
				}
			}
		}

		public void ExplodeStunGrenade(bool explode)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: 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_0048: 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_009c: Unknown result type (might be due to invalid IL or missing references)
			base.gotExplodeOnThrowRPC = false;
			base.hasCollided = false;
			base.explodeTimer = 2.5f;
			base.hasExploded = false;
			if (explode)
			{
				Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up * 0.2f, false, 1f, 3f, 40, 45f, (GameObject)null, false);
				Transform val = ((!((GrabbableObject)this).isInElevator) ? RoundManager.Instance.mapPropsContainer.transform : StartOfRound.Instance.elevatorTransform);
				Object.Instantiate<GameObject>(base.stunGrenadeExplosion, ((Component)this).transform.position, Quaternion.identity, val);
				base.itemAudio.PlayOneShot(base.explodeSFX);
				WalkieTalkie.TransmitOneShotAudio(base.itemAudio, base.explodeSFX, 1f);
			}
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_ThrowableCube()
		{
			//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(437332633u, new RpcReceiveHandler(__rpc_handler_437332633));
			NetworkManager.__rpc_func_table.Add(2048215277u, new RpcReceiveHandler(__rpc_handler_2048215277));
		}

		private static void __rpc_handler_437332633(NetworkBehaviour? target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((ThrowableCube)(object)target).ExplodeServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2048215277(NetworkBehaviour? target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool explode = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref explode, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((ThrowableCube)(object)target).ExplodeClientRpc(explode);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string? __getTypeName()
		{
			return "ThrowableCube";
		}
	}
}
namespace TestAccountVariety.Items.ThrowableCube.Patches
{
	[HarmonyPatch(typeof(StunGrenadeItem))]
	public static class ThrowableCubePatch
	{
		[HarmonyPatch("ExplodeStunGrenade")]
		[HarmonyPrefix]
		private static bool RedirectExplodeStunGrenade(StunGrenadeItem __instance)
		{
			if (!(__instance is ThrowableCube throwableCube))
			{
				return true;
			}
			if (!((NetworkBehaviour)throwableCube).IsOwner)
			{
				return false;
			}
			if (!((GrabbableObject)throwableCube).grabbable)
			{
				return false;
			}
			throwableCube.ExplodeServerRpc();
			return false;
		}
	}
}
namespace TestAccountVariety.Items.ShibaPlush
{
	public class ShibaPlush : NoisemakerProp
	{
		private static readonly int _SqueezeAnimatorHash = Animator.StringToHash("Squeeze");

		public ShibaPlushFunction[] shibaPlushFunctions;

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			if (!((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null) && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy))
			{
				PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController;
				if (!((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)(object)localPlayerController))
				{
					Random val = default(Random);
					((Random)(ref val))..ctor((uint)(DateTime.Now.Ticks & 0xFFFF));
					RunActionServerRpc(((Random)(ref val)).NextInt(0, shibaPlushFunctions.Length));
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void RunActionServerRpc(int index)
		{
			//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(1613242418u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, index);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1613242418u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					RunActionClientRpc(index);
				}
			}
		}

		[ClientRpc]
		public void RunActionClientRpc(int index)
		{
			//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(160861681u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, index);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 160861681u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					base.triggerAnimator.SetTrigger(_SqueezeAnimatorHash);
					ShibaPlushFunction shibaPlushFunction = shibaPlushFunctions[index];
					shibaPlushFunction.Run();
				}
			}
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_ShibaPlush()
		{
			//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(1613242418u, new RpcReceiveHandler(__rpc_handler_1613242418));
			NetworkManager.__rpc_func_table.Add(160861681u, new RpcReceiveHandler(__rpc_handler_160861681));
		}

		private static void __rpc_handler_1613242418(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)
			{
				int index = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref index);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((ShibaPlush)(object)target).RunActionServerRpc(index);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_160861681(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)
			{
				int index = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref index);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((ShibaPlush)(object)target).RunActionClientRpc(index);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "ShibaPlush";
		}
	}
}
namespace TestAccountVariety.Items.ShibaPlush.Functions
{
	public class BarrelFunction : SoundMakerPlushFunction
	{
	}
	public class MinecraftWoofFunction : SoundMakerPlushFunction
	{
	}
	public abstract class ShibaPlushFunction : MonoBehaviour
	{
		public ShibaPlush shibaPlush;

		public abstract void Run();
	}
	public abstract class SoundMakerPlushFunction : ShibaPlushFunction
	{
		public AudioClip audioClip;

		public AudioClip farAudioClip;

		public override void Run()
		{
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null))
			{
				float num = (float)((NoisemakerProp)shibaPlush).noisemakerRandom.Next((int)((double)((NoisemakerProp)shibaPlush).minLoudness * 100.0), (int)((double)((NoisemakerProp)shibaPlush).maxLoudness * 100.0)) / 100f;
				float pitch = (float)((NoisemakerProp)shibaPlush).noisemakerRandom.Next((int)((double)((NoisemakerProp)shibaPlush).minPitch * 100.0), (int)((double)((NoisemakerProp)shibaPlush).maxPitch * 100.0)) / 100f;
				((NoisemakerProp)shibaPlush).noiseAudio.pitch = pitch;
				((NoisemakerProp)shibaPlush).noiseAudio.PlayOneShot(audioClip, num);
				((NoisemakerProp)shibaPlush).noiseAudioFar.pitch = pitch;
				((NoisemakerProp)shibaPlush).noiseAudioFar.PlayOneShot(farAudioClip, num);
				WalkieTalkie.TransmitOneShotAudio(((NoisemakerProp)shibaPlush).noiseAudio, audioClip, num);
				RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, ((NoisemakerProp)shibaPlush).noiseRange, num, 0, ((GrabbableObject)shibaPlush).isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0);
				if (!((double)((NoisemakerProp)shibaPlush).minLoudness < 0.6000000238418579) && (Object)(object)((GrabbableObject)shibaPlush).playerHeldBy != (Object)null)
				{
					((GrabbableObject)shibaPlush).playerHeldBy.timeSinceMakingLoudNoise = 0f;
				}
			}
		}
	}
	public class WesleyFunction : SoundMakerPlushFunction
	{
	}
	public class WuffWuffFunction : SoundMakerPlushFunction
	{
	}
	public class YippeeFunction : SoundMakerPlushFunction
	{
		public ParticleSystem particleSystem;

		public override void Run()
		{
			if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null) && Object.op_Implicit((Object)(object)particleSystem))
			{
				base.Run();
				particleSystem.time = 0f;
				particleSystem.Play();
			}
		}
	}
}
namespace TestAccountVariety.Items.ExtendedItems
{
	public class HoldableNoisemakerProp : NoisemakerProp
	{
		public float currentLoudness;

		public float nextAudibleNoise;

		public override void Update()
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			((GrabbableObject)this).Update();
			if (base.noiseAudio.isPlaying)
			{
				nextAudibleNoise -= Time.deltaTime;
				if (nextAudibleNoise <= 0f)
				{
					RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, base.noiseRange, currentLoudness, 0, ((GrabbableObject)this).isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0);
					nextAudibleNoise = 0.5f;
				}
				((GrabbableObject)this).currentUseCooldown = ((GrabbableObject)this).useCooldown;
			}
		}

		public override void PocketItem()
		{
			StopSoundServerRpc();
			((GrabbableObject)this).PocketItem();
		}

		public override void DiscardItem()
		{
			StopSoundServerRpc();
			((GrabbableObject)this).DiscardItem();
		}

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController;
			if (!((Object)(object)localPlayerController == (Object)null) && !((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)(object)localPlayerController))
			{
				if (!buttonDown)
				{
					StopSoundServerRpc();
					return;
				}
				int index = base.noisemakerRandom.Next(0, base.noiseSFX.Length);
				float loudness = (float)base.noisemakerRandom.Next((int)((double)base.minLoudness * 100.0), (int)((double)base.maxLoudness * 100.0)) / 100f;
				float pitch = (float)base.noisemakerRandom.Next((int)((double)base.minPitch * 100.0), (int)((double)base.maxPitch * 100.0)) / 100f;
				StartSoundServerRpc(index, loudness, pitch);
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void StopSoundServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3500384104u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3500384104u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					StopSoundClientRpc();
				}
			}
		}

		[ClientRpc]
		public void StopSoundClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(547195959u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 547195959u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					base.noiseAudio.Stop();
					base.noiseAudioFar.Stop();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void StartSoundServerRpc(int index, float loudness, float pitch)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: 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_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_00bf: 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(3172316576u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, index);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref loudness, default(ForPrimitives));
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref pitch, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3172316576u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					StartSoundClientRpc(index, loudness, pitch);
				}
			}
		}

		[ClientRpc]
		public void StartSoundClientRpc(int index, float loudness, float pitch)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: 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_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_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: 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(698722271u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, index);
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref loudness, default(ForPrimitives));
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref pitch, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 698722271u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				base.noiseAudio.Stop();
				base.noiseAudioFar.Stop();
				base.noiseAudio.loop = true;
				base.noiseAudio.clip = base.noiseSFX[index];
				base.noiseAudio.volume = loudness;
				base.noiseAudio.pitch = pitch;
				base.noiseAudio.Play();
				base.noiseAudioFar.loop = true;
				base.noiseAudioFar.clip = base.noiseSFXFar[index];
				base.noiseAudioFar.volume = loudness;
				base.noiseAudioFar.pitch = pitch;
				base.noiseAudioFar.Play();
				currentLoudness = loudness;
				RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, base.noiseRange, currentLoudness, 0, ((GrabbableObject)this).isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0);
				if (!((double)base.minLoudness < 0.6000000238418579) && !((Object)(object)((GrabbableObject)this).playerHeldBy == (Object)null))
				{
					((GrabbableObject)this).playerHeldBy.timeSinceMakingLoudNoise = 0f;
				}
			}
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_HoldableNoisemakerProp()
		{
			//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(3500384104u, new RpcReceiveHandler(__rpc_handler_3500384104));
			NetworkManager.__rpc_func_table.Add(547195959u, new RpcReceiveHandler(__rpc_handler_547195959));
			NetworkManager.__rpc_func_table.Add(3172316576u, new RpcReceiveHandler(__rpc_handler_3172316576));
			NetworkManager.__rpc_func_table.Add(698722271u, new RpcReceiveHandler(__rpc_handler_698722271));
		}

		private static void __rpc_handler_3500384104(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HoldableNoisemakerProp)(object)target).StopSoundServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_547195959(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HoldableNoisemakerProp)(object)target).StopSoundClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3172316576(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int index = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref index);
				float loudness = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref loudness, default(ForPrimitives));
				float pitch = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref pitch, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HoldableNoisemakerProp)(object)target).StartSoundServerRpc(index, loudness, pitch);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_698722271(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int index = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref index);
				float loudness = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref loudness, default(ForPrimitives));
				float pitch = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref pitch, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HoldableNoisemakerProp)(object)target).StartSoundClientRpc(index, loudness, pitch);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "HoldableNoisemakerProp";
		}
	}
}
namespace TestAccountVariety.Items.DoorScrap
{
	public static class DoorBreachSupport
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static DoorBreachEvent <0>__DoorBreached;
		}

		public static DoorScrapScript doorScrapScript;

		public static void Initialize()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			DoorBreachEvent doorBreach = EventHandler.doorBreach;
			object obj = <>O.<0>__DoorBreached;
			if (obj == null)
			{
				DoorBreachEvent val = DoorBreached;
				<>O.<0>__DoorBreached = val;
				obj = (object)val;
			}
			EventHandler.doorBreach = (DoorBreachEvent)Delegate.Combine((Delegate?)(object)doorBreach, (Delegate?)obj);
		}

		public static void DoorBreached(DoorBreachEventArguments arguments)
		{
			//IL_0079: 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_0089: 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_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			if (!((NetworkBehaviour)StartOfRound.Instance).IsHost)
			{
				return;
			}
			Random val = default(Random);
			((Random)(ref val))..ctor((uint)(DateTime.Now.Ticks & 0xFFFF));
			int num = ((Random)(ref val)).NextInt(1, 100);
			if (num > doorScrapScript.doorSpawnChance.Value)
			{
				return;
			}
			Item item = doorScrapScript.itemWithDefaultWeight.item;
			Vector3 position = ((Component)arguments.doorLock).transform.position;
			GameObject spawnPrefab = item.spawnPrefab;
			GameObject val2 = Object.Instantiate<GameObject>(spawnPrefab, position, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer);
			DoorScrap component = val2.GetComponent<DoorScrap>();
			((Component)component).transform.rotation = Quaternion.Euler(((GrabbableObject)component).itemProperties.restingRotation);
			((GrabbableObject)component).fallTime = 0f;
			((GrabbableObject)component).scrapValue = ((Random)(ref val)).NextInt((int)((double)item.minValue * 0.4), (int)((double)item.maxValue * 0.4));
			string doorType = "SteelDoor";
			Transform parent = ((Component)arguments.doorLock).transform.parent.parent;
			string text = (Object.op_Implicit((Object)(object)parent) ? ((Object)parent).name : null);
			TestAccountVariety.Logger.LogFatal((object)("Name? " + text));
			if (!string.IsNullOrWhiteSpace(text))
			{
				if (text.Contains("YellowMineDoor"))
				{
					doorType = "YellowMineDoor";
				}
				Transform parent2 = parent.parent;
				if (text.Contains("SteelDoor") && Object.op_Implicit((Object)(object)parent2))
				{
					text = ((Object)parent2).name;
					if (text.Contains("FancyDoor"))
					{
						doorType = "FancyDoor";
					}
				}
			}
			component.doorType = doorType;
			NetworkObject component2 = val2.GetComponent<NetworkObject>();
			component2.Spawn(false);
		}
	}
	public class DoorScrap : Shovel
	{
		public GameObject steelDoorArt;

		public GameObject fancyDoorArt;

		public GameObject mineDoorArt;

		public static readonly string[] PossibleDoorVariations = new string[3] { "SteelDoor", "FancyDoor", "YellowMineDoor" };

		public string? doorType;

		public override void OnNetworkSpawn()
		{
			((NetworkBehaviour)this).OnNetworkSpawn();
			SyncScrapValueServerRpc();
			SyncDoorTypeServerRpc();
		}

		[ServerRpc(RequireOwnership = false)]
		public void SyncScrapValueServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(629579620u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 629579620u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SyncScrapValueClientRpc(((GrabbableObject)this).scrapValue);
				}
			}
		}

		[ClientRpc]
		public void SyncScrapValueClientRpc(int value)
		{
			//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(406798397u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, value);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 406798397u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((GrabbableObject)this).SetScrapValue(value);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SyncDoorTypeServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3898058602u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3898058602u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				if (string.IsNullOrWhiteSpace(doorType))
				{
					Random val3 = default(Random);
					((Random)(ref val3))..ctor((uint)(DateTime.Now.Ticks & 0xFFFF));
					doorType = PossibleDoorVariations[((Random)(ref val3)).NextInt(0, PossibleDoorVariations.Length)];
				}
				SyncDoorTypeClientRpc(doorType);
			}
		}

		[ClientRpc]
		public void SyncDoorTypeClientRpc(string doorType)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: 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(1668637618u, val, (RpcDelivery)0);
				bool flag = doorType != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(doorType, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1668637618u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				this.doorType = doorType;
				switch (doorType)
				{
				case "SteelDoor":
					fancyDoorArt.SetActive(false);
					mineDoorArt.SetActive(false);
					steelDoorArt.SetActive(true);
					break;
				case "YellowMineDoor":
					steelDoorArt.SetActive(false);
					fancyDoorArt.SetActive(false);
					mineDoorArt.SetActive(true);
					break;
				case "FancyDoor":
					steelDoorArt.SetActive(false);
					mineDoorArt.SetActive(false);
					fancyDoorArt.SetActive(true);
					break;
				}
			}
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_DoorScrap()
		{
			//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(629579620u, new RpcReceiveHandler(__rpc_handler_629579620));
			NetworkManager.__rpc_func_table.Add(406798397u, new RpcReceiveHandler(__rpc_handler_406798397));
			NetworkManager.__rpc_func_table.Add(3898058602u, new RpcReceiveHandler(__rpc_handler_3898058602));
			NetworkManager.__rpc_func_table.Add(1668637618u, new RpcReceiveHandler(__rpc_handler_1668637618));
		}

		private static void __rpc_handler_629579620(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((DoorScrap)(object)target).SyncScrapValueServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_406798397(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)
			{
				int value = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref value);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((DoorScrap)(object)target).SyncScrapValueClientRpc(value);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3898058602(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((DoorScrap)(object)target).SyncDoorTypeServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1668637618(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string text = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref text, false);
				}
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((DoorScrap)(object)target).SyncDoorTypeClientRpc(text);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "DoorScrap";
		}
	}
	[CreateAssetMenu(menuName = "TestAccountVariety/DoorScrapScript", order = 1)]
	public class DoorScrapScript : CustomScript
	{
		public ConfigEntry<int> doorSpawnChance = null;

		public ItemWithDefaultWeight itemWithDefaultWeight;

		public override void Initialize(ConfigFile? configFile)
		{
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			Object.DontDestroyOnLoad((Object)(object)itemWithDefaultWeight);
			if (configFile == null)
			{
				configFile = ((BaseUnityPlugin)TestAccountVariety.Instance).Config;
			}
			if ((Object)(object)itemWithDefaultWeight.item == (Object)null)
			{
				throw new ArgumentNullException("item", "ItemProperties cannot be null!");
			}
			string itemName = itemWithDefaultWeight.item.itemName;
			ConfigEntry<bool> val = configFile.Bind<bool>(itemName ?? "", "1. Enabled", true, "If false, " + itemName + " will not be registered. This is different from a spawn weight of 0!");
			if (val.Value)
			{
				doorSpawnChance = configFile.Bind<int>(itemName ?? "", "6. Spawn Chance", 35, new ConfigDescription("If DoorBreach is installed, you can set a spawn chance here.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
				if (DependencyChecker.IsDoorBreachInstalled())
				{
					DoorBreachSupport.doorScrapScript = this;
					DoorBreachSupport.Initialize();
				}
			}
		}
	}
}
namespace TestAccountVariety.Items.CleaningDroneToy
{
	public class CleaningDroneToy : GrabbableObject
	{
		public GameObject fogPrefab;

		public AudioSource audioSource;

		public AudioClip audioClip;

		public Coroutine? gasCoroutine;

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			((GrabbableObject)this).ItemActivate(used, buttonDown);
			if (gasCoroutine != null)
			{
				((MonoBehaviour)this).StopCoroutine(gasCoroutine);
			}
			if (!buttonDown)
			{
				StopSoundServerRpc();
			}
			else
			{
				gasCoroutine = ((MonoBehaviour)this).StartCoroutine(GasEveryone());
			}
		}

		public override void DiscardItem()
		{
			StopSoundServerRpc();
			if (gasCoroutine != null)
			{
				((MonoBehaviour)this).StopCoroutine(gasCoroutine);
			}
			((GrabbableObject)this).DiscardItem();
		}

		public override void PocketItem()
		{
			StopSoundServerRpc();
			if (gasCoroutine != null)
			{
				((MonoBehaviour)this).StopCoroutine(gasCoroutine);
			}
			((GrabbableObject)this).PocketItem();
		}

		public IEnumerator GasEveryone()
		{
			Vector3 position = ((Component)this).transform.position;
			SpawnGasServerRpc(position);
			yield return (object)new WaitForSeconds(0.5f);
			yield return GasEveryone();
		}

		[ServerRpc(RequireOwnership = false)]
		public void StopSoundServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1794046580u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1794046580u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					StopSoundClientRpc();
				}
			}
		}

		[ClientRpc]
		public void StopSoundClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4190935783u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4190935783u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					audioSource.Stop();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SpawnGasServerRpc(Vector3 position)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: 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(1450456784u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1450456784u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SpawnGasClientRpc(position);
				}
			}
		}

		[ClientRpc]
		public void SpawnGasClientRpc(Vector3 position)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: 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(4193531055u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4193531055u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				if (!audioSource.isPlaying)
				{
					audioSource.PlayOneShot(audioClip, 1f);
					audioSource.loop = true;
				}
				GameObject val3 = Object.Instantiate<GameObject>(fogPrefab);
				val3.transform.SetPositionAndRotation(position, Quaternion.identity);
			}
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_CleaningDroneToy()
		{
			//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(1794046580u, new RpcReceiveHandler(__rpc_handler_1794046580));
			NetworkManager.__rpc_func_table.Add(4190935783u, new RpcReceiveHandler(__rpc_handler_4190935783));
			NetworkManager.__rpc_func_table.Add(1450456784u, new RpcReceiveHandler(__rpc_handler_1450456784));
			NetworkManager.__rpc_func_table.Add(4193531055u, new RpcReceiveHandler(__rpc_handler_4193531055));
		}

		private static void __rpc_handler_1794046580(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((CleaningDroneToy)(object)target).StopSoundServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_4190935783(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((CleaningDroneToy)(object)target).StopSoundClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1450456784(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: 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);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((CleaningDroneToy)(object)target).SpawnGasServerRpc(position);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_4193531055(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: 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);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((CleaningDroneToy)(object)target).SpawnGasClientRpc(position);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "CleaningDroneToy";
		}
	}
	public class TzpFogZone : MonoBehaviour
	{
		public SphereCollider collider;

		public ParticleSystem particleSystem;

		public float destroyAfter;

		private float _stopwatch;

		private void Start()
		{
			particleSystem.Play();
		}

		public void FixedUpdate()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController;
			Bounds bounds = ((Collider)collider).bounds;
			if (((Bounds)(ref bounds)).Contains(localPlayerController.playerEye.position))
			{
				localPlayerController.increasingDrunknessThisFrame = true;
				float num = localPlayerController.drunknessInertia + Time.fixedDeltaTime / 0.25f * localPlayerController.drunknessSpeed / 2f;
				localPlayerController.drunknessInertia = Mathf.Clamp(num, 0.05f, 4.5f);
			}
			_stopwatch += Time.fixedDeltaTime;
			if (_stopwatch >= 1.5f)
			{
				particleSystem.Stop();
			}
			if (_stopwatch >= destroyAfter)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}
	}
}
namespace TestAccountVariety.Hazards.PropulsionMine
{
	public class NewPropulsionMine : PropulsionMine
	{
		public AudioSource mineAudio;

		public AudioSource farMineAudio;

		public AudioClip[] beepClip;

		public AudioClip[] mineDetonateClip;

		public AudioClip[] farMineDetonateClip;

		public AudioClip[] pressedClip;

		public AudioClip deactivateClip;

		public AudioClip activateClip;

		public Animator pressAnimator;

		public MeshRenderer buttonMeshRenderer;

		public Material defaultMaterial;

		public Material litMaterial;

		public GameObject lightObject;

		public Light light;

		public HDAdditionalLightData lightData;

		public float physicsForce;

		public float damageRange;

		public int nonLethalDamage;

		private static readonly int _BoomAnimatorHash = Animator.StringToHash("Boom");

		private static readonly int _PressedAnimatorHash = Animator.StringToHash("Pressed");

		public int pressed;

		public bool activated = true;

		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(PlayBeeps());
		}

		private IEnumerator PlayBeeps()
		{
			if (Object.op_Implicit((Object)(object)this))
			{
				yield return (object)new WaitForSeconds((float)Random.Range(10, 16));
				PlayBeep();
				((Renderer)buttonMeshRenderer).material = litMaterial;
				((Renderer)buttonMeshRenderer).sharedMaterial = litMaterial;
				lightObject.SetActive(true);
				((Behaviour)light).enabled = true;
				light.range = 12f;
				lightData.intensity = 2610.3f;
				yield return (object)new WaitForSeconds(0.2f);
				lightObject.SetActive(false);
				((Behaviour)light).enabled = false;
				((Renderer)buttonMeshRenderer).material = defaultMaterial;
				((Renderer)buttonMeshRenderer).sharedMaterial = defaultMaterial;
				yield return PlayBeeps();
			}
		}

		private void OnTriggerEnter(Collider other)
		{
			PlayerControllerB val = default(PlayerControllerB);
			if (((Component)other).TryGetComponent<PlayerControllerB>(ref val))
			{
				PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController;
				if (!((Object)(object)val != (Object)(object)localPlayerController) && activated)
				{
					PressMineServerRpc(press: true);
				}
			}
		}

		private void OnTriggerExit(Collider other)
		{
			PlayerControllerB val = default(PlayerControllerB);
			if (!((Component)other).TryGetComponent<PlayerControllerB>(ref val))
			{
				return;
			}
			PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController;
			if (!((Object)(object)val != (Object)(object)localPlayerController) && pressed > 0)
			{
				if (pressed - 1 <= 0 && activated)
				{
					DetonateServerRpc();
				}
				PressMineServerRpc(press: false);
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void DetonateServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2282712673u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2282712673u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					DetonateClientRpc();
				}
			}
		}

		[ClientRpc]
		public void DetonateClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(404219356u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 404219356u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Detonate();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void PressMineServerRpc(bool press)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3730042327u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref press, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3730042327u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					PressMineClientRpc(press);
				}
			}
		}

		[ClientRpc]
		public void PressMineClientRpc(bool press)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2829341982u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref press, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2829341982u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				pressed += (press ? 1 : (-1));
				if (press ? (pressed <= 1) : (pressed <= 0))
				{
					pressAnimator.SetBool(_PressedAnimatorHash, press);
				}
				if (pressed <= 1)
				{
					AudioClip val3 = pressedClip[Random.Range(0, pressedClip.Length)];
					mineAudio.PlayOneShot(val3, 1f);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SetMineEnabledServerRpc(bool enable)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3987089079u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref enable, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3987089079u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SetMineEnabledClientRpc(enable);
				}
			}
		}

		[ClientRpc]
		public void SetMineEnabledClientRpc(bool enable)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1421694831u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref enable, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1421694831u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((Behaviour)this).enabled = enable;
				}
			}
		}

		public void Detonate()
		{
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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)
			pressAnimator.SetTrigger(_BoomAnimatorHash);
			AudioClip val = mineDetonateClip[Random.Range(0, mineDetonateClip.Length)];
			mineAudio.pitch = Random.Range(0.93f, 1.07f);
			mineAudio.PlayOneShot(val, 1f);
			AudioClip val2 = farMineDetonateClip[Random.Range(0, farMineDetonateClip.Length)];
			farMineAudio.pitch = Random.Range(0.93f, 1.07f);
			farMineAudio.PlayOneShot(val2, 1f);
			Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up, false, 0f, damageRange, nonLethalDamage, physicsForce, (GameObject)null, false);
		}

		public void PlayBeep()
		{
			AudioClip val = beepClip[Random.Range(0, beepClip.Length)];
			mineAudio.pitch = Random.Range(0.93f, 1.07f);
			mineAudio.PlayOneShot(val, 1f);
		}

		protected override void __initializeVariables()
		{
			base.__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_NewPropulsionMine()
		{
			//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
			NetworkManager.__rpc_func_table.Add(2282712673u, new RpcReceiveHandler(__rpc_handler_2282712673));
			NetworkManager.__rpc_func_table.Add(404219356u, new RpcReceiveHandler(__rpc_handler_404219356));
			NetworkManager.__rpc_func_table.Add(3730042327u, new RpcReceiveHandler(__rpc_handler_3730042327));
			NetworkManager.__rpc_func_table.Add(2829341982u, new RpcReceiveHandler(__rpc_handler_2829341982));
			NetworkManager.__rpc_func_table.Add(3987089079u, new RpcReceiveHandler(__rpc_handler_3987089079));
			NetworkManager.__rpc_func_table.Add(1421694831u, new RpcReceiveHandler(__rpc_handler_1421694831));
		}

		private static void __rpc_handler_2282712673(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((NewPropulsionMine)(object)target).DetonateServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_404219356(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((NewPropulsionMine)(object)target).DetonateClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3730042327(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool press = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref press, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((NewPropulsionMine)(object)target).PressMineServerRpc(press);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

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

		private static void __rpc_handler_3987089079(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool mineEnabledServerRpc = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref mineEnabledServerRpc, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((NewPropulsionMine)(object)target).SetMineEnabledServerRpc(mineEnabledServerRpc);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

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

		[MethodImpl(MethodIm