Decompiled source of Devious Traps v1.3.1

DeviousTraps.dll

Decompiled 12 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using DeviousTraps.NetcodePatcher;
using DeviousTraps.src.SoundCannon;
using GameNetcodeStuff;
using HarmonyLib;
using LethalConfig;
using LethalConfig.ConfigItems;
using LethalConfig.ConfigItems.Options;
using LethalLib.Extras;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using On;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("bcs4313")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Adds an array of deadly traps")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+cd9e2c801759e115bb3ab98ef537ed8ed3634744")]
[assembly: AssemblyProduct("DeviousTraps")]
[assembly: AssemblyTitle("DeviousTraps")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: NetcodePatchedAssembly]
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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace DeviousTraps
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("DeviousTraps", "DeviousTraps", "1.1.5")]
	public class Plugin : BaseUnityPlugin
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Func<SelectableLevel, AnimationCurve> <>9__13_0;

			public static Func<SelectableLevel, AnimationCurve> <>9__13_1;

			public static Func<SelectableLevel, AnimationCurve> <>9__13_2;

			public static hook_LoadNewLevel <>9__14_0;

			internal AnimationCurve <Awake>b__13_0(SelectableLevel _)
			{
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Expected O, but got Unknown
				int num = 0;
				double num2 = 4.8 * (double)SawSpawnrate.Value;
				return new AnimationCurve((Keyframe[])(object)new Keyframe[2]
				{
					new Keyframe(0f, (float)num, 0.267f, 0.267f, 0f, 0.246f),
					new Keyframe(1f, (float)num2, 61f, 61f, 0.015f * (float)num2, 0f)
				});
			}

			internal AnimationCurve <Awake>b__13_1(SelectableLevel _)
			{
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Expected O, but got Unknown
				int num = 0;
				double num2 = 4.8 * (double)FlameSpawnrate.Value;
				return new AnimationCurve((Keyframe[])(object)new Keyframe[2]
				{
					new Keyframe(0f, (float)num, 0.267f, 0.267f, 0f, 0.246f),
					new Keyframe(1f, (float)num2, 61f, 61f, 0.015f * (float)num2, 0f)
				});
			}

			internal AnimationCurve <Awake>b__13_2(SelectableLevel _)
			{
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Expected O, but got Unknown
				int num = 0;
				double num2 = 4.8 * (double)LRADSpawnrate.Value;
				return new AnimationCurve((Keyframe[])(object)new Keyframe[2]
				{
					new Keyframe(0f, (float)num, 0.267f, 0.267f, 0f, 0.246f),
					new Keyframe(1f, (float)num2, 61f, 61f, 0.015f * (float)num2, 0f)
				});
			}

			internal void <Hooks>b__14_0(orig_LoadNewLevel orig, RoundManager self, int randomSeed, SelectableLevel newLevel)
			{
				orig.Invoke(self, randomSeed, newLevel);
				try
				{
					if (ImpactFXState.Instances == null)
					{
						return;
					}
					foreach (ImpactFXState instance in ImpactFXState.Instances)
					{
						if ((Object)(object)instance != (Object)null)
						{
							Object.Destroy((Object)(object)instance);
						}
						ImpactFXState.Instances.Clear();
					}
				}
				catch (Exception ex)
				{
					Debug.LogError((object)("Devious Traps: LRAD FX clear error: " + ex.ToString() + " this is only an issue if you see red noise fx on your screen or if you are deaf. Otherwise this is OK."));
				}
			}
		}

		public static Harmony _harmony;

		public static ManualLogSource Logger;

		public static AssetBundle TrapBundle;

		public static GameObject SawTurretPrefab;

		public static GameObject SawPrefab;

		public static SpawnableMapObjectDef SawTurretDef;

		public static GameObject FlameTurretPrefab;

		public static SpawnableMapObjectDef FlameTurretDef;

		public static GameObject LRADTurretPrefab;

		public static GameObject LRADBlastPrefab;

		public static GameObject LRADImpactPrefab;

		public static SpawnableMapObjectDef LRADTurretDef;

		public static ConfigEntry<float> SawSpawnrate;

		public static ConfigEntry<float> SawDmgMult;

		public static ConfigEntry<float> SawTargetRange;

		public static ConfigEntry<float> SawWindupTime;

		public static ConfigEntry<float> SawFirerate;

		public static ConfigEntry<int> SawAmmo;

		public static ConfigEntry<float> SawReloadTime;

		public static ConfigEntry<float> SawLaunchSpeed;

		public static ConfigEntry<float> SawVolume;

		public static ConfigEntry<float> FlameSpawnrate;

		public static ConfigEntry<float> FlameDmgMult;

		public static ConfigEntry<float> FlameTargetRange;

		public static ConfigEntry<float> FlameRisingTime;

		public static ConfigEntry<float> FlameRestingTime;

		public static ConfigEntry<float> FlameRotationSpeed;

		public static ConfigEntry<float> FlameSpinningTime;

		public static ConfigEntry<float> FlameVolume;

		public static ConfigEntry<float> SmokeCooldown;

		public static ConfigEntry<float> LRADSpawnrate;

		public static ConfigEntry<float> LRADChargeTime;

		public static ConfigEntry<float> LRADReloadTime;

		public static ConfigEntry<float> LRADTargetRange;

		public static ConfigEntry<float> LRADDmgMult;

		public static ConfigEntry<float> LRADDisorientPeriod;

		public static ConfigEntry<float> LRADDizzyMult;

		public static ConfigEntry<float> LRADDrunknessMult;

		public static ConfigEntry<float> LRADFXMult;

		public static ConfigEntry<float> LRADVolume;

		public static ConfigEntry<float> LRADFXVolume;

		public static ConfigEntry<float> LRADProjectileSpeed;

		public void LogIfDebugBuild(string text)
		{
			Logger.LogInfo((object)text);
		}

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			PopulateAssets();
			bindVars();
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			Type[] array = types;
			foreach (Type type in array)
			{
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array2 = methods;
				foreach (MethodInfo methodInfo in array2)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
			SawTurretPrefab = TrapBundle.LoadAsset<GameObject>("SawTurretTrap");
			SawPrefab = TrapBundle.LoadAsset<GameObject>("SawBlade");
			SawTurretDef = TrapBundle.LoadAsset<SpawnableMapObjectDef>("SawTurretDef");
			FlameTurretPrefab = TrapBundle.LoadAsset<GameObject>("FlameTurret");
			FlameTurretDef = TrapBundle.LoadAsset<SpawnableMapObjectDef>("FlamePillarDef");
			LRADTurretPrefab = TrapBundle.LoadAsset<GameObject>("LRAD");
			LRADTurretDef = TrapBundle.LoadAsset<SpawnableMapObjectDef>("SoundTurretDef");
			LRADBlastPrefab = TrapBundle.LoadAsset<GameObject>("SoundWave");
			LRADImpactPrefab = TrapBundle.LoadAsset<GameObject>("ImpactFX");
			Debug.Log((object)("LRAD Impact FX " + (object)LRADBlastPrefab));
			Debug.Log((object)("LRAD Turret Def: " + (object)LRADTurretPrefab));
			Random.InitState((int)DateTime.Now.Ticks);
			MapObjects.RegisterMapObject(SawTurretDef, (LevelTypes)(-1), (Func<SelectableLevel, AnimationCurve>)delegate
			{
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Expected O, but got Unknown
				int num5 = 0;
				double num6 = 4.8 * (double)SawSpawnrate.Value;
				return new AnimationCurve((Keyframe[])(object)new Keyframe[2]
				{
					new Keyframe(0f, (float)num5, 0.267f, 0.267f, 0f, 0.246f),
					new Keyframe(1f, (float)num6, 61f, 61f, 0.015f * (float)num6, 0f)
				});
			});
			MapObjects.RegisterMapObject(FlameTurretDef, (LevelTypes)(-1), (Func<SelectableLevel, AnimationCurve>)delegate
			{
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Expected O, but got Unknown
				int num3 = 0;
				double num4 = 4.8 * (double)FlameSpawnrate.Value;
				return new AnimationCurve((Keyframe[])(object)new Keyframe[2]
				{
					new Keyframe(0f, (float)num3, 0.267f, 0.267f, 0f, 0.246f),
					new Keyframe(1f, (float)num4, 61f, 61f, 0.015f * (float)num4, 0f)
				});
			});
			MapObjects.RegisterMapObject(LRADTurretDef, (LevelTypes)(-1), (Func<SelectableLevel, AnimationCurve>)delegate
			{
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Expected O, but got Unknown
				int num = 0;
				double num2 = 4.8 * (double)LRADSpawnrate.Value;
				return new AnimationCurve((Keyframe[])(object)new Keyframe[2]
				{
					new Keyframe(0f, (float)num, 0.267f, 0.267f, 0f, 0.246f),
					new Keyframe(1f, (float)num2, 61f, 61f, 0.015f * (float)num2, 0f)
				});
			});
			NetworkPrefabs.RegisterNetworkPrefab(SawPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(SawTurretPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(FlameTurretPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(LRADTurretPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(LRADBlastPrefab);
			NetworkPrefabs.RegisterNetworkPrefab(LRADImpactPrefab);
			Hooks();
		}

		public void Hooks()
		{
			//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
			object obj = <>c.<>9__14_0;
			if (obj == null)
			{
				hook_LoadNewLevel val = delegate(orig_LoadNewLevel orig, RoundManager self, int randomSeed, SelectableLevel newLevel)
				{
					orig.Invoke(self, randomSeed, newLevel);
					try
					{
						if (ImpactFXState.Instances != null)
						{
							foreach (ImpactFXState instance in ImpactFXState.Instances)
							{
								if ((Object)(object)instance != (Object)null)
								{
									Object.Destroy((Object)(object)instance);
								}
								ImpactFXState.Instances.Clear();
							}
							return;
						}
					}
					catch (Exception ex)
					{
						Debug.LogError((object)("Devious Traps: LRAD FX clear error: " + ex.ToString() + " this is only an issue if you see red noise fx on your screen or if you are deaf. Otherwise this is OK."));
					}
				};
				<>c.<>9__14_0 = val;
				obj = (object)val;
			}
			RoundManager.LoadNewLevel += (hook_LoadNewLevel)obj;
		}

		public void bindVars()
		{
			//IL_0482: Unknown result type (might be due to invalid IL or missing references)
			//IL_0487: Unknown result type (might be due to invalid IL or missing references)
			//IL_048f: Unknown result type (might be due to invalid IL or missing references)
			//IL_049a: Expected O, but got Unknown
			//IL_049b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a6: Expected O, but got Unknown
			//IL_04ac: Expected O, but got Unknown
			//IL_04a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ad: Expected O, but got Unknown
			//IL_04b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ca: Expected O, but got Unknown
			//IL_04cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d6: Expected O, but got Unknown
			//IL_04dc: Expected O, but got Unknown
			//IL_04d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04dd: Expected O, but got Unknown
			//IL_04e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fa: Expected O, but got Unknown
			//IL_04fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0506: Expected O, but got Unknown
			//IL_050c: Expected O, but got Unknown
			//IL_0507: Unknown result type (might be due to invalid IL or missing references)
			//IL_050d: Expected O, but got Unknown
			//IL_0512: Unknown result type (might be due to invalid IL or missing references)
			//IL_0517: Unknown result type (might be due to invalid IL or missing references)
			//IL_051f: Unknown result type (might be due to invalid IL or missing references)
			//IL_052a: Expected O, but got Unknown
			//IL_052b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0536: Expected O, but got Unknown
			//IL_053c: Expected O, but got Unknown
			//IL_0537: Unknown result type (might be due to invalid IL or missing references)
			//IL_053d: Expected O, but got Unknown
			//IL_0542: Unknown result type (might be due to invalid IL or missing references)
			//IL_0547: Unknown result type (might be due to invalid IL or missing references)
			//IL_054f: Unknown result type (might be due to invalid IL or missing references)
			//IL_055a: Expected O, but got Unknown
			//IL_055b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0566: Expected O, but got Unknown
			//IL_056c: Expected O, but got Unknown
			//IL_0567: Unknown result type (might be due to invalid IL or missing references)
			//IL_056e: Expected O, but got Unknown
			//IL_0573: Unknown result type (might be due to invalid IL or missing references)
			//IL_0578: Unknown result type (might be due to invalid IL or missing references)
			//IL_0580: Unknown result type (might be due to invalid IL or missing references)
			//IL_058b: Expected O, but got Unknown
			//IL_058c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0597: Expected O, but got Unknown
			//IL_059d: Expected O, but got Unknown
			//IL_0598: Unknown result type (might be due to invalid IL or missing references)
			//IL_059f: Expected O, but got Unknown
			//IL_05a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bc: Expected O, but got Unknown
			//IL_05bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c8: Expected O, but got Unknown
			//IL_05ce: Expected O, but got Unknown
			//IL_05c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d0: Expected O, but got Unknown
			//IL_05d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05da: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ed: Expected O, but got Unknown
			//IL_05ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f9: Expected O, but got Unknown
			//IL_05ff: Expected O, but got Unknown
			//IL_05fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0601: Expected O, but got Unknown
			//IL_0606: Unknown result type (might be due to invalid IL or missing references)
			//IL_060b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0613: Unknown result type (might be due to invalid IL or missing references)
			//IL_061e: Expected O, but got Unknown
			//IL_061f: Unknown result type (might be due to invalid IL or missing references)
			//IL_062a: Expected O, but got Unknown
			//IL_0630: Expected O, but got Unknown
			//IL_062b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0632: Expected O, but got Unknown
			//IL_067b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0680: Unknown result type (might be due to invalid IL or missing references)
			//IL_0688: Unknown result type (might be due to invalid IL or missing references)
			//IL_0693: Expected O, but got Unknown
			//IL_0694: Unknown result type (might be due to invalid IL or missing references)
			//IL_069f: Expected O, but got Unknown
			//IL_06a5: Expected O, but got Unknown
			//IL_06a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a7: Expected O, but got Unknown
			//IL_06ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c4: Expected O, but got Unknown
			//IL_06c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d0: Expected O, but got Unknown
			//IL_06d6: Expected O, but got Unknown
			//IL_06d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d8: Expected O, but got Unknown
			//IL_06dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f5: Expected O, but got Unknown
			//IL_06f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0701: Expected O, but got Unknown
			//IL_0707: Expected O, but got Unknown
			//IL_0702: Unknown result type (might be due to invalid IL or missing references)
			//IL_0709: Expected O, but got Unknown
			//IL_070e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0713: Unknown result type (might be due to invalid IL or missing references)
			//IL_071b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0726: Expected O, but got Unknown
			//IL_0727: Unknown result type (might be due to invalid IL or missing references)
			//IL_0732: Expected O, but got Unknown
			//IL_0738: Expected O, but got Unknown
			//IL_0733: Unknown result type (might be due to invalid IL or missing references)
			//IL_073a: Expected O, but got Unknown
			//IL_073f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0744: Unknown result type (might be due to invalid IL or missing references)
			//IL_074c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0757: Expected O, but got Unknown
			//IL_0758: Unknown result type (might be due to invalid IL or missing references)
			//IL_0763: Expected O, but got Unknown
			//IL_0769: Expected O, but got Unknown
			//IL_0764: Unknown result type (might be due to invalid IL or missing references)
			//IL_076b: Expected O, but got Unknown
			//IL_0770: Unknown result type (might be due to invalid IL or missing references)
			//IL_0775: Unknown result type (might be due to invalid IL or missing references)
			//IL_077d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0788: Expected O, but got Unknown
			//IL_0789: Unknown result type (might be due to invalid IL or missing references)
			//IL_0794: Expected O, but got Unknown
			//IL_079a: Expected O, but got Unknown
			//IL_0795: Unknown result type (might be due to invalid IL or missing references)
			//IL_079c: Expected O, but got Unknown
			//IL_07a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b5: Expected O, but got Unknown
			//IL_07b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c1: Expected O, but got Unknown
			//IL_07c7: Expected O, but got Unknown
			//IL_07c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c9: Expected O, but got Unknown
			//IL_07ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07db: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e6: Expected O, but got Unknown
			//IL_07e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f2: Expected O, but got Unknown
			//IL_07f8: Expected O, but got Unknown
			//IL_07f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fa: Expected O, but got Unknown
			//IL_07ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0804: Unknown result type (might be due to invalid IL or missing references)
			//IL_080c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0817: Expected O, but got Unknown
			//IL_0818: Unknown result type (might be due to invalid IL or missing references)
			//IL_0823: Expected O, but got Unknown
			//IL_0829: Expected O, but got Unknown
			//IL_0824: Unknown result type (might be due to invalid IL or missing references)
			//IL_082b: Expected O, but got Unknown
			//IL_0878: Unknown result type (might be due to invalid IL or missing references)
			//IL_087d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0885: Unknown result type (might be due to invalid IL or missing references)
			//IL_0890: Expected O, but got Unknown
			//IL_0891: Unknown result type (might be due to invalid IL or missing references)
			//IL_089c: Expected O, but got Unknown
			//IL_08a2: Expected O, but got Unknown
			//IL_089d: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a4: Expected O, but got Unknown
			//IL_08a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c1: Expected O, but got Unknown
			//IL_08c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cd: Expected O, but got Unknown
			//IL_08d3: Expected O, but got Unknown
			//IL_08ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d5: Expected O, but got Unknown
			//IL_08da: Unknown result type (might be due to invalid IL or missing references)
			//IL_08df: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f2: Expected O, but got Unknown
			//IL_08f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fe: Expected O, but got Unknown
			//IL_0904: Expected O, but got Unknown
			//IL_08ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0906: Expected O, but got Unknown
			//IL_090b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0910: Unknown result type (might be due to invalid IL or missing references)
			//IL_0918: Unknown result type (might be due to invalid IL or missing references)
			//IL_0923: Expected O, but got Unknown
			//IL_0924: Unknown result type (might be due to invalid IL or missing references)
			//IL_092f: Expected O, but got Unknown
			//IL_0935: Expected O, but got Unknown
			//IL_0930: Unknown result type (might be due to invalid IL or missing references)
			//IL_0937: Expected O, but got Unknown
			//IL_093c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0941: Unknown result type (might be due to invalid IL or missing references)
			//IL_0949: Unknown result type (might be due to invalid IL or missing references)
			//IL_0954: Expected O, but got Unknown
			//IL_0955: Unknown result type (might be due to invalid IL or missing references)
			//IL_0960: Expected O, but got Unknown
			//IL_0966: Expected O, but got Unknown
			//IL_0961: Unknown result type (might be due to invalid IL or missing references)
			//IL_0968: Expected O, but got Unknown
			//IL_096d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0972: Unknown result type (might be due to invalid IL or missing references)
			//IL_097a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0985: Expected O, but got Unknown
			//IL_0986: Unknown result type (might be due to invalid IL or missing references)
			//IL_0991: Expected O, but got Unknown
			//IL_0997: Expected O, but got Unknown
			//IL_0992: Unknown result type (might be due to invalid IL or missing references)
			//IL_0999: Expected O, but got Unknown
			//IL_099e: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b6: Expected O, but got Unknown
			//IL_09b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c2: Expected O, but got Unknown
			//IL_09c8: Expected O, but got Unknown
			//IL_09c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ca: Expected O, but got Unknown
			//IL_09cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_09dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e7: Expected O, but got Unknown
			//IL_09e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f3: Expected O, but got Unknown
			//IL_09f9: Expected O, but got Unknown
			//IL_09f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_09fb: Expected O, but got Unknown
			//IL_0a00: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a05: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a0d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a18: Expected O, but got Unknown
			//IL_0a19: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a24: Expected O, but got Unknown
			//IL_0a2a: Expected O, but got Unknown
			//IL_0a25: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a2c: Expected O, but got Unknown
			//IL_0a31: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a36: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a3e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a49: Expected O, but got Unknown
			//IL_0a4a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a55: Expected O, but got Unknown
			//IL_0a5b: Expected O, but got Unknown
			//IL_0a56: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a5d: Expected O, but got Unknown
			//IL_0a62: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a67: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a6f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a7a: Expected O, but got Unknown
			//IL_0a7b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a86: Expected O, but got Unknown
			//IL_0a8c: Expected O, but got Unknown
			//IL_0a87: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a8e: Expected O, but got Unknown
			//IL_0a93: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a98: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aab: Expected O, but got Unknown
			//IL_0aac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab7: Expected O, but got Unknown
			//IL_0abd: Expected O, but got Unknown
			//IL_0ab8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0abf: Expected O, but got Unknown
			SawSpawnrate = ((BaseUnityPlugin)this).Config.Bind<float>("Saw Turret", "Spawnrate", 1.6f, "How often do these turrets spawn? (default 1.6)");
			SawFirerate = ((BaseUnityPlugin)this).Config.Bind<float>("Saw Turret", "Time Between Shots", 1.45f, "Length of time between each saw after windup. (default 1.45)");
			SawDmgMult = ((BaseUnityPlugin)this).Config.Bind<float>("Saw Turret", "Dmg Multiplier", 1.8f, "Damage multiplier for saw blades. Dmg is also dependent on the velocity of a saw blade. You can make them heal with negative values too. (default 1.8)");
			SawTargetRange = ((BaseUnityPlugin)this).Config.Bind<float>("Saw Turret", "Range", 25f, "How far away a saw turret can see you. They can't see through walls though. (default 25)");
			SawWindupTime = ((BaseUnityPlugin)this).Config.Bind<float>("Saw Turret", "Windup Time", 1.45f, "How long a saw turret takes before it starts firing saws at you. (default 1.45)");
			SawFirerate = ((BaseUnityPlugin)this).Config.Bind<float>("Saw Turret", "Time Between Shots", 1.45f, "Length of time between each saw after windup. (default 1.45)");
			SawAmmo = ((BaseUnityPlugin)this).Config.Bind<int>("Saw Turret", "Ammo", 6, "Shots it takes before the turret has to reload. (default 6)");
			SawReloadTime = ((BaseUnityPlugin)this).Config.Bind<float>("Saw Turret", "Reload Time", 8f, "How long it takes for a saw turret to reload its sawblades (default 8)");
			SawFirerate = ((BaseUnityPlugin)this).Config.Bind<float>("Saw Turret", "Time Between Shots", 1.45f, "Length of time between each saw after windup. (default 1.45)");
			SawLaunchSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Saw Turret", "Projectile Speed", 3000f, "How fast are the saws launched from the saw turret? Note that the faster a saw travels, the more damage it will deal. Assume you are applying a force in Newtons (N) to the object. (default 3000)");
			SawVolume = ((BaseUnityPlugin)this).Config.Bind<float>("Saw Turret", "Volume", 0.6f, "How loud are all sounds from this turret? (default 0.6)");
			FlameSpawnrate = ((BaseUnityPlugin)this).Config.Bind<float>("Flame Turret", "Spawnrate", 1.6f, "How often do these turrets spawn? (default 1.6)");
			FlameDmgMult = ((BaseUnityPlugin)this).Config.Bind<float>("Flame Turret", "Dmg Multiplier", 3.2f, "Damage Multiplier for flame turrets. You can make them heal with negative values too. (default 3.2)");
			FlameTargetRange = ((BaseUnityPlugin)this).Config.Bind<float>("Flame Turret", "Range", 7f, "How far away a flame turret can see you. They can't see through walls though. (default 7)");
			FlameRisingTime = ((BaseUnityPlugin)this).Config.Bind<float>("Flame Turret", "Rising Time", 1.4f, "Time in seconds it takes for a flame turret to rise up and fire at you. (default 1.4)");
			FlameRestingTime = ((BaseUnityPlugin)this).Config.Bind<float>("Flame Turret", "Resting Time", 3f, "How long does the flame turret rest before firing again? In seconds. (default 3)");
			FlameSpinningTime = ((BaseUnityPlugin)this).Config.Bind<float>("Flame Turret", "Spinning Time", 3f, "How long does the flame turret spin for? In seconds. (default 2)");
			FlameRotationSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Flame Turret", "Rotation Speed", 120f, "How fast does a flame turret rotate when attacking (degrees per second)? (default 120)");
			SmokeCooldown = ((BaseUnityPlugin)this).Config.Bind<float>("Flame Turret", "Warning Interval", 14.5f, "How often a flame turret release smoke to warn the player of its presence. The smoke release phase lasts for 4.5 seconds. (default 14.5)");
			FlameVolume = ((BaseUnityPlugin)this).Config.Bind<float>("Flame Turret", "Volume", 0.6f, "How loud are all sounds from this turret? (default 0.6)");
			LRADSpawnrate = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "Spawnrate", 0.5f, "How often do these turrets spawn? (default 1.2)");
			LRADTargetRange = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "Range", 50f, "How far away the LRAD (sound turret) can see you. They can't see through walls though. (default 50)");
			LRADDmgMult = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "Dmg Multiplier", 1f, "Damage Multiplier for sound turrets. You can make them heal with negative values too. (default 1)");
			LRADProjectileSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "Projectile Speed Multiplier", 1.5f, "Multiplier for the Speed of the launched sound wave. (default 1.5)");
			LRADReloadTime = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "Time Between Shots", 60f, "Length of time before the sound cannon can fire again. (default 30)");
			LRADChargeTime = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "Charge Up Time", 5.53f, "Time it takes for the LRAD to charge and fire a sound wave in seconds. (default 5.53)");
			LRADDisorientPeriod = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "Disorientation Period", 20f, "How long deafness, visual fx, drunkness, and dizziness takes to fade away in seconds (default 20).");
			LRADDizzyMult = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "Dizzyness multiplier", 1f, "How much the LRAD cannon messes around with your movement, causing you to sway unpredictably. (default 1)");
			LRADDrunknessMult = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "Drunkness Multiplier", 2f, "How strong the drunkness effect from the LRAD cannon is. (default 2)");
			LRADFXMult = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "FX Intensity", 0.8f, "Opacity multiplier to the noise and glitch visual FX when hit by the cannon. Higher values are equivalent to total blindness (default 0.8)");
			LRADVolume = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "Turret Volume", 1f, "How loud are all sounds from this turret? (default 1)");
			LRADFXVolume = ((BaseUnityPlugin)this).Config.Bind<float>("Sound Turret", "FX Volume", 1f, "How loud are all sounds from the Disorientation/Impact effect? (default 1)");
			ConfigEntry<float> flameSpawnrate = FlameSpawnrate;
			FloatInputFieldOptions val = new FloatInputFieldOptions
			{
				RequiresRestart = true
			};
			((BaseRangeOptions<float>)val).Min = 0f;
			((BaseRangeOptions<float>)val).Max = 100000000f;
			FloatInputFieldConfigItem val2 = new FloatInputFieldConfigItem(flameSpawnrate, val);
			ConfigEntry<float> flameDmgMult = FlameDmgMult;
			FloatSliderOptions val3 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val3).Min = -5f;
			((BaseRangeOptions<float>)val3).Max = 5f;
			FloatSliderConfigItem val4 = new FloatSliderConfigItem(flameDmgMult, val3);
			ConfigEntry<float> flameTargetRange = FlameTargetRange;
			FloatSliderOptions val5 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val5).Min = 0f;
			((BaseRangeOptions<float>)val5).Max = 100f;
			FloatSliderConfigItem val6 = new FloatSliderConfigItem(flameTargetRange, val5);
			ConfigEntry<float> flameRisingTime = FlameRisingTime;
			FloatSliderOptions val7 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val7).Min = 0f;
			((BaseRangeOptions<float>)val7).Max = 10f;
			FloatSliderConfigItem val8 = new FloatSliderConfigItem(flameRisingTime, val7);
			ConfigEntry<float> flameRestingTime = FlameRestingTime;
			FloatSliderOptions val9 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val9).Min = 0f;
			((BaseRangeOptions<float>)val9).Max = 20f;
			FloatSliderConfigItem val10 = new FloatSliderConfigItem(flameRestingTime, val9);
			ConfigEntry<float> flameSpinningTime = FlameSpinningTime;
			FloatSliderOptions val11 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val11).Min = 0f;
			((BaseRangeOptions<float>)val11).Max = 20f;
			FloatSliderConfigItem val12 = new FloatSliderConfigItem(flameSpinningTime, val11);
			ConfigEntry<float> flameRotationSpeed = FlameRotationSpeed;
			FloatSliderOptions val13 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val13).Min = 0f;
			((BaseRangeOptions<float>)val13).Max = 1080f;
			FloatSliderConfigItem val14 = new FloatSliderConfigItem(flameRotationSpeed, val13);
			ConfigEntry<float> flameVolume = FlameVolume;
			FloatSliderOptions val15 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val15).Min = 0f;
			((BaseRangeOptions<float>)val15).Max = 2f;
			FloatSliderConfigItem val16 = new FloatSliderConfigItem(flameVolume, val15);
			ConfigEntry<float> smokeCooldown = SmokeCooldown;
			FloatInputFieldOptions val17 = new FloatInputFieldOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val17).Min = 6f;
			((BaseRangeOptions<float>)val17).Max = 1E+11f;
			FloatInputFieldConfigItem val18 = new FloatInputFieldConfigItem(smokeCooldown, val17);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val2);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val4);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val18);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val6);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val8);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val10);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val12);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val14);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val16);
			ConfigEntry<float> sawSpawnrate = SawSpawnrate;
			FloatInputFieldOptions val19 = new FloatInputFieldOptions
			{
				RequiresRestart = true
			};
			((BaseRangeOptions<float>)val19).Min = 0f;
			((BaseRangeOptions<float>)val19).Max = 100000000f;
			FloatInputFieldConfigItem val20 = new FloatInputFieldConfigItem(sawSpawnrate, val19);
			ConfigEntry<float> sawDmgMult = SawDmgMult;
			FloatSliderOptions val21 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val21).Min = -5f;
			((BaseRangeOptions<float>)val21).Max = 5f;
			FloatSliderConfigItem val22 = new FloatSliderConfigItem(sawDmgMult, val21);
			ConfigEntry<float> sawTargetRange = SawTargetRange;
			FloatSliderOptions val23 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val23).Min = 0f;
			((BaseRangeOptions<float>)val23).Max = 100f;
			FloatSliderConfigItem val24 = new FloatSliderConfigItem(sawTargetRange, val23);
			ConfigEntry<float> sawWindupTime = SawWindupTime;
			FloatSliderOptions val25 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val25).Min = 0f;
			((BaseRangeOptions<float>)val25).Max = 10f;
			FloatSliderConfigItem val26 = new FloatSliderConfigItem(sawWindupTime, val25);
			ConfigEntry<float> sawFirerate = SawFirerate;
			FloatInputFieldOptions val27 = new FloatInputFieldOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val27).Min = 0f;
			((BaseRangeOptions<float>)val27).Max = 100000000f;
			FloatInputFieldConfigItem val28 = new FloatInputFieldConfigItem(sawFirerate, val27);
			ConfigEntry<float> sawVolume = SawVolume;
			FloatSliderOptions val29 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val29).Min = 0f;
			((BaseRangeOptions<float>)val29).Max = 2f;
			FloatSliderConfigItem val30 = new FloatSliderConfigItem(sawVolume, val29);
			ConfigEntry<int> sawAmmo = SawAmmo;
			IntInputFieldOptions val31 = new IntInputFieldOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<int>)val31).Min = 1;
			((BaseRangeOptions<int>)val31).Max = 100000000;
			IntInputFieldConfigItem val32 = new IntInputFieldConfigItem(sawAmmo, val31);
			ConfigEntry<float> sawReloadTime = SawReloadTime;
			FloatInputFieldOptions val33 = new FloatInputFieldOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val33).Min = 0f;
			((BaseRangeOptions<float>)val33).Max = 100000000f;
			FloatInputFieldConfigItem val34 = new FloatInputFieldConfigItem(sawReloadTime, val33);
			ConfigEntry<float> sawLaunchSpeed = SawLaunchSpeed;
			FloatInputFieldOptions val35 = new FloatInputFieldOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val35).Min = 0f;
			((BaseRangeOptions<float>)val35).Max = 100000000f;
			FloatInputFieldConfigItem val36 = new FloatInputFieldConfigItem(sawLaunchSpeed, val35);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val20);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val22);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val24);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val26);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val28);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val32);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val34);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val36);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val30);
			ConfigEntry<float> lRADSpawnrate = LRADSpawnrate;
			FloatInputFieldOptions val37 = new FloatInputFieldOptions
			{
				RequiresRestart = true
			};
			((BaseRangeOptions<float>)val37).Min = 0f;
			((BaseRangeOptions<float>)val37).Max = 100000000f;
			FloatInputFieldConfigItem val38 = new FloatInputFieldConfigItem(lRADSpawnrate, val37);
			ConfigEntry<float> lRADTargetRange = LRADTargetRange;
			FloatInputFieldOptions val39 = new FloatInputFieldOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val39).Min = 0f;
			((BaseRangeOptions<float>)val39).Max = 100000000f;
			FloatInputFieldConfigItem val40 = new FloatInputFieldConfigItem(lRADTargetRange, val39);
			ConfigEntry<float> lRADDmgMult = LRADDmgMult;
			FloatSliderOptions val41 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val41).Min = -5f;
			((BaseRangeOptions<float>)val41).Max = 5f;
			FloatSliderConfigItem val42 = new FloatSliderConfigItem(lRADDmgMult, val41);
			ConfigEntry<float> lRADProjectileSpeed = LRADProjectileSpeed;
			FloatInputFieldOptions val43 = new FloatInputFieldOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val43).Min = 0f;
			((BaseRangeOptions<float>)val43).Max = 9999999f;
			FloatInputFieldConfigItem val44 = new FloatInputFieldConfigItem(lRADProjectileSpeed, val43);
			ConfigEntry<float> lRADChargeTime = LRADChargeTime;
			FloatInputFieldOptions val45 = new FloatInputFieldOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val45).Min = 0f;
			((BaseRangeOptions<float>)val45).Max = 7.2f;
			FloatInputFieldConfigItem val46 = new FloatInputFieldConfigItem(lRADChargeTime, val45);
			ConfigEntry<float> lRADReloadTime = LRADReloadTime;
			FloatInputFieldOptions val47 = new FloatInputFieldOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val47).Min = 0f;
			((BaseRangeOptions<float>)val47).Max = 999999f;
			FloatInputFieldConfigItem val48 = new FloatInputFieldConfigItem(lRADReloadTime, val47);
			ConfigEntry<float> lRADDisorientPeriod = LRADDisorientPeriod;
			FloatInputFieldOptions val49 = new FloatInputFieldOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val49).Min = 0.5f;
			((BaseRangeOptions<float>)val49).Max = 1000000f;
			FloatInputFieldConfigItem val50 = new FloatInputFieldConfigItem(lRADDisorientPeriod, val49);
			ConfigEntry<float> lRADDizzyMult = LRADDizzyMult;
			FloatInputFieldOptions val51 = new FloatInputFieldOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val51).Min = 0f;
			((BaseRangeOptions<float>)val51).Max = 1000f;
			FloatInputFieldConfigItem val52 = new FloatInputFieldConfigItem(lRADDizzyMult, val51);
			ConfigEntry<float> lRADDrunknessMult = LRADDrunknessMult;
			FloatSliderOptions val53 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val53).Min = 0f;
			((BaseRangeOptions<float>)val53).Max = 5f;
			FloatSliderConfigItem val54 = new FloatSliderConfigItem(lRADDrunknessMult, val53);
			ConfigEntry<float> lRADFXMult = LRADFXMult;
			FloatSliderOptions val55 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val55).Min = 0f;
			((BaseRangeOptions<float>)val55).Max = 10f;
			FloatSliderConfigItem val56 = new FloatSliderConfigItem(lRADFXMult, val55);
			ConfigEntry<float> lRADVolume = LRADVolume;
			FloatSliderOptions val57 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val57).Min = 0f;
			((BaseRangeOptions<float>)val57).Max = 2f;
			FloatSliderConfigItem val58 = new FloatSliderConfigItem(lRADVolume, val57);
			ConfigEntry<float> lRADFXVolume = LRADFXVolume;
			FloatSliderOptions val59 = new FloatSliderOptions
			{
				RequiresRestart = false
			};
			((BaseRangeOptions<float>)val59).Min = 0f;
			((BaseRangeOptions<float>)val59).Max = 2f;
			FloatSliderConfigItem val60 = new FloatSliderConfigItem(lRADFXVolume, val59);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val38);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val40);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val42);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val46);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val48);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val44);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val50);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val52);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val54);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val56);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val58);
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val60);
		}

		public static void PopulateAssets()
		{
			string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			TrapBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "bcs_devioustraps"));
			Debug.Log((object)("DeviousTraps Bundle::: " + (object)TrapBundle));
		}
	}
}
namespace DeviousTraps.src
{
	public class FlameHitbox : NetworkBehaviour
	{
		internal Vector3 LaunchForce = Vector3.zero;

