Decompiled source of NACops IL2CPP v1.7.3

NACopsV1-IL2Cpp.dll

Decompiled 3 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Threading;
using HarmonyLib;
using Il2CppFishNet.Connection;
using Il2CppFishNet.Managing;
using Il2CppFishNet.Managing.Object;
using Il2CppFishNet.Object;
using Il2CppInterop.Runtime.InteropTypes;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppScheduleOne.AvatarFramework;
using Il2CppScheduleOne.AvatarFramework.Equipping;
using Il2CppScheduleOne.Combat;
using Il2CppScheduleOne.DevUtilities;
using Il2CppScheduleOne.Economy;
using Il2CppScheduleOne.EntityFramework;
using Il2CppScheduleOne.GameTime;
using Il2CppScheduleOne.ItemFramework;
using Il2CppScheduleOne.Law;
using Il2CppScheduleOne.Management;
using Il2CppScheduleOne.Map;
using Il2CppScheduleOne.Money;
using Il2CppScheduleOne.NPCs;
using Il2CppScheduleOne.NPCs.Behaviour;
using Il2CppScheduleOne.Noise;
using Il2CppScheduleOne.ObjectScripts;
using Il2CppScheduleOne.Persistence;
using Il2CppScheduleOne.PlayerScripts;
using Il2CppScheduleOne.Police;
using Il2CppScheduleOne.Product;
using Il2CppScheduleOne.Property;
using Il2CppScheduleOne.Quests;
using Il2CppScheduleOne.Tools;
using Il2CppScheduleOne.UI;
using Il2CppScheduleOne.UI.Handover;
using Il2CppScheduleOne.Vehicles;
using Il2CppScheduleOne.VoiceOver;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using Il2CppTMPro;
using Il2CppVLB;
using MelonLoader;
using MelonLoader.Utils;
using NACopsV1_IL2Cpp;
using Newtonsoft.Json;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
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: MelonInfo(typeof(NACops), "NACopsV1-IL2Cpp", "1.7.3", "XOWithSauce", null)]
[assembly: MelonColor]
[assembly: MelonOptionalDependencies(new string[] { "FishNet.Runtime" })]
[assembly: MelonGame("TVGS", "Schedule I")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("NACopsV1-IL2Cpp")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NACopsV1-IL2Cpp")]
[assembly: AssemblyTitle("NACopsV1-IL2Cpp")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NACopsV1_IL2Cpp;

public static class BuildInfo
{
	public const string Name = "NACopsV1-IL2Cpp";

	public const string Description = "Crazyyyy cops";

	public const string Author = "XOWithSauce";

	public const string Company = null;

	public const string Version = "1.7.3";

	public const string DownloadLink = null;
}
public class ModConfig
{
	public bool OverrideMovement = true;

	public bool OverrideCombatBeh = true;

	public bool OverrideBodySearch = true;

	public bool OverrideWeapon = true;

	public bool OverrideMaxHealth = true;

	public bool LethalCops = true;

	public bool NearbyCrazyCops = true;

	public bool CrazyCops = true;

	public bool PrivateInvestigator = true;

	public bool WeedInvestigator = true;

	public bool CorruptCops = true;

	public bool SnitchingSamples = true;

	public bool BuyBusts = true;

	public bool DocksRaids = true;

	public bool IncludeSpawned = false;
}
public static class ConfigLoader
{
	private static string path = Path.Combine(MelonEnvironment.ModsDirectory, "NACops", "config.json");

	public static ModConfig Load()
	{
		ModConfig modConfig;
		if (File.Exists(path))
		{
			try
			{
				string text = File.ReadAllText(path);
				modConfig = JsonConvert.DeserializeObject<ModConfig>(text);
			}
			catch (Exception ex)
			{
				modConfig = new ModConfig();
				MelonLogger.Warning("Failed to read NACops config: " + ex);
			}
		}
		else
		{
			MelonLogger.Msg("File config.json does not exist at Mods/NACops/config.json");
			modConfig = new ModConfig();
			Save(modConfig);
		}
		return modConfig;
	}

	public static void Save(ModConfig config)
	{
		try
		{
			string contents = JsonConvert.SerializeObject((object)config);
			Directory.CreateDirectory(Path.GetDirectoryName(path));
			File.WriteAllText(path, contents);
		}
		catch (Exception ex)
		{
			MelonLogger.Warning("Failed to save NACops config: " + ex);
		}
	}
}
public class NACops : MelonMod
{
	[HarmonyPatch(typeof(ExitToMenu), "Exit")]
	public static class Tools_ExitToMenu_Patch
	{
		public static bool Prefix(ExitToMenu __instance)
		{
			registered = false;
			foreach (object coro in coros)
			{
				MelonCoroutines.Stop(coro);
			}
			lock (_officerLock)
			{
				allActiveOfficers.Clear();
			}
			coros.Clear();
			currentSummoned.Clear();
			currentDrugApprehender.Clear();
			toBeDestroyed.Clear();
			raidedDuringSession = false;
			sessionPropertyHeat = 0;
			return true;
		}
	}

	[HarmonyPatch(typeof(Player), "ConsumeProduct")]
	public static class Player_ConsumeProduct_Patch
	{
		public static bool Prefix(Player __instance, ProductItemInstance product)
		{
			coros.Add(MelonCoroutines.Start(DrugConsumedCoro(__instance, product)));
			return true;
		}
	}

	[HarmonyPatch(typeof(Customer), "SampleOffered")]
	public static class Customer_SampleOffered_Patch
	{
		public static bool Prefix(Customer __instance)
		{
			coros.Add(MelonCoroutines.Start(PreSampleOffered(__instance)));
			return true;
		}
	}

	[HarmonyPatch(typeof(Customer), "ProcessHandover")]
	public static class Customer_ProcessHandover_Patch
	{
		public static bool Prefix(Customer __instance, EHandoverOutcome outcome, Contract contract, List<ItemInstance> items, bool handoverByPlayer, bool giveBonuses = true)
		{
			coros.Add(MelonCoroutines.Start(PreProcessHandover(__instance, handoverByPlayer)));
			return true;
		}
	}

	public class MinMaxThreshold
	{
		public int MinOf { get; set; }

		public float Min { get; set; }

		public float Max { get; set; }

		public MinMaxThreshold(int minOf, float min, float max)
		{
			MinOf = minOf;
			Min = min;
			Max = max;
		}
	}

	public static class ThresholdUtils
	{
		public static (float min, float max) Evaluate(List<MinMaxThreshold> thresholds, int value)
		{
			MinMaxThreshold minMaxThreshold = thresholds[0];
			foreach (MinMaxThreshold threshold in thresholds)
			{
				if (value >= threshold.MinOf)
				{
					minMaxThreshold = threshold;
					continue;
				}
				break;
			}
			return (minMaxThreshold.Min, minMaxThreshold.Max);
		}
	}

	public static class ThresholdMappings
	{
		public static readonly List<MinMaxThreshold> LethalCopFreq = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 30f, 60f),
			new MinMaxThreshold(5, 20f, 60f),
			new MinMaxThreshold(10, 20f, 50f),
			new MinMaxThreshold(20, 15f, 40f),
			new MinMaxThreshold(30, 10f, 30f),
			new MinMaxThreshold(40, 10f, 20f),
			new MinMaxThreshold(50, 8f, 18f)
		};

		public static readonly List<MinMaxThreshold> LethalCopRange = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 4f, 6f),
			new MinMaxThreshold(8000, 4f, 8f),
			new MinMaxThreshold(30000, 5f, 9f),
			new MinMaxThreshold(100000, 6f, 10f),
			new MinMaxThreshold(300000, 7f, 12f),
			new MinMaxThreshold(600000, 9f, 14f),
			new MinMaxThreshold(1000000, 10f, 15f)
		};

		public static readonly List<MinMaxThreshold> CrazyCopsFreq = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 300f, 450f),
			new MinMaxThreshold(5, 300f, 400f),
			new MinMaxThreshold(10, 200f, 350f),
			new MinMaxThreshold(20, 150f, 350f),
			new MinMaxThreshold(30, 150f, 300f),
			new MinMaxThreshold(40, 100f, 300f),
			new MinMaxThreshold(50, 100f, 250f)
		};

		public static readonly List<MinMaxThreshold> CrazyCopsRange = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 10f, 30f),
			new MinMaxThreshold(8000, 15f, 30f),
			new MinMaxThreshold(30000, 20f, 35f),
			new MinMaxThreshold(100000, 25f, 35f),
			new MinMaxThreshold(300000, 30f, 40f),
			new MinMaxThreshold(500000, 30f, 40f),
			new MinMaxThreshold(1000000, 30f, 45f),
			new MinMaxThreshold(3000000, 30f, 50f)
		};

		public static readonly List<MinMaxThreshold> NearbyCrazThres = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 400f, 650f),
			new MinMaxThreshold(5, 300f, 600f),
			new MinMaxThreshold(10, 120f, 500f),
			new MinMaxThreshold(20, 120f, 500f),
			new MinMaxThreshold(30, 120f, 400f),
			new MinMaxThreshold(40, 120f, 350f),
			new MinMaxThreshold(50, 120f, 300f)
		};

		public static readonly List<MinMaxThreshold> NearbyCrazRange = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 10f, 15f),
			new MinMaxThreshold(8000, 10f, 20f),
			new MinMaxThreshold(30000, 10f, 25f),
			new MinMaxThreshold(100000, 20f, 35f),
			new MinMaxThreshold(300000, 20f, 40f),
			new MinMaxThreshold(500000, 25f, 40f)
		};

		public static readonly List<MinMaxThreshold> PIThres = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 450f, 800f),
			new MinMaxThreshold(1000, 380f, 800f),
			new MinMaxThreshold(10000, 350f, 700f),
			new MinMaxThreshold(30000, 330f, 690f),
			new MinMaxThreshold(60000, 330f, 650f),
			new MinMaxThreshold(100000, 300f, 600f),
			new MinMaxThreshold(300000, 300f, 570f),
			new MinMaxThreshold(800000, 300f, 480f),
			new MinMaxThreshold(1500000, 270f, 400f),
			new MinMaxThreshold(8000000, 230f, 360f)
		};

		public static readonly List<MinMaxThreshold> PICurfewAttn = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 0f, 0.5f),
			new MinMaxThreshold(5, 0f, 0.5f),
			new MinMaxThreshold(10, 0f, 0.55f),
			new MinMaxThreshold(20, 0f, 0.55f),
			new MinMaxThreshold(30, 0f, 0.55f),
			new MinMaxThreshold(40, 0f, 0.6f),
			new MinMaxThreshold(50, 0f, 0.62f),
			new MinMaxThreshold(60, 0f, 0.64f),
			new MinMaxThreshold(70, 0f, 0.66f),
			new MinMaxThreshold(80, 0f, 0.68f),
			new MinMaxThreshold(90, 0f, 0.7f)
		};

		public static readonly List<MinMaxThreshold> SnitchProbability = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 0f, 0.8f),
			new MinMaxThreshold(5, 0f, 0.85f),
			new MinMaxThreshold(10, 0f, 0.88f),
			new MinMaxThreshold(20, 0f, 0.9f),
			new MinMaxThreshold(30, 0f, 0.93f),
			new MinMaxThreshold(40, 0f, 0.95f),
			new MinMaxThreshold(50, 0.05f, 1f),
			new MinMaxThreshold(60, 0.1f, 1f),
			new MinMaxThreshold(70, 0.15f, 1f),
			new MinMaxThreshold(80, 0.2f, 1f),
			new MinMaxThreshold(90, 0.25f, 1f)
		};

		public static readonly List<MinMaxThreshold> BuyBustProbability = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 0.1f, 1f),
			new MinMaxThreshold(5, 0.05f, 0.9f),
			new MinMaxThreshold(10, 0f, 0.8f),
			new MinMaxThreshold(15, 0f, 0.75f),
			new MinMaxThreshold(20, 0f, 0.65f),
			new MinMaxThreshold(30, 0f, 0.6f),
			new MinMaxThreshold(40, 0f, 0.55f)
		};
	}

	[CompilerGenerated]
	private sealed class <ApprehenderOfficerClear>d__29 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public PoliceOfficer offc;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <ApprehenderOfficerClear>d__29(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				if ((Object)(object)offc == (Object)null)
				{
					return false;
				}
				<>2__current = (object)new WaitForSeconds(20f);
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				if (currentDrugApprehender.Contains(offc))
				{
					currentDrugApprehender.Remove(offc);
				}
				return false;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <AttemptWarp>d__42 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public PoliceOfficer offc;

		public Transform target;

		private Vector3 <warpInit>5__1;

		private int <maxWarpAttempts>5__2;

		private int <i>5__3;

		private float <xInitOffset>5__4;

		private float <zInitOffset>5__5;

		private Vector3 <targetWarpPosition>5__6;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <AttemptWarp>d__42(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: 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_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Expected O, but got Unknown
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<warpInit>5__1 = Vector3.zero;
				<maxWarpAttempts>5__2 = 30;
				<i>5__3 = 0;
				break;
			case 1:
				<>1__state = -1;
				<i>5__3++;
				break;
			}
			if (<i>5__3 < <maxWarpAttempts>5__2)
			{
				<xInitOffset>5__4 = Random.Range(8f, 30f);
				<zInitOffset>5__5 = Random.Range(8f, 30f);
				<xInitOffset>5__4 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
				<zInitOffset>5__5 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
				<targetWarpPosition>5__6 = target.position + new Vector3(<xInitOffset>5__4, 0f, <zInitOffset>5__5);
				((NPC)offc).Movement.GetClosestReachablePoint(<targetWarpPosition>5__6, ref <warpInit>5__1);
				if (!(<warpInit>5__1 != Vector3.zero))
				{
					<>2__current = (object)new WaitForSeconds(0.1f);
					<>1__state = 1;
					return true;
				}
				((NPC)offc).Movement.Warp(<warpInit>5__1);
			}
			return false;
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <BustCopAvatar>d__35 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public PoliceOfficer offc;

		public NACops <>4__this;

		private List<LayerSetting> <originalBodySettings>5__1;

		private List<LayerSetting> <bodySettings>5__2;

		private List<AccessorySetting> <originalAccessorySettings>5__3;

		private List<AccessorySetting> <accessorySettings>5__4;

		private LayerSetting <jeans>5__5;

		private LayerSetting <shirt>5__6;

		private AccessorySetting <cap>5__7;

		private AccessorySetting <sneakers>5__8;

		private Enumerator<LayerSetting> <>s__9;

		private LayerSetting <layer>5__10;

		private Enumerator<AccessorySetting> <>s__11;

		private AccessorySetting <acc>5__12;

		private int <i>5__13;

		private LayerSetting <layer>5__14;

		private int <i>5__15;

		private AccessorySetting <acc>5__16;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <BustCopAvatar>d__35(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<originalBodySettings>5__1 = null;
			<bodySettings>5__2 = null;
			<originalAccessorySettings>5__3 = null;
			<accessorySettings>5__4 = null;
			<jeans>5__5 = null;
			<shirt>5__6 = null;
			<cap>5__7 = null;
			<sneakers>5__8 = null;
			<>s__9 = null;
			<layer>5__10 = null;
			<>s__11 = null;
			<acc>5__12 = null;
			<layer>5__14 = null;
			<acc>5__16 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Expected O, but got Unknown
			//IL_0112: 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_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Expected O, but got Unknown
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_032e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0375: Unknown result type (might be due to invalid IL or missing references)
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<originalBodySettings>5__1 = ((NPC)offc).Avatar.CurrentSettings.BodyLayerSettings;
				<bodySettings>5__2 = new List<LayerSetting>();
				<>s__9 = <originalBodySettings>5__1.GetEnumerator();
				while (<>s__9.MoveNext())
				{
					<layer>5__10 = <>s__9.Current;
					<bodySettings>5__2.Add(new LayerSetting
					{
						layerPath = <layer>5__10.layerPath,
						layerTint = <layer>5__10.layerTint
					});
					<layer>5__10 = null;
				}
				<>s__9 = null;
				<originalAccessorySettings>5__3 = ((NPC)offc).Avatar.CurrentSettings.AccessorySettings;
				<accessorySettings>5__4 = new List<AccessorySetting>();
				<>s__11 = <originalAccessorySettings>5__3.GetEnumerator();
				while (<>s__11.MoveNext())
				{
					<acc>5__12 = <>s__11.Current;
					<accessorySettings>5__4.Add(new AccessorySetting
					{
						path = <acc>5__12.path,
						color = <acc>5__12.color
					});
					<acc>5__12 = null;
				}
				<>s__11 = null;
				<i>5__13 = 0;
				while (<i>5__13 < <bodySettings>5__2.Count)
				{
					<layer>5__14 = <bodySettings>5__2[<i>5__13];
					<layer>5__14.layerPath = "";
					<layer>5__14.layerTint = Color.white;
					<bodySettings>5__2[<i>5__13] = <layer>5__14;
					<layer>5__14 = null;
					<i>5__13++;
				}
				<i>5__15 = 0;
				while (<i>5__15 < <accessorySettings>5__4.Count)
				{
					<acc>5__16 = <accessorySettings>5__4[<i>5__15];
					<acc>5__16.path = "";
					<acc>5__16.color = Color.white;
					<accessorySettings>5__4[<i>5__15] = <acc>5__16;
					<acc>5__16 = null;
					<i>5__15++;
				}
				<jeans>5__5 = <bodySettings>5__2[2];
				<jeans>5__5.layerPath = "Avatar/Layers/Bottom/Jeans";
				<jeans>5__5.layerTint = Color.black;
				<bodySettings>5__2[2] = <jeans>5__5;
				<shirt>5__6 = <bodySettings>5__2[3];
				<shirt>5__6.layerPath = "Avatar/Layers/Top/RolledButtonUp";
				<shirt>5__6.layerTint = Color.black;
				<bodySettings>5__2[3] = <shirt>5__6;
				<cap>5__7 = <accessorySettings>5__4[0];
				<cap>5__7.path = "Avatar/Accessories/Head/Cap/Cap";
				<cap>5__7.color = Color.red;
				<accessorySettings>5__4[0] = <cap>5__7;
				<sneakers>5__8 = <accessorySettings>5__4[1];
				<sneakers>5__8.path = "Avatar/Accessories/Feet/Sneakers/Sneakers";
				<sneakers>5__8.color = Color.white;
				<accessorySettings>5__4[1] = <sneakers>5__8;
				((NPC)offc).Avatar.CurrentSettings.BodyLayerSettings = <bodySettings>5__2;
				((NPC)offc).Avatar.CurrentSettings.AccessorySettings = <accessorySettings>5__4;
				((NPC)offc).Avatar.ApplyBodyLayerSettings(((NPC)offc).Avatar.CurrentSettings, -1);
				((NPC)offc).Avatar.ApplyAccessorySettings(((NPC)offc).Avatar.CurrentSettings);
				<>2__current = null;
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				return false;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <CrazyCops>d__41 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public NACops <>4__this;

		private float <min>5__1;

		private float <max>5__2;

		private Player[] <players>5__3;

		private Player <randomPlayer>5__4;

		private Vector3 <playerPosition>5__5;

		private PoliceOfficer <nearestOfficer>5__6;

		private float <closestDistance>5__7;

		private PoliceOfficer[] <officersSnapshot>5__8;

		private float <minRang>5__9;

		private float <maxRang>5__10;

		private object <>s__11;

		private bool <>s__12;

		private PoliceOfficer[] <>s__13;

		private int <>s__14;

		private PoliceOfficer <officer>5__15;

		private float <distance>5__16;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <CrazyCops>d__41(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<players>5__3 = null;
			<randomPlayer>5__4 = null;
			<nearestOfficer>5__6 = null;
			<officersSnapshot>5__8 = null;
			<>s__11 = null;
			<>s__13 = null;
			<officer>5__15 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: 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_0086: Expected O, but got Unknown
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Expected O, but got Unknown
			//IL_03b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Expected O, but got Unknown
			(float, float) tuple;
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				goto IL_003c;
			case 1:
				<>1__state = -1;
				if (!registered)
				{
					return false;
				}
				<players>5__3 = Il2CppArrayBase<Player>.op_Implicit(Object.FindObjectsOfType<Player>(true));
				<randomPlayer>5__4 = <players>5__3[Random.Range(0, <players>5__3.Length)];
				if ((Object)(object)<randomPlayer>5__4.CurrentProperty != (Object)null)
				{
					goto IL_003c;
				}
				<playerPosition>5__5 = ((Component)<randomPlayer>5__4).transform.position;
				<nearestOfficer>5__6 = null;
				<closestDistance>5__7 = 100f;
				<>s__11 = _officerLock;
				<>s__12 = false;
				try
				{
					Monitor.Enter(<>s__11, ref <>s__12);
					<officersSnapshot>5__8 = allActiveOfficers.Where((PoliceOfficer o) => (Object)(object)o != (Object)null && (Object)(object)((Component)o).gameObject != (Object)null).ToArray();
				}
				finally
				{
					if (<>s__12)
					{
						Monitor.Exit(<>s__11);
					}
				}
				<>s__11 = null;
				<>s__13 = <officersSnapshot>5__8;
				<>s__14 = 0;
				goto IL_0284;
			case 2:
				<>1__state = -1;
				<distance>5__16 = Vector3.Distance(((Component)<officer>5__15).transform.position, <playerPosition>5__5);
				if (<distance>5__16 < <closestDistance>5__7 && !currentSummoned.Contains(<officer>5__15) && !currentDrugApprehender.Contains(<officer>5__15) && !<>4__this.IsStationNearby(<playerPosition>5__5) && !((NPC)<officer>5__15).isInBuilding)
				{
					<closestDistance>5__7 = <distance>5__16;
					<nearestOfficer>5__6 = <officer>5__15;
				}
				<officer>5__15 = null;
				<>s__14++;
				goto IL_0284;
			case 3:
				{
					<>1__state = -1;
					if (((NPC)<nearestOfficer>5__6).awareness.VisionCone.IsPlayerVisible(<randomPlayer>5__4))
					{
						<nearestOfficer>5__6.BeginFootPursuit_Networked(((NetworkBehaviour)<randomPlayer>5__4).NetworkObject, true);
						coros.Add(MelonCoroutines.Start(GiveFalseCharges(3, <randomPlayer>5__4)));
					}
					goto IL_0460;
				}
				IL_003c:
				tuple = ThresholdUtils.Evaluate(ThresholdMappings.CrazyCopsFreq, NetworkSingleton<TimeManager>.Instance.ElapsedDays);
				<min>5__1 = tuple.Item1;
				<max>5__2 = tuple.Item2;
				<>2__current = (object)new WaitForSeconds(Random.Range(<min>5__1, <max>5__2));
				<>1__state = 1;
				return true;
				IL_0460:
				<players>5__3 = null;
				<randomPlayer>5__4 = null;
				<nearestOfficer>5__6 = null;
				<officersSnapshot>5__8 = null;
				goto IL_003c;
				IL_0284:
				if (<>s__14 < <>s__13.Length)
				{
					<officer>5__15 = <>s__13[<>s__14];
					<>2__current = (object)new WaitForSeconds(0.01f);
					<>1__state = 2;
					return true;
				}
				<>s__13 = null;
				(<minRang>5__9, <maxRang>5__10) = ThresholdUtils.Evaluate(ThresholdMappings.CrazyCopsRange, (int)NetworkSingleton<MoneyManager>.Instance.LifetimeEarnings);
				if ((Object)(object)<nearestOfficer>5__6 != (Object)null && <closestDistance>5__7 < Random.Range(<minRang>5__9, <maxRang>5__10))
				{
					if (Object.op_Implicit((Object)(object)((NPC)<nearestOfficer>5__6).behaviour.activeBehaviour) && ((NPC)<nearestOfficer>5__6).behaviour.activeBehaviour is VehiclePatrolBehaviour)
					{
						<nearestOfficer>5__6.BeginVehiclePursuit_Networked(((NetworkBehaviour)<randomPlayer>5__4).NetworkObject, ((NetworkBehaviour)<nearestOfficer>5__6.AssignedVehicle).NetworkObject, true);
						coros.Add(MelonCoroutines.Start(GiveFalseCharges(3, <randomPlayer>5__4)));
						goto IL_003c;
					}
					if (Random.Range(0f, 1f) > 0.3f)
					{
						((NPC)<nearestOfficer>5__6).Movement.FacePoint(((Component)<randomPlayer>5__4).transform.position, 0.2f);
						<>2__current = (object)new WaitForSeconds(0.3f);
						<>1__state = 3;
						return true;
					}
					coros.Add(MelonCoroutines.Start(LateInvestigation(<randomPlayer>5__4)));
				}
				goto IL_0460;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <DestroyPots>d__24 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public PoliceOfficer offc;

		public Property property;

		public float durationPerSegment;

		public NACops <>4__this;

		private Pot[] <pots>5__1;

		private int <maxLen>5__2;

		private Pot <pot>5__3;

		private Vector3 <spawnPos>5__4;

		private int <maxDestroyed>5__5;

		private NPC <npc>5__6;

		private int <i>5__7;

		private float <elapsed>5__8;

		private Vector3 <fixedDest>5__9;

		private PotConfiguration <cnf>5__10;

		private BuildableItem <bi>5__11;

		private float <minDistance>5__12;

		private float <baseDist>5__13;

		private float <t>5__14;

		private Vector3 <direction>5__15;

		private IEnumerator<Transform> <>s__16;

		private Transform <ap>5__17;

		private float <dist>5__18;

		private float <t>5__19;

		private Vector3 <direction>5__20;

		private Pot[] <>s__21;

		private int <>s__22;

		private Pot <poti>5__23;

		private float <dist>5__24;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <DestroyPots>d__24(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<pots>5__1 = null;
			<pot>5__3 = null;
			<npc>5__6 = null;
			<cnf>5__10 = null;
			<bi>5__11 = null;
			<>s__16 = null;
			<ap>5__17 = null;
			<>s__21 = null;
			<poti>5__23 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Expected O, but got Unknown
			//IL_086f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0879: Expected O, but got Unknown
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_044b: Unknown result type (might be due to invalid IL or missing references)
			//IL_045b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0466: Unknown result type (might be due to invalid IL or missing references)
			//IL_047d: Unknown result type (might be due to invalid IL or missing references)
			//IL_048d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0492: Unknown result type (might be due to invalid IL or missing references)
			//IL_0497: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f6: Expected O, but got Unknown
			//IL_05cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d5: Expected O, but got Unknown
			//IL_0676: Unknown result type (might be due to invalid IL or missing references)
			//IL_0680: Expected O, but got Unknown
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Expected O, but got Unknown
			//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03af: Expected O, but got Unknown
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0779: Unknown result type (might be due to invalid IL or missing references)
			//IL_0789: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_0299: Unknown result type (might be due to invalid IL or missing references)
			//IL_0308: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: Unknown result type (might be due to invalid IL or missing references)
			//IL_0330: Unknown result type (might be due to invalid IL or missing references)
			//IL_0340: Unknown result type (might be due to invalid IL or missing references)
			//IL_0345: Unknown result type (might be due to invalid IL or missing references)
			//IL_034a: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0370: Unknown result type (might be due to invalid IL or missing references)
			//IL_0827: Unknown result type (might be due to invalid IL or missing references)
			//IL_082c: Unknown result type (might be due to invalid IL or missing references)
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<pots>5__1 = Il2CppArrayBase<Pot>.op_Implicit(((Component)((Component)property).transform).GetComponentsInChildren<Pot>());
				<maxLen>5__2 = <pots>5__1.Length;
				<pot>5__3 = null;
				do
				{
					<pot>5__3 = <pots>5__1[Random.Range(0, <maxLen>5__2)];
				}
				while (toBeDestroyed.Contains(<pot>5__3));
				toBeDestroyed.Add(<pot>5__3);
				<spawnPos>5__4 = ((IEnumerable<Transform>)<pot>5__3.accessPoints).FirstOrDefault().position;
				((Component)offc).transform.position = <spawnPos>5__4;
				<>2__current = (object)new WaitForSeconds(3f);
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				<maxDestroyed>5__5 = 6;
				<i>5__7 = 0;
				goto IL_0852;
			case 2:
				<>1__state = -1;
				if (!registered || ((NPC)offc).Health.IsKnockedOut || ((NPC)offc).Health.IsDead || !((NPC)offc).IsConscious || ((NPC)offc).Avatar.Ragdolled)
				{
					goto IL_0393;
				}
				<fixedDest>5__9 = ((IEnumerable<Transform>)<pot>5__3.accessPoints).FirstOrDefault().position;
				<baseDist>5__13 = Vector3.Distance(((Component)offc).transform.position, <fixedDest>5__9);
				<>s__16 = ((Il2CppArrayBase<Transform>)(object)<pot>5__3.AccessPoints).GetEnumerator();
				try
				{
					while (<>s__16.MoveNext())
					{
						<ap>5__17 = <>s__16.Current;
						<dist>5__18 = Vector3.Distance(((Component)offc).transform.position, <ap>5__17.position);
						if (<dist>5__18 < <baseDist>5__13)
						{
							<baseDist>5__13 = <dist>5__18;
							<fixedDest>5__9 = <ap>5__17.position;
						}
						<ap>5__17 = null;
					}
				}
				finally
				{
					if (<>s__16 != null)
					{
						<>s__16.Dispose();
					}
				}
				<>s__16 = null;
				<elapsed>5__8 += Time.deltaTime;
				<t>5__14 = Mathf.Clamp01(<elapsed>5__8 / durationPerSegment);
				((Component)offc).transform.position = Vector3.Lerp(<spawnPos>5__4, <fixedDest>5__9, <t>5__14);
				<direction>5__15 = ((Component)<pot>5__3).transform.position - ((Component)offc).transform.position;
				<direction>5__15.y = 0f;
				((Component)offc).transform.rotation = Quaternion.LookRotation(<direction>5__15);
				goto IL_037c;
			case 3:
				<>1__state = -1;
				if (!registered || ((NPC)offc).Health.IsKnockedOut || ((NPC)offc).Health.IsDead || !((NPC)offc).IsConscious || ((NPC)offc).Avatar.Ragdolled)
				{
					goto IL_04e6;
				}
				<elapsed>5__8 += Time.deltaTime;
				<t>5__19 = Mathf.Clamp01(<elapsed>5__8 / durationPerSegment);
				((Component)offc).transform.position = Vector3.Lerp(<fixedDest>5__9, ((Component)<pot>5__3).transform.position, <t>5__19);
				<direction>5__20 = ((Component)<pot>5__3).transform.position - ((Component)offc).transform.position;
				<direction>5__20.y = 0f;
				((Component)offc).transform.rotation = Quaternion.LookRotation(<direction>5__20);
				goto IL_04c9;
			case 4:
			{
				<>1__state = -1;
				if (!registered || ((NPC)offc).Health.IsKnockedOut || ((NPC)offc).Health.IsDead || !((NPC)offc).IsConscious || ((NPC)offc).Avatar.Ragdolled)
				{
					goto IL_0869;
				}
				((NPC)offc).Avatar.Anim.SetCrouched(true);
				EntityConfiguration configuration = <pot>5__3.Configuration;
				<cnf>5__10 = (PotConfiguration)(object)((configuration is PotConfiguration) ? configuration : null);
				if (<cnf>5__10 != null && <cnf>5__10.AssignedBotanist != null)
				{
					<cnf>5__10.AssignedBotanist.SetNPC((NPC)null, false);
				}
				<>2__current = (object)new WaitForSeconds(2f);
				<>1__state = 5;
				return true;
			}
			case 5:
				<>1__state = -1;
				if (!registered || ((NPC)offc).Health.IsKnockedOut || ((NPC)offc).Health.IsDead || !((NPC)offc).IsConscious || ((NPC)offc).Avatar.Ragdolled)
				{
					goto IL_0869;
				}
				if (((Component)<pot>5__3).TryGetComponent<BuildableItem>(ref <bi>5__11))
				{
					<bi>5__11.DestroyItem(true);
				}
				toBeDestroyed.Remove(<pot>5__3);
				<>2__current = (object)new WaitForSeconds(2f);
				<>1__state = 6;
				return true;
			case 6:
				<>1__state = -1;
				if (registered && !((NPC)offc).Health.IsKnockedOut && !((NPC)offc).Health.IsDead && ((NPC)offc).IsConscious && !((NPC)offc).Avatar.Ragdolled)
				{
					((NPC)offc).Avatar.Anim.SetCrouched(false);
					<pots>5__1 = Il2CppArrayBase<Pot>.op_Implicit(((Component)((Component)property).transform).GetComponentsInChildren<Pot>());
					<minDistance>5__12 = 5f;
					if (<pots>5__1.Length >= 2)
					{
						<pot>5__3 = null;
						<>s__21 = <pots>5__1;
						for (<>s__22 = 0; <>s__22 < <>s__21.Length; <>s__22++)
						{
							<poti>5__23 = <>s__21[<>s__22];
							<dist>5__24 = Vector3.Distance(((Component)offc).transform.position, ((Component)<poti>5__23).transform.position);
							if (<dist>5__24 < <minDistance>5__12)
							{
								<minDistance>5__12 = <dist>5__24;
								<pot>5__3 = <poti>5__23;
							}
							<poti>5__23 = null;
						}
						<>s__21 = null;
						if (!((Object)(object)<pot>5__3 == (Object)null))
						{
							toBeDestroyed.Add(<pot>5__3);
							<spawnPos>5__4 = ((Component)offc).transform.position;
							<cnf>5__10 = null;
							<bi>5__11 = null;
							<i>5__7++;
							goto IL_0852;
						}
					}
				}
				goto IL_0869;
			case 7:
				<>1__state = -1;
				if (!registered)
				{
					return false;
				}
				<npc>5__6 = (NPC)(object)offc;
				if (<npc>5__6 != null)
				{
					NPCManager.NPCRegistry.Remove(<npc>5__6);
				}
				Object.Destroy((Object)(object)((Component)offc).gameObject);
				<>2__current = null;
				<>1__state = 8;
				return true;
			case 8:
				{
					<>1__state = -1;
					return false;
				}
				IL_0869:
				<>2__current = (object)new WaitForSeconds(2f);
				<>1__state = 7;
				return true;
				IL_0393:
				<elapsed>5__8 = 0f;
				goto IL_04c9;
				IL_037c:
				if (<elapsed>5__8 < durationPerSegment)
				{
					<>2__current = (object)new WaitForEndOfFrame();
					<>1__state = 2;
					return true;
				}
				goto IL_0393;
				IL_04e6:
				<>2__current = (object)new WaitForSeconds(2f);
				<>1__state = 4;
				return true;
				IL_04c9:
				if (<elapsed>5__8 < durationPerSegment / 2f)
				{
					<>2__current = (object)new WaitForEndOfFrame();
					<>1__state = 3;
					return true;
				}
				goto IL_04e6;
				IL_0852:
				if (<i>5__7 < <maxLen>5__2 && <i>5__7 != <maxDestroyed>5__5)
				{
					<elapsed>5__8 = 0f;
					<fixedDest>5__9 = Vector3.zero;
					goto IL_037c;
				}
				goto IL_0869;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <DisposeSummoned>d__37 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public NPC npc;

		public PoliceOfficer offc;

		public bool instant;

		public Player target;

		private int <lifeTime>5__1;

		private int <maxTime>5__2;

		private Exception <ex>5__3;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <DisposeSummoned>d__37(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<ex>5__3 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected O, but got Unknown
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<>2__current = (object)new WaitForSeconds(1f);
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				<lifeTime>5__1 = 0;
				<maxTime>5__2 = 20;
				if (instant || !((Object)(object)target != (Object)null) || !((Object)(object)npc != (Object)null))
				{
					break;
				}
				goto IL_00bb;
			case 2:
				{
					<>1__state = -1;
					goto IL_00bb;
				}
				IL_00bb:
				if (<lifeTime>5__1 <= <maxTime>5__2 || target.IsArrested || npc.Health.IsDead || npc.Health.IsKnockedOut)
				{
					<lifeTime>5__1++;
					<>2__current = (object)new WaitForSeconds(1f);
					<>1__state = 2;
					return true;
				}
				break;
			}
			try
			{
				if (currentSummoned.Contains(offc))
				{
					currentSummoned.Remove(offc);
				}
				if ((Object)(object)npc != (Object)null && NPCManager.NPCRegistry.Contains(npc))
				{
					NPCManager.NPCRegistry.Remove(npc);
				}
				if ((Object)(object)npc != (Object)null && (Object)(object)((Component)npc).gameObject != (Object)null)
				{
					Object.Destroy((Object)(object)((Component)npc).gameObject);
				}
			}
			catch (Exception ex)
			{
				<ex>5__3 = ex;
				MelonLogger.Error((object)<ex>5__3);
			}
			return false;
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <DrugConsumedCoro>d__28 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public Player player;

		public ProductItemInstance product;

		private WeedInstance <weed>5__1;

		private PoliceOfficer[] <officersSnapshot>5__2;

		private PoliceOfficer <noticeOfficer>5__3;

		private float <smallestDistance>5__4;

		private bool <direct>5__5;

		private bool <apprehending>5__6;

		private object <>s__7;

		private bool <>s__8;

		private int <i>5__9;

		private PoliceOfficer <offc>5__10;

		private float <distance>5__11;

		private int <i>5__12;

		private Vector3 <pos>5__13;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <DrugConsumedCoro>d__28(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<weed>5__1 = null;
			<officersSnapshot>5__2 = null;
			<noticeOfficer>5__3 = null;
			<>s__7 = null;
			<offc>5__10 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_03ed: 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_05bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c2: Expected O, but got Unknown
			//IL_0579: Unknown result type (might be due to invalid IL or missing references)
			//IL_0583: Expected O, but got Unknown
			//IL_05ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_060e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0492: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b2: Expected O, but got Unknown
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Expected O, but got Unknown
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0623: Unknown result type (might be due to invalid IL or missing references)
			//IL_062d: Expected O, but got Unknown
			//IL_0340: Unknown result type (might be due to invalid IL or missing references)
			//IL_034a: Expected O, but got Unknown
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
			{
				<>1__state = -1;
				if (!currentConfig.WeedInvestigator)
				{
					return false;
				}
				ProductItemInstance obj = product;
				<weed>5__1 = ((obj != null) ? ((Il2CppObjectBase)obj).Cast<WeedInstance>() : null);
				if (<weed>5__1 != null)
				{
					<>2__current = (object)new WaitForSeconds(2f);
					<>1__state = 1;
					return true;
				}
				goto IL_0676;
			}
			case 1:
				<>1__state = -1;
				if (!registered || currentDrugApprehender.Count > 1)
				{
					return false;
				}
				<>s__7 = _officerLock;
				<>s__8 = false;
				try
				{
					Monitor.Enter(<>s__7, ref <>s__8);
					<officersSnapshot>5__2 = allActiveOfficers.Where((PoliceOfficer o) => (Object)(object)o != (Object)null && (Object)(object)((Component)o).gameObject != (Object)null).ToArray();
				}
				finally
				{
					if (<>s__8)
					{
						Monitor.Exit(<>s__7);
					}
				}
				<>s__7 = null;
				<noticeOfficer>5__3 = null;
				<smallestDistance>5__4 = 20f;
				<direct>5__5 = false;
				<i>5__9 = 0;
				goto IL_02f4;
			case 2:
				<>1__state = -1;
				<offc>5__10 = <officersSnapshot>5__2[<i>5__9];
				if (!currentDrugApprehender.Contains(<offc>5__10) && !currentSummoned.Contains(<offc>5__10))
				{
					if (((NPC)<offc>5__10).awareness.VisionCone.IsPlayerVisible(player))
					{
						<offc>5__10.BeginBodySearch_Networked(((NetworkBehaviour)player).NetworkObject);
						coros.Add(MelonCoroutines.Start(GiveFalseCharges(3, player)));
						<direct>5__5 = true;
						goto IL_030d;
					}
					<distance>5__11 = Vector3.Distance(((Component)<offc>5__10).transform.position, ((Component)player).transform.position);
					if (<distance>5__11 < 20f && <distance>5__11 < <smallestDistance>5__4 && ((NPC)<offc>5__10).Movement.CanMove() && !((NPC)<offc>5__10).IsInVehicle && !((NPC)<offc>5__10).isInBuilding)
					{
						<smallestDistance>5__4 = <distance>5__11;
						<noticeOfficer>5__3 = <offc>5__10;
					}
					<offc>5__10 = null;
				}
				<i>5__9++;
				goto IL_02f4;
			case 3:
				<>1__state = -1;
				if (!registered)
				{
					return false;
				}
				coros.Add(MelonCoroutines.Start(ApprehenderOfficerClear(<noticeOfficer>5__3)));
				<apprehending>5__6 = false;
				((NPC)<noticeOfficer>5__3).Movement.FacePoint(((Component)player).transform.position, 0.2f);
				<>2__current = (object)new WaitForSeconds(0.2f);
				<>1__state = 4;
				return true;
			case 4:
				<>1__state = -1;
				if (((NPC)<noticeOfficer>5__3).awareness.VisionCone.IsPointWithinSight(((Component)player).transform.position, false, (LandVehicle)null))
				{
					<noticeOfficer>5__3.BeginBodySearch_Networked(((NetworkBehaviour)player).NetworkObject);
					coros.Add(MelonCoroutines.Start(GiveFalseCharges(3, player)));
					<apprehending>5__6 = true;
				}
				if ((Object)(object)<noticeOfficer>5__3 != (Object)null && !<apprehending>5__6)
				{
					<i>5__12 = 0;
					goto IL_0650;
				}
				goto IL_0667;
			case 5:
				<>1__state = -1;
				if (((NPC)<noticeOfficer>5__3).awareness.VisionCone.IsPlayerVisible(player))
				{
					<noticeOfficer>5__3.BeginBodySearch_Networked(((NetworkBehaviour)player).NetworkObject);
					if (Random.Range(1f, 0f) > 0.8f)
					{
						coros.Add(MelonCoroutines.Start(GiveFalseCharges(2, player)));
					}
					if (Random.Range(1f, 0f) > 0.8f)
					{
						coros.Add(MelonCoroutines.Start(GiveFalseCharges(1, player)));
					}
					goto IL_0667;
				}
				<>2__current = (object)new WaitForSeconds(0.2f);
				<>1__state = 6;
				return true;
			case 6:
				<>1__state = -1;
				((NPC)<noticeOfficer>5__3).Movement.GetClosestReachablePoint(((Component)player).transform.position, ref <pos>5__13);
				if (<pos>5__13 != Vector3.zero && ((NPC)<noticeOfficer>5__3).Movement.CanMove() && ((NPC)<noticeOfficer>5__3).Movement.CanGetTo(<pos>5__13, 1f))
				{
					((NPC)<noticeOfficer>5__3).Movement.SetDestination(<pos>5__13);
					<>2__current = (object)new WaitForSeconds(0.6f);
					<>1__state = 7;
					return true;
				}
				goto IL_0667;
			case 7:
				<>1__state = -1;
				<i>5__12++;
				goto IL_0650;
			case 8:
				{
					<>1__state = -1;
					return false;
				}
				IL_02f4:
				if (<i>5__9 < <officersSnapshot>5__2.Length)
				{
					<>2__current = (object)new WaitForSeconds(0.1f);
					<>1__state = 2;
					return true;
				}
				goto IL_030d;
				IL_0650:
				if (<i>5__12 <= 15)
				{
					if (!registered)
					{
						return false;
					}
					((NPC)<noticeOfficer>5__3).Movement.FacePoint(((Component)player).transform.position, 0.1f);
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 5;
					return true;
				}
				goto IL_0667;
				IL_030d:
				if (((Object)(object)<noticeOfficer>5__3 == (Object)null) | <direct>5__5)
				{
					return false;
				}
				currentDrugApprehender.Add(<noticeOfficer>5__3);
				<>2__current = (object)new WaitForSeconds(<smallestDistance>5__4);
				<>1__state = 3;
				return true;
				IL_0667:
				<officersSnapshot>5__2 = null;
				<noticeOfficer>5__3 = null;
				goto IL_0676;
				IL_0676:
				<>2__current = null;
				<>1__state = 8;
				return true;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <GiveFalseCharges>d__49 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public int severity;

		public Player player;

		private int <>s__1;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <GiveFalseCharges>d__49(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Expected O, but got Unknown
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Expected O, but got Unknown
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Expected O, but got Unknown
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Expected O, but got Unknown
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
			{
				<>1__state = -1;
				if (!currentConfig.CorruptCops)
				{
					return false;
				}
				int num = severity;
				<>s__1 = num;
				switch (<>s__1)
				{
				case 1:
					player.CrimeData.AddCrime((Crime)new DrugTrafficking(), 1);
					player.CrimeData.AddCrime((Crime)new AttemptingToSell(), 1);
					player.CrimeData.AddCrime((Crime)new Evading(), 1);
					break;
				case 2:
					player.CrimeData.AddCrime((Crime)new FailureToComply(), 10);
					player.CrimeData.AddCrime((Crime)new Evading(), 1);
					break;
				case 3:
					player.CrimeData.AddCrime((Crime)new PossessingHighSeverityDrug(), 60);
					break;
				}
				<>2__current = null;
				<>1__state = 1;
				return true;
			}
			case 1:
				<>1__state = -1;
				return false;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <LateInvestigation>d__50 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public Player player;

		private PoliceStation <station>5__1;

		private NullReferenceException <ex>5__2;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <LateInvestigation>d__50(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<station>5__1 = null;
			<ex>5__2 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Expected O, but got Unknown
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<>2__current = (object)new WaitForSeconds(1f);
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				if (!registered || !Singleton<LawManager>.InstanceExists || PoliceStation.PoliceStations.Count == 0)
				{
					return false;
				}
				<station>5__1 = PoliceStation.GetClosestPoliceStation(((Component)player).transform.position);
				if (((NPCEnterableBuilding)<station>5__1).OccupantCount < 2)
				{
					return false;
				}
				try
				{
					Singleton<LawManager>.Instance.PoliceCalled(player, (Crime)new DrugTrafficking());
				}
				catch (NullReferenceException ex)
				{
					<ex>5__2 = ex;
					MelonLogger.Error("Failed to invoke PoliceCalled status " + <ex>5__2);
				}
				<>2__current = (object)new WaitForSeconds(4f);
				<>1__state = 2;
				return true;
			case 2:
				<>1__state = -1;
				if (!registered)
				{
					return false;
				}
				player.CrimeData.SetPursuitLevel((EPursuitLevel)1);
				<>2__current = null;
				<>1__state = 3;
				return true;
			case 3:
				<>1__state = -1;
				return false;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <NearbyCrazyCop>d__39 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public NACops <>4__this;

		private float <min>5__1;

		private float <max>5__2;

		private Player[] <players>5__3;

		private float <minRang>5__4;

		private float <maxRang>5__5;

		private float <minDistance>5__6;

		private float <cacheWalkSpeed>5__7;

		private PoliceOfficer[] <officersSnapshot>5__8;

		private object <>s__9;

		private bool <>s__10;

		private Player[] <>s__11;

		private int <>s__12;

		private Player <player>5__13;

		private PoliceOfficer[] <>s__14;

		private int <>s__15;

		private PoliceOfficer <officer>5__16;

		private float <distance>5__17;

		private Vector3 <pos>5__18;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <NearbyCrazyCop>d__39(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<players>5__3 = null;
			<officersSnapshot>5__8 = null;
			<>s__9 = null;
			<>s__11 = null;
			<player>5__13 = null;
			<>s__14 = null;
			<officer>5__16 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: 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_0098: Expected O, but got Unknown
			//IL_037e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0394: Unknown result type (might be due to invalid IL or missing references)
			//IL_039e: Expected O, but got Unknown
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_047f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0491: Unknown result type (might be due to invalid IL or missing references)
			//IL_0496: Unknown result type (might be due to invalid IL or missing references)
			//IL_0581: Unknown result type (might be due to invalid IL or missing references)
			//IL_0597: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a1: Expected O, but got Unknown
			//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_050d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0517: Expected O, but got Unknown
			//IL_04fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0299: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Expected O, but got Unknown
			(float, float) tuple;
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				goto IL_004e;
			case 1:
				<>1__state = -1;
				if (!registered)
				{
					return false;
				}
				<players>5__3 = Il2CppArrayBase<Player>.op_Implicit(Object.FindObjectsOfType<Player>(true));
				tuple = ThresholdUtils.Evaluate(ThresholdMappings.NearbyCrazRange, (int)NetworkSingleton<MoneyManager>.Instance.LifetimeEarnings);
				<minRang>5__4 = tuple.Item1;
				<maxRang>5__5 = tuple.Item2;
				<minDistance>5__6 = Random.Range(<minRang>5__4, <maxRang>5__5);
				<cacheWalkSpeed>5__7 = 0f;
				<>s__9 = _officerLock;
				<>s__10 = false;
				try
				{
					Monitor.Enter(<>s__9, ref <>s__10);
					<officersSnapshot>5__8 = allActiveOfficers.Where((PoliceOfficer o) => (Object)(object)o != (Object)null && (Object)(object)((Component)o).gameObject != (Object)null).ToArray();
				}
				finally
				{
					if (<>s__10)
					{
						Monitor.Exit(<>s__9);
					}
				}
				<>s__9 = null;
				<>s__11 = <players>5__3;
				<>s__12 = 0;
				goto IL_06c0;
			case 2:
				<>1__state = -1;
				<distance>5__17 = Vector3.Distance(((Component)<officer>5__16).transform.position, ((Component)<player>5__13).transform.position);
				if (<distance>5__17 < <minDistance>5__6 && !currentSummoned.Contains(<officer>5__16) && !currentDrugApprehender.Contains(<officer>5__16) && !<>4__this.IsStationNearby(((Component)<player>5__13).transform.position) && !((NPC)<officer>5__16).IsInVehicle && !((NPC)<officer>5__16).isInBuilding)
				{
					((VOEmitter)<officer>5__16.ChatterVO).Play((EVOLineType)13);
					((NPC)<officer>5__16).Movement.FacePoint(((Component)<player>5__13).transform.position, 0.6f);
					<>2__current = (object)new WaitForSeconds(0.4f);
					<>1__state = 3;
					return true;
				}
				goto IL_0682;
			case 3:
				<>1__state = -1;
				if (((NPC)<officer>5__16).awareness.VisionCone.IsPlayerVisible(<player>5__13) && !<player>5__13.CrimeData.BodySearchPending)
				{
					<officer>5__16.BeginBodySearch_Networked(((NetworkBehaviour)<player>5__13).NetworkObject);
					if (Random.Range(0f, 1f) > 0.8f)
					{
						coros.Add(MelonCoroutines.Start(GiveFalseCharges(2, <player>5__13)));
					}
					((NPC)<officer>5__16).Movement.WalkSpeed = <cacheWalkSpeed>5__7;
					goto IL_06a3;
				}
				<cacheWalkSpeed>5__7 = ((NPC)<officer>5__16).Movement.WalkSpeed;
				((NPC)<officer>5__16).Movement.GetClosestReachablePoint(((Component)<player>5__13).transform.position, ref <pos>5__18);
				if (<pos>5__18 != Vector3.zero && ((NPC)<officer>5__16).Movement.CanMove() && ((NPC)<officer>5__16).Movement.CanGetTo(<pos>5__18, 1f))
				{
					((NPC)<officer>5__16).Movement.WalkSpeed = 5f;
					((NPC)<officer>5__16).Movement.SetDestination(<pos>5__18);
				}
				<>2__current = (object)new WaitForSeconds(4f);
				<>1__state = 4;
				return true;
			case 4:
				<>1__state = -1;
				if (!registered || (Object)(object)<officer>5__16 == (Object)null || (Object)(object)((Component)<officer>5__16).gameObject == (Object)null)
				{
					return false;
				}
				((VOEmitter)<officer>5__16.ChatterVO).Play((EVOLineType)13);
				((NPC)<officer>5__16).Movement.FacePoint(((Component)<player>5__13).transform.position, 0.6f);
				<>2__current = (object)new WaitForSeconds(0.6f);
				<>1__state = 5;
				return true;
			case 5:
				{
					<>1__state = -1;
					if (((NPC)<officer>5__16).awareness.VisionCone.IsPlayerVisible(<player>5__13) && !<player>5__13.CrimeData.BodySearchPending)
					{
						<officer>5__16.BeginBodySearch_Networked(((NetworkBehaviour)<player>5__13).NetworkObject);
						if (Random.Range(0f, 1f) > 0.8f)
						{
							coros.Add(MelonCoroutines.Start(GiveFalseCharges(2, <player>5__13)));
						}
						((NPC)<officer>5__16).Movement.WalkSpeed = <cacheWalkSpeed>5__7;
					}
					else
					{
						((VOEmitter)<officer>5__16.ChatterVO).Play((EVOLineType)13);
						((NPC)<officer>5__16).Movement.WalkSpeed = <cacheWalkSpeed>5__7;
					}
					goto IL_06a3;
				}
				IL_004e:
				tuple = ThresholdUtils.Evaluate(ThresholdMappings.NearbyCrazThres, NetworkSingleton<TimeManager>.Instance.ElapsedDays);
				<min>5__1 = tuple.Item1;
				<max>5__2 = tuple.Item2;
				<>2__current = (object)new WaitForSeconds(Random.Range(<min>5__1, <max>5__2));
				<>1__state = 1;
				return true;
				IL_0682:
				<>s__15++;
				goto IL_0690;
				IL_06b2:
				<>s__12++;
				goto IL_06c0;
				IL_0690:
				if (<>s__15 < <>s__14.Length)
				{
					<officer>5__16 = <>s__14[<>s__15];
					if (((NPC)<officer>5__16).IsInVehicle || (Object.op_Implicit((Object)(object)((NPC)<officer>5__16).behaviour.activeBehaviour) && ((NPC)<officer>5__16).behaviour.activeBehaviour is VehiclePatrolBehaviour) || (Object.op_Implicit((Object)(object)((NPC)<officer>5__16).behaviour.activeBehaviour) && ((NPC)<officer>5__16).behaviour.activeBehaviour is VehiclePursuitBehaviour))
					{
						goto IL_0682;
					}
					<>2__current = (object)new WaitForSeconds(0.01f);
					<>1__state = 2;
					return true;
				}
				goto IL_06a3;
				IL_06a3:
				<>s__14 = null;
				<player>5__13 = null;
				goto IL_06b2;
				IL_06c0:
				if (<>s__12 < <>s__11.Length)
				{
					<player>5__13 = <>s__11[<>s__12];
					if ((Object)(object)<player>5__13.CurrentProperty != (Object)null)
					{
						goto IL_06b2;
					}
					<>s__14 = <officersSnapshot>5__8;
					<>s__15 = 0;
					goto IL_0690;
				}
				<>s__11 = null;
				<players>5__3 = null;
				<officersSnapshot>5__8 = null;
				goto IL_004e;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <NearbyLethalCop>d__38 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public NACops <>4__this;

		private float <min>5__1;

		private float <max>5__2;

		private Player[] <players>5__3;

		private float <minRang>5__4;

		private float <maxRang>5__5;

		private float <minDistance>5__6;

		private PoliceOfficer[] <officersSnapshot>5__7;

		private object <>s__8;

		private bool <>s__9;

		private Player[] <>s__10;

		private int <>s__11;

		private Player <player>5__12;

		private PoliceOfficer[] <>s__13;

		private int <>s__14;

		private PoliceOfficer <officer>5__15;

		private float <distance>5__16;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <NearbyLethalCop>d__38(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<players>5__3 = null;
			<officersSnapshot>5__7 = null;
			<>s__8 = null;
			<>s__10 = null;
			<player>5__12 = null;
			<>s__13 = null;
			<officer>5__15 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: 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_0086: Expected O, but got Unknown
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fc: Expected O, but got Unknown
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Expected O, but got Unknown
			(float, float) tuple;
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				goto IL_003c;
			case 1:
				<>1__state = -1;
				if (!registered)
				{
					return false;
				}
				<players>5__3 = Il2CppArrayBase<Player>.op_Implicit(Object.FindObjectsOfType<Player>(true));
				tuple = ThresholdUtils.Evaluate(ThresholdMappings.LethalCopRange, (int)NetworkSingleton<MoneyManager>.Instance.LifetimeEarnings);
				<minRang>5__4 = tuple.Item1;
				<maxRang>5__5 = tuple.Item2;
				<minDistance>5__6 = Random.Range(<minRang>5__4, <maxRang>5__5);
				<>s__8 = _officerLock;
				<>s__9 = false;
				try
				{
					Monitor.Enter(<>s__8, ref <>s__9);
					<officersSnapshot>5__7 = allActiveOfficers.Where((PoliceOfficer o) => (Object)(object)o != (Object)null && (Object)(object)((Component)o).gameObject != (Object)null).ToArray();
				}
				finally
				{
					if (<>s__9)
					{
						Monitor.Exit(<>s__8);
					}
				}
				<>s__8 = null;
				<>s__10 = <players>5__3;
				<>s__11 = 0;
				goto IL_03a1;
			case 2:
				<>1__state = -1;
				<distance>5__16 = Vector3.Distance(((Component)<officer>5__15).transform.position, ((Component)<player>5__12).transform.position);
				if (<distance>5__16 < <minDistance>5__6 && !currentSummoned.Contains(<officer>5__15) && !currentDrugApprehender.Contains(<officer>5__15) && !<>4__this.IsStationNearby(((Component)<player>5__12).transform.position) && !<player>5__12.CrimeData.BodySearchPending && !((NPC)<officer>5__15).IsInVehicle && (Object)(object)((NPC)<officer>5__15).behaviour.activeBehaviour != (Object)(object)<officer>5__15.CheckpointBehaviour && !((NPC)<officer>5__15).isInBuilding)
				{
					((NPC)<officer>5__15).Movement.FacePoint(((Component)<player>5__12).transform.position, 0.2f);
					<>2__current = (object)new WaitForSeconds(0.3f);
					<>1__state = 3;
					return true;
				}
				<officer>5__15 = null;
				<>s__14++;
				goto IL_0371;
			case 3:
				{
					<>1__state = -1;
					if (((NPC)<officer>5__15).awareness.VisionCone.IsPlayerVisible(<player>5__12))
					{
						<player>5__12.CrimeData.SetPursuitLevel((EPursuitLevel)4);
						<officer>5__15.BeginFootPursuit_Networked(((NetworkBehaviour)<player>5__12).NetworkObject, false);
					}
					goto IL_0384;
				}
				IL_003c:
				tuple = ThresholdUtils.Evaluate(ThresholdMappings.LethalCopFreq, NetworkSingleton<TimeManager>.Instance.ElapsedDays);
				<min>5__1 = tuple.Item1;
				<max>5__2 = tuple.Item2;
				<>2__current = (object)new WaitForSeconds(Random.Range(<min>5__1, <max>5__2));
				<>1__state = 1;
				return true;
				IL_0371:
				if (<>s__14 < <>s__13.Length)
				{
					<officer>5__15 = <>s__13[<>s__14];
					<>2__current = (object)new WaitForSeconds(0.01f);
					<>1__state = 2;
					return true;
				}
				goto IL_0384;
				IL_0384:
				<>s__13 = null;
				<player>5__12 = null;
				<>s__11++;
				goto IL_03a1;
				IL_03a1:
				if (<>s__11 < <>s__10.Length)
				{
					<player>5__12 = <>s__10[<>s__11];
					<>s__13 = <officersSnapshot>5__7;
					<>s__14 = 0;
					goto IL_0371;
				}
				<>s__10 = null;
				<players>5__3 = null;
				<officersSnapshot>5__7 = null;
				goto IL_003c;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <PIAvatar>d__44 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public PoliceOfficer offc;

		public NACops <>4__this;

		private List<LayerSetting> <originalBodySettings>5__1;

		private List<LayerSetting> <bodySettings>5__2;

		private List<AccessorySetting> <originalAccessorySettings>5__3;

		private List<AccessorySetting> <accessorySettings>5__4;

		private LayerSetting <jeans>5__5;

		private LayerSetting <shirt>5__6;

		private AccessorySetting <cap>5__7;

		private AccessorySetting <blazer>5__8;

		private AccessorySetting <sneakers>5__9;

		private Enumerator<LayerSetting> <>s__10;

		private LayerSetting <layer>5__11;

		private Enumerator<AccessorySetting> <>s__12;

		private AccessorySetting <acc>5__13;

		private int <i>5__14;

		private LayerSetting <layer>5__15;

		private int <i>5__16;

		private AccessorySetting <acc>5__17;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <PIAvatar>d__44(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<originalBodySettings>5__1 = null;
			<bodySettings>5__2 = null;
			<originalAccessorySettings>5__3 = null;
			<accessorySettings>5__4 = null;
			<jeans>5__5 = null;
			<shirt>5__6 = null;
			<cap>5__7 = null;
			<blazer>5__8 = null;
			<sneakers>5__9 = null;
			<>s__10 = null;
			<layer>5__11 = null;
			<>s__12 = null;
			<acc>5__13 = null;
			<layer>5__15 = null;
			<acc>5__17 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Expected O, but got Unknown
			//IL_0112: 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_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Expected O, but got Unknown
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_035b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0407: Unknown result type (might be due to invalid IL or missing references)
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<originalBodySettings>5__1 = ((NPC)offc).Avatar.CurrentSettings.BodyLayerSettings;
				<bodySettings>5__2 = new List<LayerSetting>();
				<>s__10 = <originalBodySettings>5__1.GetEnumerator();
				while (<>s__10.MoveNext())
				{
					<layer>5__11 = <>s__10.Current;
					<bodySettings>5__2.Add(new LayerSetting
					{
						layerPath = <layer>5__11.layerPath,
						layerTint = <layer>5__11.layerTint
					});
					<layer>5__11 = null;
				}
				<>s__10 = null;
				<originalAccessorySettings>5__3 = ((NPC)offc).Avatar.CurrentSettings.AccessorySettings;
				<accessorySettings>5__4 = new List<AccessorySetting>();
				<>s__12 = <originalAccessorySettings>5__3.GetEnumerator();
				while (<>s__12.MoveNext())
				{
					<acc>5__13 = <>s__12.Current;
					<accessorySettings>5__4.Add(new AccessorySetting
					{
						path = <acc>5__13.path,
						color = <acc>5__13.color
					});
					<acc>5__13 = null;
				}
				<>s__12 = null;
				<i>5__14 = 0;
				while (<i>5__14 < <bodySettings>5__2.Count)
				{
					<layer>5__15 = <bodySettings>5__2[<i>5__14];
					<layer>5__15.layerPath = "";
					<layer>5__15.layerTint = Color.white;
					<bodySettings>5__2[<i>5__14] = <layer>5__15;
					<layer>5__15 = null;
					<i>5__14++;
				}
				<i>5__16 = 0;
				while (<i>5__16 < <accessorySettings>5__4.Count)
				{
					<acc>5__17 = <accessorySettings>5__4[<i>5__16];
					<acc>5__17.path = "";
					<acc>5__17.color = Color.white;
					<accessorySettings>5__4[<i>5__16] = <acc>5__17;
					<acc>5__17 = null;
					<i>5__16++;
				}
				<jeans>5__5 = <bodySettings>5__2[2];
				<jeans>5__5.layerPath = "Avatar/Layers/Bottom/Jeans";
				<jeans>5__5.layerTint = new Color(0.396f, 0.396f, 0.396f);
				<bodySettings>5__2[2] = <jeans>5__5;
				<shirt>5__6 = <bodySettings>5__2[3];
				<shirt>5__6.layerPath = "Avatar/Layers/Top/RolledButtonUp";
				<shirt>5__6.layerTint = new Color(0.326f, 0.578f, 0.896f);
				<bodySettings>5__2[3] = <shirt>5__6;
				<cap>5__7 = <accessorySettings>5__4[0];
				<cap>5__7.path = "Avatar/Accessories/Head/Cap/Cap";
				<cap>5__7.color = new Color(0.613f, 0.493f, 0.344f);
				<accessorySettings>5__4[0] = <cap>5__7;
				<blazer>5__8 = <accessorySettings>5__4[1];
				<blazer>5__8.path = "Avatar/Accessories/Chest/Blazer/Blazer";
				<blazer>5__8.color = new Color(0.613f, 0.493f, 0.344f);
				<accessorySettings>5__4[1] = <blazer>5__8;
				<sneakers>5__9 = <accessorySettings>5__4[2];
				<sneakers>5__9.path = "Avatar/Accessories/Feet/Sneakers/Sneakers";
				<sneakers>5__9.color = new Color(0.151f, 0.151f, 0.151f);
				<accessorySettings>5__4[2] = <sneakers>5__9;
				((NPC)offc).Avatar.CurrentSettings.BodyLayerSettings = <bodySettings>5__2;
				((NPC)offc).Avatar.CurrentSettings.AccessorySettings = <accessorySettings>5__4;
				((NPC)offc).Avatar.ApplyBodyLayerSettings(((NPC)offc).Avatar.CurrentSettings, -1);
				((NPC)offc).Avatar.ApplyAccessorySettings(((NPC)offc).Avatar.CurrentSettings);
				<>2__current = null;
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				return false;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <PreProcessHandover>d__33 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public Customer __instance;

		public bool handoverByPlayer;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <PreProcessHandover>d__33(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				if (!handoverByPlayer)
				{
					return false;
				}
				if (currentConfig.BuyBusts)
				{
					coros.Add(MelonCoroutines.Start(SummonBustCop(__instance)));
				}
				<>2__current = null;
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				return false;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <PreSampleOffered>d__31 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public Customer customer;

		private Player <closestPlayer>5__1;

		private float <distance>5__2;

		private float <min>5__3;

		private float <max>5__4;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <PreSampleOffered>d__31(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<closestPlayer>5__1 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Expected O, but got Unknown
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				if (!currentConfig.SnitchingSamples)
				{
					return false;
				}
				<>2__current = (object)new WaitForSeconds(10f);
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				if (!registered)
				{
					return false;
				}
				<closestPlayer>5__1 = Player.GetClosestPlayer(((Component)customer).transform.position, ref <distance>5__2, (List<Player>)null);
				if ((Object)(object)<closestPlayer>5__1 == (Object)null)
				{
					return false;
				}
				(<min>5__3, <max>5__4) = ThresholdUtils.Evaluate(ThresholdMappings.SnitchProbability, NetworkSingleton<TimeManager>.Instance.ElapsedDays);
				if (Random.Range(<min>5__3, <max>5__4) < 0.8f)
				{
					return false;
				}
				coros.Add(MelonCoroutines.Start(LateInvestigation(<closestPlayer>5__1)));
				coros.Add(MelonCoroutines.Start(GiveFalseCharges(1, <closestPlayer>5__1)));
				return false;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <PrivateInvestigator>d__40 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public NACops <>4__this;

		private float <maxTime>5__1;

		private float <min>5__2;

		private float <max>5__3;

		private Player[] <players>5__4;

		private EDay <currentDay>5__5;

		private Player <randomPlayer>5__6;

		private NetworkObject <copNet>5__7;

		private NPC <myNpc>5__8;

		private NavMeshAgent <nav>5__9;

		private PoliceOfficer <offc>5__10;

		private Vector3 <warpInit>5__11;

		private int <maxWarpAttempts>5__12;

		private float <elapsed>5__13;

		private int <investigationDelta>5__14;

		private int <proximityDelta>5__15;

		private int <sightedAmount>5__16;

		private float <maxWarpCd>5__17;

		private float <lastWarp>5__18;

		private int <i>5__19;

		private float <xInitOffset>5__20;

		private float <zInitOffset>5__21;

		private Vector3 <targetWarpPosition>5__22;

		private float <distance>5__23;

		private float <minRang>5__24;

		private float <maxRang>5__25;

		private float <xOffset>5__26;

		private float <zOffset>5__27;

		private Vector3 <targetPosition>5__28;

		private Vector3 <pos>5__29;

		private NPC <npc>5__30;

		private Exception <ex>5__31;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <PrivateInvestigator>d__40(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<players>5__4 = null;
			<randomPlayer>5__6 = null;
			<copNet>5__7 = null;
			<myNpc>5__8 = null;
			<nav>5__9 = null;
			<offc>5__10 = null;
			<npc>5__30 = null;
			<ex>5__31 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0308: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0326: Expected O, but got Unknown
			//IL_034e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Expected O, but got Unknown
			//IL_059d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0465: Unknown result type (might be due to invalid IL or missing references)
			//IL_046a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Expected O, but got Unknown
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0423: Unknown result type (might be due to invalid IL or missing references)
			//IL_0457: Unknown result type (might be due to invalid IL or missing references)
			//IL_064e: Unknown result type (might be due to invalid IL or missing references)
			//IL_065e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0518: Unknown result type (might be due to invalid IL or missing references)
			//IL_052e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0533: Unknown result type (might be due to invalid IL or missing references)
			//IL_0538: Unknown result type (might be due to invalid IL or missing references)
			//IL_0549: Unknown result type (might be due to invalid IL or missing references)
			//IL_055b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0560: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05cc: Expected O, but got Unknown
			//IL_0577: Unknown result type (might be due to invalid IL or missing references)
			//IL_0581: Expected O, but got Unknown
			//IL_06ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f4: Invalid comparison between Unknown and I4
			//IL_02db: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Expected O, but got Unknown
			//IL_089d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0938: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c0e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c18: Expected O, but got Unknown
			//IL_0ae4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b52: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a2b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a41: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a46: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a5c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a6e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a73: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a80: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a90: Unknown result type (might be due to invalid IL or missing references)
			//IL_0abc: Unknown result type (might be due to invalid IL or missing references)
			(float, float) tuple2;
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<maxTime>5__1 = 120f;
				goto IL_006e;
			case 1:
				<>1__state = -1;
				if (!registered)
				{
					return false;
				}
				<players>5__4 = Il2CppArrayBase<Player>.op_Implicit(Object.FindObjectsOfType<Player>(true));
				if (<players>5__4.Length != 0)
				{
					<currentDay>5__5 = NetworkSingleton<TimeManager>.Instance.CurrentDay;
					if (!((object)(EDay)(ref <currentDay>5__5)).ToString().Contains("Saturday") && !((object)(EDay)(ref <currentDay>5__5)).ToString().Contains("Sunday") && currentPICount < 1)
					{
						currentPICount++;
						<randomPlayer>5__6 = <players>5__4[Random.Range(0, <players>5__4.Length)];
						<copNet>5__7 = Object.Instantiate<NetworkObject>(<>4__this.policeBase);
						<myNpc>5__8 = ((Component)<copNet>5__7).gameObject.GetComponent<NPC>();
						<nav>5__9 = ((Component)<copNet>5__7).GetComponent<NavMeshAgent>();
						if ((Object)(object)<nav>5__9 != (Object)null && !((Behaviour)<nav>5__9).enabled)
						{
							((Behaviour)<nav>5__9).enabled = true;
						}
						else
						{
							<nav>5__9 = Utils.GetOrAddComponent<NavMeshAgent>((MonoBehaviour)(object)<copNet>5__7);
							((Behaviour)<nav>5__9).enabled = true;
							<nav>5__9.isStopped = false;
						}
						<myNpc>5__8.ID = $"NACop_{Guid.NewGuid()}";
						<myNpc>5__8.FirstName = $"NACop_{Guid.NewGuid()}";
						<myNpc>5__8.LastName = "";
						((Component)<myNpc>5__8).transform.parent = NetworkSingleton<NPCManager>.Instance.NPCContainer;
						NPCManager.NPCRegistry.Add(<myNpc>5__8);
						<>2__current = (object)new WaitForSeconds(0.1f);
						<>1__state = 2;
						return true;
					}
				}
				goto IL_006e;
			case 2:
				<>1__state = -1;
				netManager.ServerManager.Spawn(<copNet>5__7, (NetworkConnection)null, default(Scene));
				<>2__current = (object)new WaitForSeconds(0.3f);
				<>1__state = 3;
				return true;
			case 3:
				<>1__state = -1;
				((Component)<copNet>5__7).gameObject.SetActive(true);
				<>2__current = (object)new WaitForSeconds(0.1f);
				<>1__state = 4;
				return true;
			case 4:
				<>1__state = -1;
				<offc>5__10 = ((Component)<copNet>5__7).gameObject.GetComponent<PoliceOfficer>();
				currentSummoned.Add(<offc>5__10);
				((Behaviour)<offc>5__10.FootPatrolBehaviour).SendEnable();
				((NPC)<offc>5__10).Movement.WalkSpeed = 5f;
				((NPC)<offc>5__10).Movement.RunSpeed = 8f;
				coros.Add(MelonCoroutines.Start(<>4__this.PIAvatar(<offc>5__10)));
				if (!raidedDuringSession)
				{
					if (sessionPropertyHeat >= 12)
					{
						((NPC)<offc>5__10).Avatar.Effects.SetEyeLightEmission(1f, Color.red, true);
					}
					else if (sessionPropertyHeat >= 6)
					{
						((NPC)<offc>5__10).Avatar.Effects.SetEyeLightEmission(1f, Color.yellow, true);
					}
				}
				<warpInit>5__11 = Vector3.zero;
				<maxWarpAttempts>5__12 = 30;
				<i>5__19 = 0;
				goto IL_05ef;
			case 5:
				<>1__state = -1;
				((NPC)<offc>5__10).Movement.Warp(<warpInit>5__11);
				((NPC)<offc>5__10).Movement.SetAgentType((EAgentType)2);
				goto IL_0606;
			case 6:
				<>1__state = -1;
				<i>5__19++;
				goto IL_05ef;
			case 7:
				{
					<>1__state = -1;
					if (!registered)
					{
						return false;
					}
					<elapsed>5__13 += 5f;
					goto IL_0641;
				}
				IL_0641:
				while (true)
				{
					<distance>5__23 = Vector3.Distance(((Component)<offc>5__10).transform.position, ((Component)<randomPlayer>5__6).transform.position);
					if ((Object)(object)((NPC)<offc>5__10).behaviour.activeBehaviour != (Object)null && ((Object)((NPC)<offc>5__10).behaviour.activeBehaviour).ToString().ToLower().Contains("schedule"))
					{
						((Behaviour)<offc>5__10.FootPatrolBehaviour).SendEnable();
					}
					if (!((NPC)<offc>5__10).Movement.CanMove() || <elapsed>5__13 >= <maxTime>5__1 || (int)<randomPlayer>5__6.CrimeData.CurrentPursuitLevel > 0)
					{
						break;
					}
					<lastWarp>5__18 += Time.deltaTime;
					if (Random.Range(0f, 1f) >= 0.98f)
					{
						((NPC)<offc>5__10).PlayVO((EVOLineType)13);
					}
					if (NetworkSingleton<TimeManager>.Instance.CurrentTime > 2100 || NetworkSingleton<TimeManager>.Instance.CurrentTime < 500)
					{
						if (((NPC)<offc>5__10).awareness.VisionCone.VisionEnabled)
						{
							((NPC)<offc>5__10).awareness.VisionCone.VisionEnabled = false;
						}
						(<minRang>5__24, <maxRang>5__25) = ThresholdUtils.Evaluate(ThresholdMappings.PICurfewAttn, NetworkSingleton<TimeManager>.Instance.ElapsedDays);
						if (Random.Range(<minRang>5__24, <maxRang>5__25) < 0.5f)
						{
							((NPC)<offc>5__10).awareness.VisionCone.VisionEnabled = true;
						}
					}
					else if (!((NPC)<offc>5__10).awareness.VisionCone.VisionEnabled)
					{
						((NPC)<offc>5__10).awareness.VisionCone.VisionEnabled = true;
					}
					if (((NPC)<offc>5__10).awareness.VisionCone.VisionEnabled && ((NPC)<offc>5__10).awareness.VisionCone.IsPlayerVisible(<randomPlayer>5__6))
					{
						<sightedAmount>5__16++;
					}
					if (((NPC)<offc>5__10).Movement.CanGetTo(((Component)<randomPlayer>5__6).transform.position, 100f) && <distance>5__23 >= 90f && <distance>5__23 < 140f)
					{
						if (<lastWarp>5__18 < <maxWarpCd>5__17)
						{
							continue;
						}
						coros.Add(MelonCoroutines.Start(AttemptWarp(<offc>5__10, ((Component)<randomPlayer>5__6).transform)));
						<lastWarp>5__18 = 0f;
					}
					else if (((NPC)<offc>5__10).Movement.CanGetTo(((Component)<randomPlayer>5__6).transform.position, 100f) && <distance>5__23 >= 25f && <distance>5__23 < 140f)
					{
						if (((NPC)<offc>5__10).Movement.IsPaused)
						{
							((NPC)<offc>5__10).Movement.ResumeMovement();
						}
						<xOffset>5__26 = Random.Range(6f, 24f);
						<zOffset>5__27 = Random.Range(6f, 24f);
						<xOffset>5__26 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
						<zOffset>5__27 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
						<targetPosition>5__28 = ((Component)<randomPlayer>5__6).transform.position + new Vector3(<xOffset>5__26, 0f, <zOffset>5__27);
						((NPC)<offc>5__10).Movement.GetClosestReachablePoint(<targetPosition>5__28, ref <pos>5__29);
						if (<pos>5__29 != Vector3.zero && Vector3.Distance(<pos>5__29, ((Component)<randomPlayer>5__6).transform.position) < <distance>5__23)
						{
							((NPC)<offc>5__10).behaviour.activeBehaviour.SetDestination(<pos>5__29, true);
						}
					}
					else
					{
						if (!((NPC)<offc>5__10).Movement.CanGetTo(((Component)<randomPlayer>5__6).transform.position, 100f) || !(<distance>5__23 <= 25f))
						{
							break;
						}
						if (!((NPC)<offc>5__10).Movement.IsPaused)
						{
							((NPC)<offc>5__10).Movement.PauseMovement();
						}
						((NPC)<offc>5__10).Movement.FacePoint(((Component)<randomPlayer>5__6).transform.position, 0.9f);
						if (Random.Range(0f, 1f) > 0.95f)
						{
							coros.Add(MelonCoroutines.Start(GiveFalseCharges(1, <randomPlayer>5__6)));
						}
						<proximityDelta>5__15++;
						if ((Object)(object)<randomPlayer>5__6.CurrentProperty != (Object)null && Random.Range(0f, 1f) > 0.1f && <randomPlayer>5__6.CurrentProperty.PropertyName == "Docks Warehouse")
						{
							<investigationDelta>5__14++;
						}
					}
					<>2__current = (object)new WaitForSeconds(5f);
					<>1__state = 7;
					return true;
				}
				if (<investigationDelta>5__14 >= 8 && (Object)(object)<randomPlayer>5__6.CurrentProperty != (Object)null && <randomPlayer>5__6.CurrentProperty.PropertyName == "Docks Warehouse" && <sightedAmount>5__16 >= 1)
				{
					sessionPropertyHeat += Random.Range(6, 9);
				}
				else if (<investigationDelta>5__14 >= 12 && (Object)(object)<randomPlayer>5__6.CurrentProperty == (Object)null && <sightedAmount>5__16 > 2)
				{
					sessionPropertyHeat += Random.Range(1, 4);
				}
				else if (sessionPropertyHeat > 3 && <elapsed>5__13 > 60f && <proximityDelta>5__15 > 4 && <sightedAmount>5__16 >= 1)
				{
					sessionPropertyHeat -= Random.Range(1, 4);
				}
				try
				{
					if (currentSummoned.Contains(<offc>5__10))
					{
						currentSummoned.Remove(<offc>5__10);
					}
					currentPICount--;
					<npc>5__30 = ((Component)<offc>5__10).gameObject.GetComponent<NPC>();
					if ((Object)(object)<npc>5__30 != (Object)null && NPCManager.NPCRegistry.Contains(<npc>5__30))
					{
						NPCManager.NPCRegistry.Remove(<npc>5__30);
					}
					if ((Object)(object)<npc>5__30 != (Object)null && (Object)(object)((Component)<npc>5__30).gameObject != (Object)null)
					{
						Object.Destroy((Object)(object)((Component)<npc>5__30).gameObject);
					}
					<npc>5__30 = null;
				}
				catch (Exception ex)
				{
					<ex>5__31 = ex;
					MelonLogger.Error((object)<ex>5__31);
				}
				<players>5__4 = null;
				<randomPlayer>5__6 = null;
				<copNet>5__7 = null;
				<myNpc>5__8 = null;
				<nav>5__9 = null;
				<offc>5__10 = null;
				goto IL_006e;
				IL_006e:
				tuple2 = ThresholdUtils.Evaluate(ThresholdMappings.PIThres, (int)NetworkSingleton<MoneyManager>.Instance.LifetimeEarnings);
				<min>5__2 = tuple2.Item1;
				<max>5__3 = tuple2.Item2;
				<>2__current = (object)new WaitForSeconds(Random.Range(<min>5__2, <max>5__3));
				<>1__state = 1;
				return true;
				IL_05ef:
				if (<i>5__19 < <maxWarpAttempts>5__12)
				{
					<xInitOffset>5__20 = Random.Range(8f, 30f);
					<zInitOffset>5__21 = Random.Range(8f, 30f);
					<xInitOffset>5__20 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
					<zInitOffset>5__21 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
					<targetWarpPosition>5__22 = ((Component)<randomPlayer>5__6).transform.position + new Vector3(<xInitOffset>5__20, 0f, <zInitOffset>5__21);
					((NPC)<offc>5__10).Movement.GetClosestReachablePoint(<targetWarpPosition>5__22, ref <warpInit>5__11);
					if (<warpInit>5__11 != Vector3.zero)
					{
						<>2__current = (object)new WaitForSeconds(0.1f);
						<>1__state = 5;
						return true;
					}
					<>2__current = (object)new WaitForSeconds(0.1f);
					<>1__state = 6;
					return true;
				}
				goto IL_0606;
				IL_0606:
				<elapsed>5__13 = 0f;
				<investigationDelta>5__14 = 0;
				<proximityDelta>5__15 = 0;
				<sightedAmount>5__16 = 0;
				<maxWarpCd>5__17 = 30f;
				<lastWarp>5__18 = 0f;
				goto IL_0641;
			}
		}

		bool IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		[DebuggerHidden]
		void IEnumerator.Reset()
		{
			throw new NotSupportedException();
		}
	}

	[CompilerGenerated]
	private sealed class <RaidAvatar>d__25 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public PoliceOfficer offc;

		public NACops <>4__this;

		private List<LayerSetting> <originalBodySettings>5__1;

		private List<LayerSetting> <bodySettings>5__2;

		private List<AccessorySetting> <originalAccessorySettings>5__3;

		private List<AccessorySetting> <accessorySettings>5__4;

		private LayerSetting <jeans>5__5;

		private LayerSetting <shirt>5__6;

		private AccessorySetting <cap>5__7;

		private AccessorySetting <sneakers>5__8;

		private Il2CppReferenceArray<Collider> <rcs>5__9;

		private Enumerator<LayerSetting> <>s__10;

		private LayerSetting <layer>5__11;

		private Enumerator<AccessorySetting> <>s__12;

		private AccessorySetting <acc>5__13;

		private int <i>5__14;

		private LayerSetting <layer>5__15;

		private int <i>5__16;

		private AccessorySetting <acc>5__17;

		private int <i>5__18;

		object IEnumerator<object>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <RaidAvatar>d__25(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<originalBodySettings>5__1 = null;
			<bodySettings>5__2 = null;
			<originalAccessorySettings>5__3 = null;
			<accessorySettings>5__4 = null;
			<jeans>5__5 = null;
			<shirt>5__6 = null;
			<cap>5__7 = null;
			<sneakers>5__8 = null;
			<rcs>5__9 = null;
			<>s__10 = null;
			<layer>5__11 = null;
			<>s__12 = null;
			<acc>5__13 = null;
			<layer>5__15 = null;
			<acc>5__17 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Expected O, but got Unknown
			//IL_0112: 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_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Expected O, but got Unknown
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_033d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0384: Unknown result type (might be due to invalid IL or missing references)
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<originalBodySettings>5__1 = ((NPC)offc).Avatar.CurrentSettings.BodyLayerSettings;
				<bodySettings>5__2 = new List<LayerSetting>();
				<>s__10 = <originalBodySettings>5__1.GetEnumerator();
				while (<>s__10.MoveNext())
				{
					<layer>5__11 = <>s__10.Current;
					<bodySettings>5__2.Add(new LayerSetting
					{
						layerPath = <layer>5__11.layerPath,
						layerTint = <layer>5__11.layerTint
					});
					<layer>5__11 = null;
				}
				<>s__10 = null;
				<originalAccessorySettings>5__3 = ((NPC)offc).Avatar.CurrentSettings.AccessorySettings;
				<accessorySettings>5__4 = new List<AccessorySetting>();
				<>s__12 = <originalAccessorySettings>5__3.GetEnumerator();
				while (<>s__12.MoveNext())
				{
					<acc>5__13 = <>s__12.Current;
					<accessorySettings>5__4.Add(new AccessorySetting
					{
						path = <acc>5__13.path,
						color = <acc>5__13.color
					});
					<acc>5__13 = null;
				}
				<>s__12 = null;
				<i>5__14 = 0;
				while (<i>5__14 < <bodySettings>5__2.Count)
				{
					<layer>5__15 = <bodySettings>5__2[<i>5__14];
					<layer>5__15.layerPath = "";
					<layer>5__15.layerTint = Color.white;
					<bodySettings>5__2[<i>5__14] = <layer>5__15;
					<layer>5__15 = null;
					<i>5__14++;
				}
				<i>5__16 = 0;
				while (<i>5__16 < <accessorySettings>5__4.Count)
				{
					<acc>5__17 = <accessorySettings>5__4[<i>5__16];
					<acc>5__17.path = "";
					<acc>5__17.color = Color.white;
					<accessorySettings>5__4[<i>5__16] = <acc>5__17;
					<acc>5__17 = null;
					<i>5__16++;
				}
				<jeans>5__5 = <bodySettings>5__2[2];
				<jeans>5__5.layerPath = "Avatar/Layers/Bottom/Jeans";
				<jeans>5__5.layerTint = new Color(0.396f, 0.396f, 0.396f);
				<bodySettings>5__2[2] = <jeans>5__5;
				<shirt>5__6 = <bodySettings>5__2[3];
				<shirt>5__6.layerPath = "Avatar/Layers/Top/RolledButtonUp";
				<shirt>5__6.layerTint = Color.black;
				<bodySettings>5__2[3] = <shirt>5__6;
				<cap>5__7 = <accessorySettings>5__4[0];
				<cap>5__7.path = "Avatar/Accessories/Head/Cap/Cap";
				<cap>5__7.color = Color.black;
				<accessorySettings>5__4[0] = <cap>5__7;
				<sneakers>5__8 = <accessorySettings>5__4[1];
				<sneakers>5__8.path = "Avatar/Accessories/Feet/Sneakers/Sneakers";
				<sneakers>5__8.color = Color.black;
				<accessorySettings>5__4[1] = <sneakers>5__8;
				((NPC)offc).Avatar.CurrentSettings.BodyLayerSettings = <bodySettings>5__2;
				((NPC)offc).Avatar.CurrentSettings.AccessorySettings = <accessorySettings>5__4;
				((NPC)offc).Avatar.ApplyBodyLayerSettings(((NPC)offc).Avatar.CurrentSettings, -1);
				((NPC)offc).Avatar.ApplyAccessorySettings(((NPC)offc).Avatar.CurrentSettings);
				((NPC)offc).Avatar.SetRagdollPhysicsEnabled(false, true);
				<rcs>5__9 = ((NPC)offc).Avatar.RagdollColliders;
				<i>5__1