		public Collider Collider;

		private float HitCooldown = 0f;

		private float HitCooldownReset = 0.2f;

		private float LastHitEnemyCooldown = 0f;

		public static float BaseDmg = 10f;

		public float dmgRamp = 0f;

		public static float dmgRampTime = 0.45f;

		public void Update()
		{
			HitCooldown -= Time.deltaTime;
			LastHitEnemyCooldown -= Time.deltaTime;
			if (dmgRamp < 1f)
			{
				dmgRamp += Time.deltaTime / dmgRampTime;
				if (dmgRamp > 1f)
				{
					dmgRamp = 1f;
				}
			}
		}

		public void ResetDmgRamp()
		{
			dmgRamp = 0f;
		}

		[ClientRpc]
		public void DmgPlayerClientRpc(ulong netid, int amount)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: 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.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2246517757u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, netid);
				BytePacker.WriteValueBitPacked(val2, amount);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2246517757u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			base.__rpc_exec_stage = (__RpcExecStage)0;
			PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts;
			PlayerControllerB[] array = allPlayerScripts;
			foreach (PlayerControllerB val3 in array)
			{
				if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid)
				{
					val3.DamagePlayer(amount, true, true, (CauseOfDeath)0, 0, false, default(Vector3));
				}
			}
		}

		[ClientRpc]
		public void KillPlayerClientRpc(ulong netid)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: 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.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1308895154u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, netid);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1308895154u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			base.__rpc_exec_stage = (__RpcExecStage)0;
			PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts;
			PlayerControllerB[] array = allPlayerScripts;
			foreach (PlayerControllerB val3 in array)
			{
				if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid)
				{
					val3.KillPlayer(val3.playerRigidbody.velocity, true, (CauseOfDeath)13, 0, default(Vector3));
				}
			}
		}

		public void OnTriggerStay(Collider other)
		{
			if (!((NetworkBehaviour)RoundManager.Instance).IsHost)
			{
				return;
			}
			GameObject gameObject = ((Component)other).gameObject;
			PlayerControllerB component = gameObject.GetComponent<PlayerControllerB>();
			EnemyAI component2 = gameObject.GetComponent<EnemyAI>();
			if (Object.op_Implicit((Object)(object)component) && HitCooldown <= 0f)
			{
				int num = (int)(dmgRamp * BaseDmg * Plugin.FlameDmgMult.Value);
				if (num >= component.health)
				{
					KillPlayerClientRpc(((NetworkBehaviour)component).NetworkObject.NetworkObjectId);
				}
				else
				{
					DmgPlayerClientRpc(((NetworkBehaviour)component).NetworkObject.NetworkObjectId, num);
				}
				HitCooldown = HitCooldownReset;
			}
			if (Object.op_Implicit((Object)(object)component2) && LastHitEnemyCooldown <= 0f)
			{
				component2.HitEnemyClientRpc(3, -1, true, -1);
				LastHitEnemyCooldown = HitCooldownReset;
			}
		}

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

		protected override void __initializeRpcs()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			((NetworkBehaviour)this).__registerRpc(2246517757u, new RpcReceiveHandler(__rpc_handler_2246517757), "DmgPlayerClientRpc");
			((NetworkBehaviour)this).__registerRpc(1308895154u, new RpcReceiveHandler(__rpc_handler_1308895154), "KillPlayerClientRpc");
			((NetworkBehaviour)this).__initializeRpcs();
		}

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

		private static void __rpc_handler_1308895154(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong netid = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref netid);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((FlameHitbox)(object)target).KillPlayerClientRpc(netid);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "FlameHitbox";
		}
	}
	public class FlameTurret : NetworkBehaviour
	{
		public AudioSource AudioFlameTurretOn;

		public AudioSource AudioFireFlames;

		public AudioSource AudioReload;

		public AudioSource AudioSmokeRelease;

		public AudioSource AudioPowerDown;

		private bool Activated = false;

		public ParticleSystem Fire1;

		public ParticleSystem Fire2;

		public ParticleSystem Fire3;

		public Light Light1;

		public Light Light2;

		public Light Light3;

		public FlameHitbox H1;

		public FlameHitbox H2;

		public FlameHitbox H3;

		public GameObject pillar;

		public GameObject SmokeSystem;

		internal Animator animator;

		private bool On = false;

		private bool lastOn = false;

		[Tooltip("How high the pillar moves up from its starting local Y (world units).")]
		public float ElevationAmount = 2.2f;

		private float t_SmokeReleaseTotal = 0f;

		private float t_SpinningTimeTotal = 0f;

		private float t_StandbyTimeTotal = 0f;

		private float t_ElevationState = 0f;

		private bool InStandby = false;

		private float pillarBaseY;

		public float TimeUntilEnabled = -1f;

		public bool Inactive = false;

		public void Start()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			Activated = false;
			animator = ((Component)this).GetComponent<Animator>();
			pillarBaseY = pillar.transform.localPosition.y;
			AudioFlameTurretOn.volume = Plugin.FlameVolume.Value;
			AudioFireFlames.volume = Plugin.FlameVolume.Value;
			AudioReload.volume = Plugin.FlameVolume.Value;
			AudioSmokeRelease.volume = Plugin.FlameVolume.Value / 9f;
			AudioPowerDown.volume = Plugin.FlameVolume.Value;
		}

		public void Update()
		{
			if (((NetworkBehaviour)this).IsServer)
			{
				OnOffConditional();
				if (On != lastOn)
				{
					SetOnStateClientRpc(On);
					ToggleTurretOnClientRpc(On);
					lastOn = On;
				}
			}
			if (((NetworkBehaviour)RoundManager.Instance).IsHost)
			{
				t_SmokeReleaseTotal -= Time.deltaTime;
				if (t_SmokeReleaseTotal < 0f)
				{
					t_SmokeReleaseTotal = Plugin.SmokeCooldown.Value;
					PlaySmokeReleaseClientRpc();
				}
			}
			TimeUntilEnabled -= Time.deltaTime;
			if (Inactive && TimeUntilEnabled < 0f)
			{
				TerminalToggleClientRpc(turnOn: true);
			}
			AITick();
		}

		[ClientRpc]
		public void TerminalToggleClientRpc(bool turnOn)
		{
			//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)
			//IL_00dc: 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.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4023908665u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref turnOn, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4023908665u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				base.__rpc_exec_stage = (__RpcExecStage)0;
				if (turnOn)
				{
					TimeUntilEnabled = -1f;
					Inactive = false;
				}
				else
				{
					TimeUntilEnabled = 7f;
					Inactive = true;
					AudioPowerDown.Play();
				}
			}
		}

		public void OnOffConditional()
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			float num = Plugin.FlameTargetRange.Value;
			PlayerControllerB val = null;
			PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts;
			PlayerControllerB[] array = allPlayerScripts;
			foreach (PlayerControllerB val2 in array)
			{
				if (!((Object)(object)val2 == (Object)null) && !val2.isPlayerDead)
				{
					Vector3 val3 = ((Component)this).transform.position + Vector3.up * 1.2f;
					Vector3 position = ((Component)val2.gameplayCamera).transform.position;
					float num2 = Vector3.Distance(val3, position);
					if (!(num2 > Plugin.FlameTargetRange.Value) && !Physics.Linecast(val3, position, StartOfRound.Instance.collidersAndRoomMask, (QueryTriggerInteraction)1) && num2 < num)
					{
						num = num2;
						val = val2;
					}
				}
			}
			On = (Object)(object)val != (Object)null && !Inactive;
		}

		private void SetPillarHeight(float normalized)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: 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)
			normalized = Mathf.Clamp01(normalized);
			t_ElevationState = normalized;
			float num = ((Component)this).transform.lossyScale.y;
			if (num <= 0f)
			{
				num = 1f;
			}
			float num2 = ElevationAmount / num;
			Vector3 localPosition = pillar.transform.localPosition;
			localPosition.y = pillarBaseY + num2 * normalized;
			pillar.transform.localPosition = localPosition;
		}

		public void TerminalDisableTurretMethod()
		{
			if (((NetworkBehaviour)RoundManager.Instance).IsHost)
			{
				TerminalToggleClientRpc(turnOn: false);
			}
			else
			{
				TerminalToggleServerRpc();
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void TerminalToggleServerRpc()
		{
			//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)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1935411860u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1935411860u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					TerminalToggleClientRpc(turnOn: false);
				}
			}
		}

		public void AITick()
		{
			if (Inactive)
			{
				if (Activated && ((NetworkBehaviour)this).IsServer)
				{
					SetGroupActiveClientRpc(value: false);
				}
				if (AudioFlameTurretOn.isPlaying)
				{
					StopFireClientRpc();
				}
				return;
			}
			if (!InStandby)
			{
				if (t_ElevationState < 1f)
				{
					if (!AudioFlameTurretOn.isPlaying)
					{
						PlayFireClientRpc();
					}
					float num = Time.deltaTime / Plugin.FlameRisingTime.Value;
					SetPillarHeight(t_ElevationState + num);
				}
				else if (t_SpinningTimeTotal < Plugin.FlameSpinningTime.Value)
				{
					if (((NetworkBehaviour)this).IsServer && !Activated)
					{
						SetGroupActiveClientRpc(value: true);
					}
					t_SpinningTimeTotal += Time.deltaTime;
					pillar.transform.Rotate(0f, Plugin.FlameRotationSpeed.Value * Time.deltaTime, 0f, (Space)1);
				}
				else
				{
					InStandby = true;
				}
				return;
			}
			if (((NetworkBehaviour)this).IsServer && Activated)
			{
				if (AudioFlameTurretOn.isPlaying)
				{
					StopFireClientRpc();
				}
				SetGroupActiveClientRpc(value: false);
			}
			if (t_ElevationState > 0f)
			{
				if (!AudioReload.isPlaying)
				{
					PlayReloadClientRpc();
				}
				float num2 = Time.deltaTime / Plugin.FlameRisingTime.Value;
				SetPillarHeight(t_ElevationState - num2);
			}
			else if (t_StandbyTimeTotal < Plugin.FlameRestingTime.Value)
			{
				t_StandbyTimeTotal += Time.deltaTime;
			}
			else if (On)
			{
				InStandby = false;
				t_StandbyTimeTotal = 0f;
				t_SpinningTimeTotal = 0f;
			}
		}

		[ClientRpc]
		public void PlaySmokeReleaseClientRpc()
		{
			//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)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(941713206u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 941713206u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					((MonoBehaviour)this).StartCoroutine(PlaySmokeCoroutine());
				}
			}
		}

		public IEnumerator PlaySmokeCoroutine()
		{
			SmokeSystem.SetActive(true);
			yield return (object)new WaitForSeconds(4.5f);
			SmokeSystem.SetActive(false);
		}

		[ClientRpc]
		private void SetOnStateClientRpc(bool value)
		{
			//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)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1393123788u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref value, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1393123788u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					On = value;
				}
			}
		}

		[ClientRpc]
		public void SetGroupActiveClientRpc(bool value)
		{
			//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)
			//IL_00dc: 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.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2323146907u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref value, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2323146907u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				base.__rpc_exec_stage = (__RpcExecStage)0;
				Activated = value;
				if (value)
				{
					AudioFireFlames.Play();
					Fire1.Play();
					Fire2.Play();
					Fire3.Play();
					((Behaviour)Light1).enabled = true;
					((Behaviour)Light2).enabled = true;
					((Behaviour)Light3).enabled = true;
					((Behaviour)H1).enabled = true;
					((Behaviour)H2).enabled = true;
					((Behaviour)H3).enabled = true;
				}
				else
				{
					AudioFireFlames.Stop();
					Fire1.Stop();
					Fire2.Stop();
					Fire3.Stop();
					((Behaviour)Light1).enabled = false;
					((Behaviour)Light2).enabled = false;
					((Behaviour)Light3).enabled = false;
					((Behaviour)H1).enabled = false;
					((Behaviour)H2).enabled = false;
					((Behaviour)H3).enabled = false;
					H1.ResetDmgRamp();
					H2.ResetDmgRamp();
					H3.ResetDmgRamp();
				}
			}
		}

		[ClientRpc]
		public void PlayFireClientRpc()
		{
			//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)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(141116094u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 141116094u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					AudioFlameTurretOn.Play();
				}
			}
		}

		[ClientRpc]
		public void StopFireClientRpc()
		{
			//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)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2040491108u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2040491108u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					AudioFlameTurretOn.Stop();
				}
			}
		}

		[ClientRpc]
		public void PlayReloadClientRpc()
		{
			//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)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2148362063u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2148362063u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					AudioReload.Play();
				}
			}
		}

		[ClientRpc]
		public void StopReloadClientRpc()
		{
			//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)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1334700428u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1334700428u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					base.__rpc_exec_stage = (__RpcExecStage)0;
					AudioReload.Stop();
				}
			}
		}

		[ClientRpc]
		public void ToggleTurretOnClientRpc(bool on)
		{
			//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)
			//IL_00dc: 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.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1074175290u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref on, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1074175290u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				base.__rpc_exec_stage = (__RpcExecStage)0;
				if (on && AudioReload.isPlaying)
				{
					AudioReload.Stop();
				}
			}
		}

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

		protected override void __initializeRpcs()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Expected O, but got Unknown
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Expected O, but got Unknown
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Expected O, but got Unknown
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Expected O, but got Unknown
			((NetworkBehaviour)this).__registerRpc(4023908665u, new RpcReceiveHandler(__rpc_handler_4023908665), "TerminalToggleClientRpc");
			((NetworkBehaviour)this).__registerRpc(1935411860u, new RpcReceiveHandler(__rpc_handler_1935411860), "TerminalToggleServerRpc");
			((NetworkBehaviour)this).__registerRpc(941713206u, new RpcReceiveHandler(__rpc_handler_941713206), "PlaySmokeReleaseClientRpc");
			((NetworkBehaviour)this).__registerRpc(1393123788u, new RpcReceiveHandler(__rpc_handler_1393123788), "SetOnStateClientRpc");
			((NetworkBehaviour)this).__registerRpc(2323146907u, new RpcReceiveHandler(__rpc_handler_2323146907), "SetGroupActiveClientRpc");
			((NetworkBehaviour)this).__registerRpc(141116094u, new RpcReceiveHandler(__rpc_handler_141116094), "PlayFireClientRpc");
			((NetworkBehaviour)this).__registerRpc(2040491108u, new RpcReceiveHandler(__rpc_handler_2040491108), "StopFireClientRpc");
			((NetworkBehaviour)this).__registerRpc(2148362063u, new RpcReceiveHandler(__rpc_handler_2148362063), "PlayReloadClientRpc");
			((NetworkBehaviour)this).__registerRpc(1334700428u, new RpcReceiveHandler(__rpc_handler_1334700428), "StopReloadClientRpc");
			((NetworkBehaviour)this).__registerRpc(1074175290u, new RpcReceiveHandler(__rpc_handler_1074175290), "ToggleTurretOnClientRpc");
			((NetworkBehaviour)this).__initializeRpcs();
		}

		private static void __rpc_handler_4023908665(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 turnOn = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref turnOn, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((FlameTurret)(object)target).TerminalToggleClientRpc(turnOn);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1935411860(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;
				((FlameTurret)(object)target).TerminalToggleServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_941713206(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;
				((FlameTurret)(object)target).PlaySmokeReleaseClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1393123788(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 onStateClientRpc = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref onStateClientRpc, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((FlameTurret)(object)target).SetOnStateClientRpc(onStateClientRpc);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2323146907(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 groupActiveClientRpc = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref groupActiveClientRpc, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((FlameTurret)(object)target).SetGroupActiveClientRpc(groupActiveClientRpc);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_141116094(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;
				((FlameTurret)(object)target).PlayFireClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2040491108(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;
				((FlameTurret)(object)target).StopFireClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2148362063(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;
				((FlameTurret)(object)target).PlayReloadClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1334700428(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;
				((FlameTurret)(object)target).StopReloadClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1074175290(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 on = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref on, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((FlameTurret)(object)target).ToggleTurretOnClientRpc(on);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "FlameTurret";
		}
	}
	internal class FlameTurretSpawnCurves
	{
		public static readonly AnimationCurve WeakCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[6]
		{
			new Keyframe(0f, 0f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.4f, 1f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.7f, 3f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.9f, 5f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.97f, 6f * Plugin.FlameSpawnrate.Value),
			new Keyframe(1f, 8f * Plugin.FlameSpawnrate.Value)
		});

		public static readonly AnimationCurve NormalCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[6]
		{
			new Keyframe(0f, 0f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.4f, 2f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.7f, 5f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.9f, 8f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.97f, 10f * Plugin.FlameSpawnrate.Value),
			new Keyframe(1f, 15f * Plugin.FlameSpawnrate.Value)
		});

		public static readonly AnimationCurve AggressiveCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[6]
		{
			new Keyframe(0f, 0f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.4f, 5f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.7f, 7f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.9f, 8f * Plugin.FlameSpawnrate.Value),
			new Keyframe(0.97f, 15f * Plugin.FlameSpawnrate.Value),
			new Keyframe(1f, 35f * Plugin.FlameSpawnrate.Value)
		});
	}
	public class SawProjectileV2 : NetworkBehaviour
	{
		internal Vector3 LaunchForce = Vector3.zero;

		public Rigidbody RigidBody;

		public Collider Collider;

		private float LastHitPlayerCooldown = 0f;

		private PlayerControllerB LastHitPlayer;

		private float LastHitEnemyCooldown = 0f;

		private EnemyAI LastHitEnemy;

		private float HitCooldownReset = 0.2f;

		private float Lifetime = 60f;

		public Material BloodMat;

		public MeshRenderer Renderer;

		public AudioSource AudioBlood1;

		public AudioSource AudioBlood2;

		public AudioSource AudioBlood3;

		public AudioSource AudioBounce;

		public GameObject BloodParticles;

		public GameObject SparkParticles;

		public float BloodLifetime = 0f;

		public static float BounceSoundThreshold = 5f;

		private Vector3 PreviousVelocity = Vector3.zero;

		public void Start()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			if (((NetworkBehaviour)RoundManager.Instance).IsHost)
			{
				RigidBody.AddForce(LaunchForce);
			}
			AudioBlood1.volume = Plugin.SawVolume.Value;
			AudioBlood2.volume = Plugin.SawVolume.Value;
			AudioBlood3.volume = Plugin.SawVolume.Value;
			AudioBounce.volume = Plugin.SawVolume.Value;
		}

		public void SetScale(float mult)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			Transform transform = ((Component)this).transform;
			transform.localScale *= mult;
		}

		public void Update()
		{
			//IL_0078: 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_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			LastHitPlayerCooldown -= Time.deltaTime;
			LastHitEnemyCooldown -= Time.deltaTime;
			Lifetime -= Time.deltaTime;
			BloodLifetime -= Time.deltaTime;
			if (BloodLifetime < 0f && BloodParticles.activeInHierarchy)
			{
				ParticleSetClientRpc(active: false);
			}
			Vector3 velocity = RigidBody.velocity;
			Vector3 previousVelocity = PreviousVelocity;
			PreviousVelocity = velocity;
			Vector3 val = velocity - previousVelocity;
			if (((Vector3)(ref val)).magnitude > BounceSoundThreshold)
			{
				PlayBounceClientRpc();
			}
			if (Lifetime < 0f && ((NetworkBehaviour)RoundManager.Instance).IsHost)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}

		[ClientRpc]
		public void DmgPlayerClientRpc(ulong netid, int amount)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: 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.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3509185095u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, netid);
				BytePacker.WriteValueBitPacked(val2, amount);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3509185095u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			base.__rpc_exec_stage = (__RpcExecStage)0;
			PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts;
			PlayerControllerB[] array = allPlayerScripts;
			foreach (PlayerControllerB val3 in array)
			{
				if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid)
				{
					val3.DamagePlayer(amount, true, true, (CauseOfDeath)0, 0, false, default(Vector3));
					BloodLifetime = 0.8f;
					((Renderer)Renderer).material = BloodMat;
				}
			}
		}

		[ClientRpc]
		public void KillPlayerClientRpc(ulong netid, Vector3 launchVelocity)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: 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_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3626191914u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, netid);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref launchVelocity);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3626191914u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			base.__rpc_exec_stage = (__RpcExecStage)0;
			PlayerControllerB[] allPlayerScripts = RoundManager.Instance.playersManager.allPlayerScripts;
			PlayerControllerB[] array = allPlayerScripts;
			foreach (PlayerControllerB val3 in array)
			{
				if (((NetworkBehaviour)val3).NetworkObject.NetworkObjectId == netid)
				{
					val3.KillPlayer(launchVelocity, true, (CauseOfDeath)17, 0, default(Vector3));
					BloodLifetime = 0.8f;
					((Renderer)Renderer).material = BloodMat;
				}
			}
		}

		[ClientRpc]
		public void ParticleSetClientRpc(bool active)
		{
			//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
			/