Decompiled source of NACopsV1 v1.5.2

NACopsV1.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using FishNet.Object;
using HarmonyLib;
using MelonLoader;
using NACopsV1;
using ScheduleOne.AvatarFramework;
using ScheduleOne.AvatarFramework.Equipping;
using ScheduleOne.DevUtilities;
using ScheduleOne.GameTime;
using ScheduleOne.Law;
using ScheduleOne.Money;
using ScheduleOne.NPCs;
using ScheduleOne.NPCs.Behaviour;
using ScheduleOne.PlayerScripts;
using ScheduleOne.Police;
using ScheduleOne.Product;
using ScheduleOne.Vehicles;
using ScheduleOne.VoiceOver;
using UnityEngine;

[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", "1.5", "XOWithSauce", null)]
[assembly: MelonColor]
[assembly: MelonOptionalDependencies(new string[] { "FishNet.Runtime" })]
[assembly: MelonGame("TVGS", "Schedule I")]
[assembly: HarmonyDontPatchAll]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyCompany("NACopsV1")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NACopsV1")]
[assembly: AssemblyTitle("NACopsV1")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NACopsV1;

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

	public const string Description = "Crazyyyy cops";

	public const string Author = "XOWithSauce";

	public const string Company = null;

	public const string Version = "1.5";

	public const string DownloadLink = null;
}
public class NACops : MelonMod
{
	[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;
		}
	}

	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, 20f, 50f),
			new MinMaxThreshold(5, 14f, 40f),
			new MinMaxThreshold(10, 10f, 30f),
			new MinMaxThreshold(20, 9f, 30f),
			new MinMaxThreshold(30, 8f, 20f),
			new MinMaxThreshold(40, 8f, 20f),
			new MinMaxThreshold(50, 8f, 20f)
		};

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

		public static readonly List<MinMaxThreshold> NearbyCrazThres = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 600f, 960f),
			new MinMaxThreshold(5, 400f, 960f),
			new MinMaxThreshold(10, 100f, 600f),
			new MinMaxThreshold(20, 90f, 600f),
			new MinMaxThreshold(30, 90f, 500f),
			new MinMaxThreshold(40, 90f, 450f),
			new MinMaxThreshold(50, 60f, 300f)
		};

		public static readonly List<MinMaxThreshold> PIThres = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(100, 300f, 400f),
			new MinMaxThreshold(1000, 200f, 400f),
			new MinMaxThreshold(10000, 100f, 400f),
			new MinMaxThreshold(30000, 90f, 300f),
			new MinMaxThreshold(60000, 90f, 200f),
			new MinMaxThreshold(100000, 90f, 200f),
			new MinMaxThreshold(300000, 90f, 200f)
		};
	}

	[CompilerGenerated]
	private sealed class <ApprehenderOfficerClear>d__9 : IEnumerator<object>, IDisposable, IEnumerator
	{
		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__9(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

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

		private bool MoveNext()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<>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 <CrazyCops>d__13 : IEnumerator<object>, IDisposable, IEnumerator
	{
		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[] <>s__8;

		private int <>s__9;

		private PoliceOfficer <officer>5__10;

		private float <distance>5__11;

		private Exception <ex>5__12;

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

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

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

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<players>5__3 = null;
			<randomPlayer>5__4 = null;
			<nearestOfficer>5__6 = null;
			<>s__8 = null;
			<officer>5__10 = null;
			<ex>5__12 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				goto IL_0033;
			case 1:
			{
				<>1__state = -1;
				(float, float) 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 = 2;
				return true;
			}
			case 2:
				{
					<>1__state = -1;
					<players>5__3 = Object.FindObjectsOfType<Player>(true);
					if (officers.Length != 0 && <players>5__3.Length != 0)
					{
						<randomPlayer>5__4 = <players>5__3[Random.Range(0, <players>5__3.Length)];
						if ((Object)(object)<randomPlayer>5__4.CurrentProperty != (Object)null)
						{
							goto IL_0033;
						}
						<playerPosition>5__5 = ((Component)<randomPlayer>5__4).transform.position;
						<nearestOfficer>5__6 = null;
						<closestDistance>5__7 = 100f;
						<>s__8 = officers;
						for (<>s__9 = 0; <>s__9 < <>s__8.Length; <>s__9++)
						{
							<officer>5__10 = <>s__8[<>s__9];
							<distance>5__11 = Vector3.Distance(((Component)<officer>5__10).transform.position, <playerPosition>5__5);
							if (<distance>5__11 < <closestDistance>5__7 && !currentPIs.Contains(<officer>5__10) && !currentDrugApprehender.Contains(<officer>5__10))
							{
								<closestDistance>5__7 = <distance>5__11;
								<nearestOfficer>5__6 = <officer>5__10;
							}
							<officer>5__10 = null;
						}
						<>s__8 = null;
						if ((Object)(object)<nearestOfficer>5__6 != (Object)null && <closestDistance>5__7 < Random.Range(10f, 30f))
						{
							try
							{
								<nearestOfficer>5__6.BeginFootPursuit_Networked(((NetworkBehaviour)<randomPlayer>5__4).NetworkObject, true);
								<randomPlayer>5__4.CrimeData.AddCrime((Crime)new PossessingHighSeverityDrug(), 60);
							}
							catch (Exception ex)
							{
								<ex>5__12 = ex;
							}
						}
						<randomPlayer>5__4 = null;
						<nearestOfficer>5__6 = null;
					}
					<players>5__3 = null;
					goto IL_0033;
				}
				IL_0033:
				<>2__current = (object)new WaitForSeconds(20f);
				<>1__state = 1;
				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 <DrugConsumedCoro>d__8 : IEnumerator<object>, IDisposable, IEnumerator
	{
		private int <>1__state;

		private object <>2__current;

		public Player player;

		public ProductItemInstance product;

		private WeedInstance <weed>5__1;

		private PoliceOfficer <noticeOfficer>5__2;

		private float <smallestDistance>5__3;

		private bool <apprehending>5__4;

		private PoliceOfficer[] <>s__5;

		private int <>s__6;

		private PoliceOfficer <offc>5__7;

		private float <distance>5__8;

		private int <i>5__9;

		private Vector3 <pos>5__10;

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

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

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

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

		private bool MoveNext()
		{
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Expected O, but got Unknown
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Expected O, but got Unknown
			//IL_03bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Expected O, but got Unknown
			//IL_041a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: 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_037c: Expected O, but got Unknown
			//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Expected O, but got Unknown
			//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03af: Expected O, but got Unknown
			//IL_043f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0456: Unknown result type (might be due to invalid IL or missing references)
			//IL_0460: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
			{
				<>1__state = -1;
				ref WeedInstance reference = ref <weed>5__1;
				ProductItemInstance obj = product;
				reference = (WeedInstance)(object)((obj is WeedInstance) ? obj : null);
				if (<weed>5__1 != null)
				{
					<>2__current = (object)new WaitForSeconds(2f);
					<>1__state = 1;
					return true;
				}
				<>2__current = null;
				<>1__state = 7;
				return true;
			}
			case 1:
				<>1__state = -1;
				<noticeOfficer>5__2 = null;
				<smallestDistance>5__3 = 20f;
				<>s__5 = officers;
				for (<>s__6 = 0; <>s__6 < <>s__5.Length; <>s__6++)
				{
					<offc>5__7 = <>s__5[<>s__6];
					<distance>5__8 = Vector3.Distance(((Component)<offc>5__7).transform.position, ((Component)player).transform.position);
					if (<distance>5__8 < 20f && <distance>5__8 < <smallestDistance>5__3 && ((NPC)<offc>5__7).Movement.CanMove() && !currentPIs.Contains(<offc>5__7) && !currentDrugApprehender.Contains(<offc>5__7) && currentDrugApprehender.Count < 1)
					{
						<smallestDistance>5__3 = <distance>5__8;
						<noticeOfficer>5__2 = <offc>5__7;
					}
					<offc>5__7 = null;
				}
				<>s__5 = null;
				if ((Object)(object)<noticeOfficer>5__2 == (Object)null)
				{
					<>2__current = null;
					<>1__state = 2;
					return true;
				}
				goto IL_01dc;
			case 2:
				<>1__state = -1;
				goto IL_01dc;
			case 3:
				<>1__state = -1;
				MelonCoroutines.Start(ApprehenderOfficerClear(<noticeOfficer>5__2));
				<apprehending>5__4 = false;
				if (((NPC)<noticeOfficer>5__2).awareness.VisionCone.IsPointWithinSight(((Component)player).transform.position, false, (LandVehicle)null))
				{
					<noticeOfficer>5__2.BeginBodySearch_Networked(((NetworkBehaviour)player).NetworkObject);
					player.CrimeData.AddCrime((Crime)new FailureToComply(), Random.Range(1, 30));
					<apprehending>5__4 = true;
				}
				if ((Object)(object)<noticeOfficer>5__2 != (Object)null && !<apprehending>5__4)
				{
					<i>5__9 = 0;
					goto IL_0483;
				}
				goto IL_049a;
			case 4:
				<>1__state = -1;
				if (((NPC)<noticeOfficer>5__2).awareness.VisionCone.IsPlayerVisible(player))
				{
					<noticeOfficer>5__2.BeginBodySearch_Networked(((NetworkBehaviour)player).NetworkObject);
					if (Random.Range(1f, 0f) > 0.8f)
					{
						player.CrimeData.AddCrime((Crime)new PossessingHighSeverityDrug(), Random.Range(1, 4));
					}
					if (Random.Range(1f, 0f) > 0.8f)
					{
						player.CrimeData.AddCrime((Crime)new Evading(), 1);
					}
					goto IL_049a;
				}
				<>2__current = (object)new WaitForSeconds(0.2f);
				<>1__state = 5;
				return true;
			case 5:
				<>1__state = -1;
				((NPC)<noticeOfficer>5__2).Movement.GetClosestReachablePoint(((Component)player).transform.position, ref <pos>5__10);
				if (((NPC)<noticeOfficer>5__2).Movement.CanMove() && ((NPC)<noticeOfficer>5__2).Movement.CanGetTo(<pos>5__10, 1f))
				{
					((NPC)<noticeOfficer>5__2).Movement.SetDestination(<pos>5__10);
					<>2__current = (object)new WaitForSeconds(0.6f);
					<>1__state = 6;
					return true;
				}
				goto IL_049a;
			case 6:
				<>1__state = -1;
				<i>5__9++;
				goto IL_0483;
			case 7:
				{
					<>1__state = -1;
					break;
				}
				IL_01dc:
				currentDrugApprehender.Add(<noticeOfficer>5__2);
				<>2__current = (object)new WaitForSeconds(<smallestDistance>5__3);
				<>1__state = 3;
				return true;
				IL_0483:
				if (<i>5__9 <= 15)
				{
					((NPC)<noticeOfficer>5__2).Movement.FacePoint(((Component)player).transform.position, 0.1f);
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 4;
					return true;
				}
				goto IL_049a;
				IL_049a:
				<noticeOfficer>5__2 = null;
				break;
			}
			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__11 : IEnumerator<object>, IDisposable, IEnumerator
	{
		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 PoliceOfficer <nearestOfficer>5__4;

		private float <minDistance>5__5;

		private Player[] <>s__6;

		private int <>s__7;

		private Player <player>5__8;

		private PoliceOfficer[] <>s__9;

		private int <>s__10;

		private PoliceOfficer <officer>5__11;

		private float <distance>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 <NearbyCrazyCop>d__11(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<players>5__3 = null;
			<nearestOfficer>5__4 = null;
			<>s__6 = null;
			<player>5__8 = null;
			<>s__9 = null;
			<officer>5__11 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Expected O, but got Unknown
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cb: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			//IL_033b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0347: Expected O, but got Unknown
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				goto IL_0045;
			case 1:
			{
				<>1__state = -1;
				(float, float) 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 = 2;
				return true;
			}
			case 2:
				<>1__state = -1;
				<players>5__3 = Object.FindObjectsOfType<Player>(true);
				<nearestOfficer>5__4 = null;
				<minDistance>5__5 = Random.Range(20f, 30f);
				<>s__6 = <players>5__3;
				<>s__7 = 0;
				goto IL_03b4;
			case 3:
				<>1__state = -1;
				((VOEmitter)<nearestOfficer>5__4.ChatterVO).Play((EVOLineType)13);
				((NPC)<nearestOfficer>5__4).Movement.FacePoint(((Component)<player>5__8).transform.position, 0.2f);
				<>2__current = (object)new WaitForSeconds(0.2f);
				<>1__state = 4;
				return true;
			case 4:
				{
					<>1__state = -1;
					if (((NPC)<nearestOfficer>5__4).awareness.VisionCone.IsPlayerVisible(<player>5__8))
					{
						<nearestOfficer>5__4.BeginBodySearch_Networked(((NetworkBehaviour)<player>5__8).NetworkObject);
						if (Random.Range(0f, 1f) > 0.8f)
						{
							<player>5__8.CrimeData.AddCrime((Crime)new FailureToComply(), 10);
						}
					}
					((VOEmitter)<nearestOfficer>5__4.ChatterVO).Play((EVOLineType)13);
					((NPC)<nearestOfficer>5__4).Movement.WalkSpeed = 2.4f;
					goto IL_0397;
				}
				IL_0397:
				<>s__9 = null;
				<player>5__8 = null;
				goto IL_03a6;
				IL_03a6:
				<>s__7++;
				goto IL_03b4;
				IL_03b4:
				if (<>s__7 < <>s__6.Length)
				{
					<player>5__8 = <>s__6[<>s__7];
					if ((Object)(object)<player>5__8.CurrentProperty != (Object)null)
					{
						goto IL_03a6;
					}
					<>s__9 = officers;
					for (<>s__10 = 0; <>s__10 < <>s__9.Length; <>s__10++)
					{
						<officer>5__11 = <>s__9[<>s__10];
						<distance>5__12 = Vector3.Distance(((Component)<officer>5__11).transform.position, ((Component)<player>5__8).transform.position);
						if (<distance>5__12 < <minDistance>5__5 && !currentPIs.Contains(<officer>5__11) && !currentDrugApprehender.Contains(<officer>5__11))
						{
							<nearestOfficer>5__4 = <officer>5__11;
							((NPC)<nearestOfficer>5__4).Movement.GetClosestReachablePoint(((Component)<player>5__8).transform.position, ref <pos>5__13);
							if (((NPC)<nearestOfficer>5__4).Movement.CanMove() && ((NPC)<nearestOfficer>5__4).Movement.CanGetTo(<pos>5__13, 1f))
							{
								((NPC)<nearestOfficer>5__4).Movement.WalkSpeed = 7f;
								((NPC)<nearestOfficer>5__4).Movement.SetDestination(<pos>5__13);
								<>2__current = (object)new WaitForSeconds(8f);
								<>1__state = 3;
								return true;
							}
							break;
						}
					}
					goto IL_0397;
				}
				<>s__6 = null;
				<players>5__3 = null;
				<nearestOfficer>5__4 = null;
				goto IL_0045;
				IL_0045:
				<>2__current = (object)new WaitForSeconds(20f);
				<>1__state = 1;
				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 <NearbyLethalCop>d__10 : IEnumerator<object>, IDisposable, IEnumerator
	{
		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 PoliceOfficer <nearestOfficer>5__4;

		private float <minDistance>5__5;

		private Player[] <>s__6;

		private int <>s__7;

		private Player <player>5__8;

		private PoliceOfficer[] <>s__9;

		private int <>s__10;

		private PoliceOfficer <officer>5__11;

		private float <distance>5__12;

		private Exception <ex>5__13;

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

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

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

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<players>5__3 = null;
			<nearestOfficer>5__4 = null;
			<>s__6 = null;
			<player>5__8 = null;
			<>s__9 = null;
			<officer>5__11 = null;
			<ex>5__13 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				goto IL_0033;
			case 1:
			{
				<>1__state = -1;
				(float, float) 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 = 2;
				return true;
			}
			case 2:
				{
					<>1__state = -1;
					<players>5__3 = Object.FindObjectsOfType<Player>(true);
					<nearestOfficer>5__4 = null;
					<minDistance>5__5 = Random.Range(4f, 8f);
					<>s__6 = <players>5__3;
					for (<>s__7 = 0; <>s__7 < <>s__6.Length; <>s__7++)
					{
						<player>5__8 = <>s__6[<>s__7];
						<>s__9 = officers;
						for (<>s__10 = 0; <>s__10 < <>s__9.Length; <>s__10++)
						{
							<officer>5__11 = <>s__9[<>s__10];
							<distance>5__12 = Vector3.Distance(((Component)<officer>5__11).transform.position, ((Component)<player>5__8).transform.position);
							if (<distance>5__12 < <minDistance>5__5 && !currentPIs.Contains(<officer>5__11) && !currentDrugApprehender.Contains(<officer>5__11))
							{
								<nearestOfficer>5__4 = <officer>5__11;
								try
								{
									<player>5__8.CrimeData.SetPursuitLevel((EPursuitLevel)4);
									<officer>5__11.BeginFootPursuit_Networked(((NetworkBehaviour)<player>5__8).NetworkObject, false);
								}
								catch (Exception ex)
								{
									<ex>5__13 = ex;
								}
								break;
							}
							<officer>5__11 = null;
						}
						<>s__9 = null;
						<player>5__8 = null;
					}
					<>s__6 = null;
					<players>5__3 = null;
					<nearestOfficer>5__4 = null;
					goto IL_0033;
				}
				IL_0033:
				<>2__current = (object)new WaitForSeconds(20f);
				<>1__state = 1;
				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 <PrivateInvestigator>d__12 : IEnumerator<object>, IDisposable, IEnumerator
	{
		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 Player <randomPlayer>5__5;

		private PoliceOfficer <randomOfficer>5__6;

		private EDay <currentDay>5__7;

		private AvatarSettings <orig>5__8;

		private List<LayerSetting> <bodySettings>5__9;

		private List<AccessorySetting> <accessorySettings>5__10;

		private LayerSetting <jeans>5__11;

		private LayerSetting <shirt>5__12;

		private AccessorySetting <cap>5__13;

		private AccessorySetting <blazer>5__14;

		private AccessorySetting <sneakers>5__15;

		private float <elapsed>5__16;

		private int <i>5__17;

		private float <distance>5__18;

		private float <xInitOffset>5__19;

		private float <zInitOffset>5__20;

		private Vector3 <targetWarpPosition>5__21;

		private Vector3 <warpInit>5__22;

		private int <i>5__23;

		private LayerSetting <layer>5__24;

		private int <i>5__25;

		private AccessorySetting <acc>5__26;

		private float <distance>5__27;

		private float <xOffset>5__28;

		private float <zOffset>5__29;

		private Vector3 <targetPosition>5__30;

		private Vector3 <pos>5__31;

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

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

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

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			<players>5__4 = null;
			<randomPlayer>5__5 = null;
			<randomOfficer>5__6 = null;
			<orig>5__8 = null;
			<bodySettings>5__9 = null;
			<accessorySettings>5__10 = null;
			<jeans>5__11 = default(LayerSetting);
			<shirt>5__12 = default(LayerSetting);
			<cap>5__13 = null;
			<blazer>5__14 = null;
			<sneakers>5__15 = null;
			<layer>5__24 = default(LayerSetting);
			<acc>5__26 = 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_0786: Unknown result type (might be due to invalid IL or missing references)
			//IL_0796: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Expected O, but got Unknown
			//IL_0119: 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_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0af9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b05: Unknown result type (might be due to invalid IL or missing references)
			//IL_095c: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_029b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a01: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a0c: Expected O, but got Unknown
			//IL_08e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0902: Unknown result type (might be due to invalid IL or missing references)
			//IL_0907: Unknown result type (might be due to invalid IL or missing references)
			//IL_0918: Unknown result type (might be due to invalid IL or missing references)
			//IL_0935: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a34: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a3f: Expected O, but got Unknown
			//IL_0448: Unknown result type (might be due to invalid IL or missing references)
			//IL_044d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0468: Unknown result type (might be due to invalid IL or missing references)
			//IL_046d: 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_074e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0758: Expected O, but got Unknown
			//IL_04fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0558: Unknown result type (might be due to invalid IL or missing references)
			//IL_055d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0587: Unknown result type (might be due to invalid IL or missing references)
			//IL_058c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0599: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05db: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_062f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0634: Unknown result type (might be due to invalid IL or missing references)
			//IL_0683: Unknown result type (might be due to invalid IL or missing references)
			//IL_0688: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_035a: 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_0375: Unknown result type (might be due to invalid IL or missing references)
			//IL_037a: Unknown result type (might be due to invalid IL or missing references)
			//IL_038b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
			(float, float) tuple;
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<>2__current = (object)new WaitForSeconds(20f);
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				<maxTime>5__1 = 180f;
				goto IL_0067;
			case 2:
				<>1__state = -1;
				<players>5__4 = Object.FindObjectsOfType<Player>(true);
				<randomPlayer>5__5 = <players>5__4[Random.Range(0, <players>5__4.Length)];
				<randomOfficer>5__6 = officers[Random.Range(0, officers.Length)];
				<i>5__17 = 0;
				while (<i>5__17 <= 4)
				{
					<distance>5__18 = Vector3.Distance(((Component)<randomOfficer>5__6).transform.position, ((Component)<randomPlayer>5__5).transform.position);
					if (<distance>5__18 < 60f)
					{
						break;
					}
					<randomOfficer>5__6 = officers[Random.Range(0, officers.Length)];
					<i>5__17++;
				}
				<currentDay>5__7 = NetworkSingleton<TimeManager>.Instance.CurrentDay;
				if (((object)(EDay)(ref <currentDay>5__7)).ToString().Contains("Saturday") || ((object)(EDay)(ref <currentDay>5__7)).ToString().Contains("Sunday") || currentPIs.Contains(<randomOfficer>5__6) || currentDrugApprehender.Contains(<randomOfficer>5__6) || currentPIs.Count >= 1)
				{
					goto IL_0067;
				}
				if (Object.op_Implicit((Object)(object)((NPC)<randomOfficer>5__6).behaviour.activeBehaviour))
				{
					((NPC)<randomOfficer>5__6).behaviour.activeBehaviour.SendEnd();
				}
				if (((NPC)<randomOfficer>5__6).isInBuilding)
				{
					((NPC)<randomOfficer>5__6).ExitBuilding("");
				}
				if (((NPC)<randomOfficer>5__6).IsInVehicle)
				{
					((NPC)<randomOfficer>5__6).ExitVehicle();
				}
				if (Vector3.Distance(((Component)<randomOfficer>5__6).transform.position, ((Component)<randomPlayer>5__5).transform.position) > 30f)
				{
					<xInitOffset>5__19 = Random.Range(20f, 30f);
					<zInitOffset>5__20 = Random.Range(20f, 30f);
					<xInitOffset>5__19 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
					<zInitOffset>5__20 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
					<targetWarpPosition>5__21 = ((Component)<randomPlayer>5__5).transform.position + new Vector3(<xInitOffset>5__19, 0f, <zInitOffset>5__20);
					((NPC)<randomOfficer>5__6).Movement.GetClosestReachablePoint(<targetWarpPosition>5__21, ref <warpInit>5__22);
					((NPC)<randomOfficer>5__6).Movement.Warp(<warpInit>5__22);
				}
				((NPC)<randomOfficer>5__6).Movement.WalkSpeed = 3f;
				currentPIs.Add(<randomOfficer>5__6);
				<orig>5__8 = <>4__this.DeepCopyAvatarSettings(((NPC)<randomOfficer>5__6).Avatar.CurrentSettings);
				<bodySettings>5__9 = ((NPC)<randomOfficer>5__6).Avatar.CurrentSettings.BodyLayerSettings;
				<accessorySettings>5__10 = ((NPC)<randomOfficer>5__6).Avatar.CurrentSettings.AccessorySettings;
				<i>5__23 = 0;
				while (<i>5__23 < <bodySettings>5__9.Count)
				{
					<layer>5__24 = <bodySettings>5__9[<i>5__23];
					<layer>5__24.layerPath = "";
					<layer>5__24.layerTint = Color.white;
					<bodySettings>5__9[<i>5__23] = <layer>5__24;
					<layer>5__24 = default(LayerSetting);
					<i>5__23++;
				}
				<i>5__25 = 0;
				while (<i>5__25 < <accessorySettings>5__10.Count)
				{
					<acc>5__26 = <accessorySettings>5__10[<i>5__25];
					<acc>5__26.path = "";
					<acc>5__26.color = Color.white;
					<accessorySettings>5__10[<i>5__25] = <acc>5__26;
					<acc>5__26 = null;
					<i>5__25++;
				}
				<jeans>5__11 = <bodySettings>5__9[2];
				<jeans>5__11.layerPath = "Avatar/Layers/Bottom/Jeans";
				<jeans>5__11.layerTint = new Color(0.396f, 0.396f, 0.396f);
				<bodySettings>5__9[2] = <jeans>5__11;
				<shirt>5__12 = <bodySettings>5__9[3];
				<shirt>5__12.layerPath = "Avatar/Layers/Top/RolledButtonUp";
				<shirt>5__12.layerTint = new Color(0.326f, 0.578f, 0.896f);
				<bodySettings>5__9[3] = <shirt>5__12;
				<cap>5__13 = <accessorySettings>5__10[0];
				<cap>5__13.path = "Avatar/Accessories/Head/Cap/Cap";
				<cap>5__13.color = new Color(0.613f, 0.493f, 0.344f);
				<accessorySettings>5__10[0] = <cap>5__13;
				<blazer>5__14 = <accessorySettings>5__10[1];
				<blazer>5__14.path = "Avatar/Accessories/Chest/Blazer/Blazer";
				<blazer>5__14.color = new Color(0.613f, 0.493f, 0.344f);
				<accessorySettings>5__10[1] = <blazer>5__14;
				<sneakers>5__15 = <accessorySettings>5__10[2];
				<sneakers>5__15.path = "Avatar/Accessories/Feet/Sneakers/Sneakers";
				<sneakers>5__15.color = new Color(0.151f, 0.151f, 0.151f);
				<accessorySettings>5__10[2] = <sneakers>5__15;
				((NPC)<randomOfficer>5__6).Avatar.ApplyBodyLayerSettings(((NPC)<randomOfficer>5__6).Avatar.CurrentSettings, -1);
				((NPC)<randomOfficer>5__6).Avatar.ApplyAccessorySettings(((NPC)<randomOfficer>5__6).Avatar.CurrentSettings);
				<elapsed>5__16 = 0f;
				break;
			case 3:
				{
					<>1__state = -1;
					<elapsed>5__16 += 5f;
					<distance>5__27 = Vector3.Distance(((Component)<randomOfficer>5__6).transform.position, ((Component)<randomPlayer>5__5).transform.position);
					if (((NPC)<randomOfficer>5__6).Movement.CanMove() && !(<elapsed>5__16 >= <maxTime>5__1))
					{
						((NPC)<randomOfficer>5__6).behaviour.activeBehaviour = null;
						if (((NPC)<randomOfficer>5__6).Movement.CanGetTo(((Component)<randomPlayer>5__5).transform.position, 100f) && <distance>5__27 >= 20f)
						{
							if (((NPC)<randomOfficer>5__6).Movement.IsPaused)
							{
								((NPC)<randomOfficer>5__6).Movement.ResumeMovement();
							}
							<xOffset>5__28 = Random.Range(8f, 14f);
							<zOffset>5__29 = Random.Range(8f, 14f);
							<xOffset>5__28 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
							<zOffset>5__29 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
							<targetPosition>5__30 = ((Component)<randomPlayer>5__5).transform.position + new Vector3(<xOffset>5__28, 0f, <zOffset>5__29);
							((NPC)<randomOfficer>5__6).Movement.GetClosestReachablePoint(<targetPosition>5__30, ref <pos>5__31);
							((NPC)<randomOfficer>5__6).Movement.SetDestination(<pos>5__31);
							break;
						}
						if (((NPC)<randomOfficer>5__6).Movement.CanGetTo(((Component)<randomPlayer>5__5).transform.position, 100f) && <distance>5__27 <= 20f)
						{
							if (!((NPC)<randomOfficer>5__6).Movement.IsPaused)
							{
								((NPC)<randomOfficer>5__6).Movement.PauseMovement();
							}
							((NPC)<randomOfficer>5__6).Movement.FacePoint(((Component)<randomPlayer>5__5).transform.position, 0.9f);
							if (Random.Range(0f, 1f) > 0.95f)
							{
								<randomPlayer>5__5.CrimeData.AddCrime((Crime)new DrugTrafficking(), 1);
							}
							if (Random.Range(0f, 1f) > 0.95f)
							{
								<randomPlayer>5__5.CrimeData.AddCrime((Crime)new AttemptingToSell(), 1);
							}
							break;
						}
					}
					if (((NPC)<randomOfficer>5__6).Movement.IsPaused)
					{
						((NPC)<randomOfficer>5__6).Movement.ResumeMovement();
					}
					((NPC)<randomOfficer>5__6).Movement.WalkSpeed = 2.4f;
					((NPC)<randomOfficer>5__6).Avatar.ApplyBodyLayerSettings(<orig>5__8, -1);
					((NPC)<randomOfficer>5__6).Avatar.ApplyAccessorySettings(<orig>5__8);
					currentPIs.Remove(<randomOfficer>5__6);
					<players>5__4 = null;
					<randomPlayer>5__5 = null;
					<randomOfficer>5__6 = null;
					<orig>5__8 = null;
					<bodySettings>5__9 = null;
					<accessorySettings>5__10 = null;
					<jeans>5__11 = default(LayerSetting);
					<shirt>5__12 = default(LayerSetting);
					<cap>5__13 = null;
					<blazer>5__14 = null;
					<sneakers>5__15 = null;
					goto IL_0067;
				}
				IL_0067:
				tuple = ThresholdUtils.Evaluate(ThresholdMappings.PIThres, (int)NetworkSingleton<MoneyManager>.Instance.LifetimeEarnings);
				<min>5__2 = tuple.Item1;
				<max>5__3 = tuple.Item2;
				<>2__current = (object)new WaitForSeconds(Random.Range(<min>5__2, <max>5__3));
				<>1__state = 2;
				return true;
			}
			<>2__current = (object)new WaitForSeconds(5f);
			<>1__state = 3;
			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 <SetOfficers>d__14 : IEnumerator<object>, IDisposable, IEnumerator
	{
		private int <>1__state;

		private object <>2__current;

		public NACops <>4__this;

		private PoliceOfficer[] <>s__1;

		private int <>s__2;

		private PoliceOfficer <officer>5__3;

		private BodySearchBehaviour <bodySearch>5__4;

		private PoliceOfficer[] <>s__5;

		private int <>s__6;

		private PoliceOfficer <officer>5__7;

		private AvatarRangedWeapon <rangedWeapon>5__8;

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

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

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

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<>s__1 = null;
			<officer>5__3 = null;
			<bodySearch>5__4 = null;
			<>s__5 = null;
			<officer>5__7 = null;
			<rangedWeapon>5__8 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Expected O, but got Unknown
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Expected O, but got Unknown
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<>2__current = (object)new WaitForSeconds(20f);
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				<>s__1 = officers;
				<>s__2 = 0;
				goto IL_00e6;
			case 2:
				<>1__state = -1;
				<bodySearch>5__4 = ((Component)<officer>5__3).GetComponent<BodySearchBehaviour>();
				<>4__this.OverrideBodySearchEscalation(<bodySearch>5__4);
				<bodySearch>5__4 = null;
				<officer>5__3 = null;
				<>s__2++;
				goto IL_00e6;
			case 3:
			{
				<>1__state = -1;
				<officer>5__7.Leniency = 0.1f;
				<officer>5__7.Suspicion = 1f;
				((NPC)<officer>5__7).OverrideAggression(1f);
				<officer>5__7.BodySearchDuration = 20f;
				<officer>5__7.BodySearchChance = 1f;
				((NPC)<officer>5__7).Movement.RunSpeed = 9f;
				((NPC)<officer>5__7).Movement.WalkSpeed = 2.4f;
				((NPC)<officer>5__7).behaviour.CombatBehaviour.GiveUpRange = 40f;
				((NPC)<officer>5__7).behaviour.CombatBehaviour.GiveUpTime = 60f;
				((NPC)<officer>5__7).behaviour.CombatBehaviour.DefaultSearchTime = 60f;
				((NPC)<officer>5__7).behaviour.CombatBehaviour.DefaultMovementSpeed = 9f;
				((NPC)<officer>5__7).behaviour.CombatBehaviour.GiveUpAfterSuccessfulHits = 40;
				((NPC)<officer>5__7).Health.MaxHealth = 175f;
				((NPC)<officer>5__7).Health.Revive();
				ref AvatarRangedWeapon reference = ref <rangedWeapon>5__8;
				AvatarEquippable gunPrefab = <officer>5__7.GunPrefab;
				reference = (AvatarRangedWeapon)(object)((gunPrefab is AvatarRangedWeapon) ? gunPrefab : null);
				if ((Object)(object)<rangedWeapon>5__8 != (Object)null)
				{
					<rangedWeapon>5__8.CanShootWhileMoving = true;
					<rangedWeapon>5__8.MagazineSize = 20;
					<rangedWeapon>5__8.MaxFireRate = 0.1f;
					((AvatarWeapon)<rangedWeapon>5__8).MaxUseRange = 20f;
					<rangedWeapon>5__8.ReloadTime = 0.5f;
					<rangedWeapon>5__8.RaiseTime = 0.2f;
					<rangedWeapon>5__8.HitChange_MaxRange = 0.3f;
					<rangedWeapon>5__8.HitChange_MinRange = 0.8f;
				}
				<rangedWeapon>5__8 = null;
				<officer>5__7 = null;
				<>s__6++;
				goto IL_032e;
			}
			case 4:
				{
					<>1__state = -1;
					return false;
				}
				IL_032e:
				if (<>s__6 < <>s__5.Length)
				{
					<officer>5__7 = <>s__5[<>s__6];
					<>2__current = (object)new WaitForSeconds(0.05f);
					<>1__state = 3;
					return true;
				}
				<>s__5 = null;
				<>2__current = null;
				<>1__state = 4;
				return true;
				IL_00e6:
				if (<>s__2 < <>s__1.Length)
				{
					<officer>5__3 = <>s__1[<>s__2];
					<>2__current = (object)new WaitForSeconds(0.05f);
					<>1__state = 2;
					return true;
				}
				<>s__1 = null;
				<>s__5 = officers;
				<>s__6 = 0;
				goto IL_032e;
			}
		}

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

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

	private static Harmony harmonyInstance;

	private static PoliceOfficer[] officers;

	public static List<object> coros = new List<object>();

	public static HashSet<PoliceOfficer> currentPIs = new HashSet<PoliceOfficer>();

	public static HashSet<PoliceOfficer> currentDrugApprehender = new HashSet<PoliceOfficer>();

	public override void OnApplicationStart()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Expected O, but got Unknown
		harmonyInstance = new Harmony("NACopsV1");
		harmonyInstance.PatchAll(Assembly.GetExecutingAssembly());
	}

	public override void OnSceneWasInitialized(int buildIndex, string sceneName)
	{
		if (buildIndex == 1)
		{
			officers = Object.FindObjectsOfType<PoliceOfficer>(true);
			coros.Add(MelonCoroutines.Start(SetOfficers()));
			coros.Add(MelonCoroutines.Start(CrazyCops()));
			coros.Add(MelonCoroutines.Start(NearbyCrazyCop()));
			coros.Add(MelonCoroutines.Start(NearbyLethalCop()));
			coros.Add(MelonCoroutines.Start(PrivateInvestigator()));
			return;
		}
		foreach (object coro in coros)
		{
			MelonCoroutines.Stop(coro);
		}
		coros.Clear();
		currentPIs.Clear();
		currentDrugApprehender.Clear();
	}

	[IteratorStateMachine(typeof(<DrugConsumedCoro>d__8))]
	private static IEnumerator DrugConsumedCoro(Player player, ProductItemInstance product)
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <DrugConsumedCoro>d__8(0)
		{
			player = player,
			product = product
		};
	}

	[IteratorStateMachine(typeof(<ApprehenderOfficerClear>d__9))]
	private static IEnumerator ApprehenderOfficerClear(PoliceOfficer offc)
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <ApprehenderOfficerClear>d__9(0)
		{
			offc = offc
		};
	}

	[IteratorStateMachine(typeof(<NearbyLethalCop>d__10))]
	private IEnumerator NearbyLethalCop()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <NearbyLethalCop>d__10(0)
		{
			<>4__this = this
		};
	}

	[IteratorStateMachine(typeof(<NearbyCrazyCop>d__11))]
	private IEnumerator NearbyCrazyCop()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <NearbyCrazyCop>d__11(0)
		{
			<>4__this = this
		};
	}

	[IteratorStateMachine(typeof(<PrivateInvestigator>d__12))]
	private IEnumerator PrivateInvestigator()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <PrivateInvestigator>d__12(0)
		{
			<>4__this = this
		};
	}

	[IteratorStateMachine(typeof(<CrazyCops>d__13))]
	private IEnumerator CrazyCops()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <CrazyCops>d__13(0)
		{
			<>4__this = this
		};
	}

	[IteratorStateMachine(typeof(<SetOfficers>d__14))]
	private IEnumerator SetOfficers()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <SetOfficers>d__14(0)
		{
			<>4__this = this
		};
	}

	private AvatarSettings DeepCopyAvatarSettings(AvatarSettings original)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		AvatarSettings val = new AvatarSettings();
		val.BodyLayerSettings = original.BodyLayerSettings.Select(delegate(LayerSetting layer)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			LayerSetting result = default(LayerSetting);
			result.layerPath = layer.layerPath;
			result.layerTint = layer.layerTint;
			return result;
		}).ToList();
		val.AccessorySettings = ((IEnumerable<AccessorySetting>)original.AccessorySettings).Select((Func<AccessorySetting, AccessorySetting>)((AccessorySetting acc) => new AccessorySetting
		{
			path = acc.path,
			color = acc.color
		})).ToList();
		return val;
	}

	private void OverrideBodySearchEscalation(BodySearchBehaviour bodySearch)
	{
		if ((Object)(object)bodySearch == (Object)null)
		{
			return;
		}
		try
		{
			FieldInfo field = typeof(BodySearchBehaviour).GetField("timeOutsideRange", BindingFlags.Instance | BindingFlags.NonPublic);
			if (field != null)
			{
				field.SetValue(bodySearch, 30f);
			}
			FieldInfo field2 = typeof(BodySearchBehaviour).GetField("targetDistanceOnStart", BindingFlags.Instance | BindingFlags.NonPublic);
			if (field2 != null)
			{
				float num = (float)field2.GetValue(bodySearch);
				field2.SetValue(bodySearch, num + 30f);
			}
		}
		catch (Exception)
		{
		}
	}
}

NACopsV1-IL2Cpp.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using HarmonyLib;
using Il2CppFishNet.Object;
using Il2CppInterop.Runtime.InteropTypes;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppScheduleOne.AvatarFramework;
using Il2CppScheduleOne.AvatarFramework.Equipping;
using Il2CppScheduleOne.DevUtilities;
using Il2CppScheduleOne.GameTime;
using Il2CppScheduleOne.Law;
using Il2CppScheduleOne.Money;
using Il2CppScheduleOne.NPCs;
using Il2CppScheduleOne.NPCs.Behaviour;
using Il2CppScheduleOne.PlayerScripts;
using Il2CppScheduleOne.Police;
using Il2CppScheduleOne.Product;
using Il2CppScheduleOne.Vehicles;
using Il2CppScheduleOne.VoiceOver;
using Il2CppSystem.Collections.Generic;
using MelonLoader;
using NACopsV1_IL2Cpp;
using UnityEngine;

[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.5", "XOWithSauce", null)]
[assembly: MelonColor]
[assembly: MelonOptionalDependencies(new string[] { "FishNet.Runtime" })]
[assembly: MelonGame("TVGS", "Schedule I")]
[assembly: HarmonyDontPatchAll]
[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.5";

	public const string DownloadLink = null;
}
public class NACops : MelonMod
{
	[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;
		}
	}

	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, 20f, 50f),
			new MinMaxThreshold(5, 14f, 40f),
			new MinMaxThreshold(10, 10f, 30f),
			new MinMaxThreshold(20, 9f, 30f),
			new MinMaxThreshold(30, 8f, 20f),
			new MinMaxThreshold(40, 8f, 20f),
			new MinMaxThreshold(50, 8f, 20f)
		};

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

		public static readonly List<MinMaxThreshold> NearbyCrazThres = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(0, 600f, 960f),
			new MinMaxThreshold(5, 400f, 960f),
			new MinMaxThreshold(10, 100f, 600f),
			new MinMaxThreshold(20, 90f, 600f),
			new MinMaxThreshold(30, 90f, 500f),
			new MinMaxThreshold(40, 90f, 450f),
			new MinMaxThreshold(50, 60f, 300f)
		};

		public static readonly List<MinMaxThreshold> PIThres = new List<MinMaxThreshold>
		{
			new MinMaxThreshold(100, 300f, 400f),
			new MinMaxThreshold(1000, 200f, 400f),
			new MinMaxThreshold(10000, 100f, 400f),
			new MinMaxThreshold(30000, 90f, 300f),
			new MinMaxThreshold(60000, 90f, 200f),
			new MinMaxThreshold(100000, 90f, 200f),
			new MinMaxThreshold(300000, 90f, 200f)
		};
	}

	[CompilerGenerated]
	private sealed class <ApprehenderOfficerClear>d__9 : 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__9(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

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

		private bool MoveNext()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<>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 <CrazyCops>d__13 : 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[] <>s__8;

		private int <>s__9;

		private PoliceOfficer <officer>5__10;

		private float <distance>5__11;

		private Exception <ex>5__12;

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

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

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

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<players>5__3 = null;
			<randomPlayer>5__4 = null;
			<nearestOfficer>5__6 = null;
			<>s__8 = null;
			<officer>5__10 = null;
			<ex>5__12 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_026a: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				goto IL_0033;
			case 1:
			{
				<>1__state = -1;
				(float, float) 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 = 2;
				return true;
			}
			case 2:
				{
					<>1__state = -1;
					<players>5__3 = Il2CppArrayBase<Player>.op_Implicit(Object.FindObjectsOfType<Player>(true));
					if (officers.Length != 0 && <players>5__3.Length != 0)
					{
						<randomPlayer>5__4 = <players>5__3[Random.Range(0, <players>5__3.Length)];
						if ((Object)(object)<randomPlayer>5__4.CurrentProperty != (Object)null)
						{
							goto IL_0033;
						}
						<playerPosition>5__5 = ((Component)<randomPlayer>5__4).transform.position;
						<nearestOfficer>5__6 = null;
						<closestDistance>5__7 = 100f;
						<>s__8 = officers;
						for (<>s__9 = 0; <>s__9 < <>s__8.Length; <>s__9++)
						{
							<officer>5__10 = <>s__8[<>s__9];
							<distance>5__11 = Vector3.Distance(((Component)<officer>5__10).transform.position, <playerPosition>5__5);
							if (<distance>5__11 < <closestDistance>5__7 && !currentPIs.Contains(<officer>5__10) && !currentDrugApprehender.Contains(<officer>5__10))
							{
								<closestDistance>5__7 = <distance>5__11;
								<nearestOfficer>5__6 = <officer>5__10;
							}
							<officer>5__10 = null;
						}
						<>s__8 = null;
						if ((Object)(object)<nearestOfficer>5__6 != (Object)null && <closestDistance>5__7 < Random.Range(10f, 30f))
						{
							try
							{
								<nearestOfficer>5__6.BeginFootPursuit_Networked(((NetworkBehaviour)<randomPlayer>5__4).NetworkObject, true);
								<randomPlayer>5__4.CrimeData.AddCrime((Crime)new PossessingHighSeverityDrug(), 60);
							}
							catch (Exception ex)
							{
								<ex>5__12 = ex;
							}
						}
						<randomPlayer>5__4 = null;
						<nearestOfficer>5__6 = null;
					}
					<players>5__3 = null;
					goto IL_0033;
				}
				IL_0033:
				<>2__current = (object)new WaitForSeconds(20f);
				<>1__state = 1;
				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 <DrugConsumedCoro>d__8 : 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 <noticeOfficer>5__2;

		private float <smallestDistance>5__3;

		private bool <apprehending>5__4;

		private int <i>5__5;

		private PoliceOfficer <offc>5__6;

		private float <distance>5__7;

		private int <i>5__8;

		private Vector3 <pos>5__9;

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

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

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

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

		private bool MoveNext()
		{
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e7: 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_01fa: Expected O, but got Unknown
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Expected O, but got Unknown
			//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c1: Expected O, but got Unknown
			//IL_0416: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0367: Unknown result type (might be due to invalid IL or missing references)
			//IL_0378: Expected O, but got Unknown
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f4: Expected O, but got Unknown
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Expected O, but got Unknown
			//IL_03a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ab: Expected O, but got Unknown
			//IL_043b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0452: Unknown result type (might be due to invalid IL or missing references)
			//IL_045c: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
			{
				<>1__state = -1;
				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;
				}
				<>2__current = null;
				<>1__state = 7;
				return true;
			}
			case 1:
				<>1__state = -1;
				<noticeOfficer>5__2 = null;
				<smallestDistance>5__3 = 20f;
				<i>5__5 = 0;
				while (<i>5__5 < officers.Length)
				{
					<offc>5__6 = officers[<i>5__5];
					<distance>5__7 = Vector3.Distance(((Component)<offc>5__6).transform.position, ((Component)player).transform.position);
					if (<distance>5__7 < 20f && <distance>5__7 < <smallestDistance>5__3 && ((NPC)<offc>5__6).Movement.CanMove() && !currentPIs.Contains(<offc>5__6) && !currentDrugApprehender.Contains(<offc>5__6) && currentDrugApprehender.Count < 1)
					{
						<smallestDistance>5__3 = <distance>5__7;
						<noticeOfficer>5__2 = <offc>5__6;
					}
					<offc>5__6 = null;
					<i>5__5++;
				}
				if ((Object)(object)<noticeOfficer>5__2 == (Object)null)
				{
					<>2__current = null;
					<>1__state = 2;
					return true;
				}
				goto IL_01d8;
			case 2:
				<>1__state = -1;
				goto IL_01d8;
			case 3:
				<>1__state = -1;
				MelonCoroutines.Start(ApprehenderOfficerClear(<noticeOfficer>5__2));
				<apprehending>5__4 = false;
				if (((NPC)<noticeOfficer>5__2).awareness.VisionCone.IsPointWithinSight(((Component)player).transform.position, false, (LandVehicle)null))
				{
					<noticeOfficer>5__2.BeginBodySearch_Networked(((NetworkBehaviour)player).NetworkObject);
					player.CrimeData.AddCrime((Crime)new FailureToComply(), Random.Range(1, 30));
					<apprehending>5__4 = true;
				}
				if ((Object)(object)<noticeOfficer>5__2 != (Object)null && !<apprehending>5__4)
				{
					<i>5__8 = 0;
					goto IL_047d;
				}
				goto IL_0494;
			case 4:
				<>1__state = -1;
				if (((NPC)<noticeOfficer>5__2).awareness.VisionCone.IsPlayerVisible(player))
				{
					<noticeOfficer>5__2.BeginBodySearch_Networked(((NetworkBehaviour)player).NetworkObject);
					if (Random.Range(1f, 0f) > 0.8f)
					{
						player.CrimeData.AddCrime((Crime)new PossessingHighSeverityDrug(), Random.Range(1, 4));
					}
					if (Random.Range(1f, 0f) > 0.8f)
					{
						player.CrimeData.AddCrime((Crime)new Evading(), 1);
					}
					goto IL_0494;
				}
				<>2__current = (object)new WaitForSeconds(0.2f);
				<>1__state = 5;
				return true;
			case 5:
				<>1__state = -1;
				((NPC)<noticeOfficer>5__2).Movement.GetClosestReachablePoint(((Component)player).transform.position, ref <pos>5__9);
				if (((NPC)<noticeOfficer>5__2).Movement.CanMove() && ((NPC)<noticeOfficer>5__2).Movement.CanGetTo(<pos>5__9, 1f))
				{
					((NPC)<noticeOfficer>5__2).Movement.SetDestination(<pos>5__9);
					<>2__current = (object)new WaitForSeconds(0.6f);
					<>1__state = 6;
					return true;
				}
				goto IL_0494;
			case 6:
				<>1__state = -1;
				<i>5__8++;
				goto IL_047d;
			case 7:
				{
					<>1__state = -1;
					break;
				}
				IL_01d8:
				currentDrugApprehender.Add(<noticeOfficer>5__2);
				<>2__current = (object)new WaitForSeconds(<smallestDistance>5__3);
				<>1__state = 3;
				return true;
				IL_047d:
				if (<i>5__8 <= 15)
				{
					((NPC)<noticeOfficer>5__2).Movement.FacePoint(((Component)player).transform.position, 0.1f);
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 4;
					return true;
				}
				goto IL_0494;
				IL_0494:
				<noticeOfficer>5__2 = null;
				break;
			}
			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__11 : 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 PoliceOfficer <nearestOfficer>5__4;

		private float <minDistance>5__5;

		private Player[] <>s__6;

		private int <>s__7;

		private Player <player>5__8;

		private PoliceOfficer[] <>s__9;

		private int <>s__10;

		private PoliceOfficer <officer>5__11;

		private float <distance>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 <NearbyCrazyCop>d__11(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<players>5__3 = null;
			<nearestOfficer>5__4 = null;
			<>s__6 = null;
			<player>5__8 = null;
			<>s__9 = null;
			<officer>5__11 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Expected O, but got Unknown
			//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			//IL_034d: Expected O, but got Unknown
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0278: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				goto IL_0045;
			case 1:
			{
				<>1__state = -1;
				(float, float) 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 = 2;
				return true;
			}
			case 2:
				<>1__state = -1;
				<players>5__3 = Il2CppArrayBase<Player>.op_Implicit(Object.FindObjectsOfType<Player>(true));
				<nearestOfficer>5__4 = null;
				<minDistance>5__5 = Random.Range(20f, 30f);
				<>s__6 = <players>5__3;
				<>s__7 = 0;
				goto IL_03bb;
			case 3:
				<>1__state = -1;
				((VOEmitter)<nearestOfficer>5__4.ChatterVO).Play((EVOLineType)13);
				((NPC)<nearestOfficer>5__4).Movement.FacePoint(((Component)<player>5__8).transform.position, 0.2f);
				<>2__current = (object)new WaitForSeconds(0.2f);
				<>1__state = 4;
				return true;
			case 4:
				{
					<>1__state = -1;
					if (((NPC)<nearestOfficer>5__4).awareness.VisionCone.IsPlayerVisible(<player>5__8))
					{
						<nearestOfficer>5__4.BeginBodySearch_Networked(((NetworkBehaviour)<player>5__8).NetworkObject);
						if (Random.Range(0f, 1f) > 0.8f)
						{
							<player>5__8.CrimeData.AddCrime((Crime)new FailureToComply(), 10);
						}
					}
					((VOEmitter)<nearestOfficer>5__4.ChatterVO).Play((EVOLineType)13);
					((NPC)<nearestOfficer>5__4).Movement.WalkSpeed = 2.4f;
					goto IL_039e;
				}
				IL_039e:
				<>s__9 = null;
				<player>5__8 = null;
				goto IL_03ad;
				IL_03ad:
				<>s__7++;
				goto IL_03bb;
				IL_03bb:
				if (<>s__7 < <>s__6.Length)
				{
					<player>5__8 = <>s__6[<>s__7];
					if ((Object)(object)<player>5__8.CurrentProperty != (Object)null)
					{
						goto IL_03ad;
					}
					<>s__9 = officers;
					for (<>s__10 = 0; <>s__10 < <>s__9.Length; <>s__10++)
					{
						<officer>5__11 = <>s__9[<>s__10];
						<distance>5__12 = Vector3.Distance(((Component)<officer>5__11).transform.position, ((Component)<player>5__8).transform.position);
						if (<distance>5__12 < <minDistance>5__5 && !currentPIs.Contains(<officer>5__11) && !currentDrugApprehender.Contains(<officer>5__11))
						{
							<nearestOfficer>5__4 = <officer>5__11;
							((NPC)<nearestOfficer>5__4).Movement.GetClosestReachablePoint(((Component)<player>5__8).transform.position, ref <pos>5__13);
							if (((NPC)<nearestOfficer>5__4).Movement.CanMove() && ((NPC)<nearestOfficer>5__4).Movement.CanGetTo(<pos>5__13, 1f))
							{
								((NPC)<nearestOfficer>5__4).Movement.WalkSpeed = 7f;
								((NPC)<nearestOfficer>5__4).Movement.SetDestination(<pos>5__13);
								<>2__current = (object)new WaitForSeconds(8f);
								<>1__state = 3;
								return true;
							}
							break;
						}
					}
					goto IL_039e;
				}
				<>s__6 = null;
				<players>5__3 = null;
				<nearestOfficer>5__4 = null;
				goto IL_0045;
				IL_0045:
				<>2__current = (object)new WaitForSeconds(20f);
				<>1__state = 1;
				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 <NearbyLethalCop>d__10 : 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 PoliceOfficer <nearestOfficer>5__4;

		private float <minDistance>5__5;

		private Player[] <>s__6;

		private int <>s__7;

		private Player <player>5__8;

		private PoliceOfficer[] <>s__9;

		private int <>s__10;

		private PoliceOfficer <officer>5__11;

		private float <distance>5__12;

		private Exception <ex>5__13;

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

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

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

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<players>5__3 = null;
			<nearestOfficer>5__4 = null;
			<>s__6 = null;
			<player>5__8 = null;
			<>s__9 = null;
			<officer>5__11 = null;
			<ex>5__13 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				goto IL_0033;
			case 1:
			{
				<>1__state = -1;
				(float, float) 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 = 2;
				return true;
			}
			case 2:
				{
					<>1__state = -1;
					<players>5__3 = Il2CppArrayBase<Player>.op_Implicit(Object.FindObjectsOfType<Player>(true));
					<nearestOfficer>5__4 = null;
					<minDistance>5__5 = Random.Range(4f, 8f);
					<>s__6 = <players>5__3;
					for (<>s__7 = 0; <>s__7 < <>s__6.Length; <>s__7++)
					{
						<player>5__8 = <>s__6[<>s__7];
						<>s__9 = officers;
						for (<>s__10 = 0; <>s__10 < <>s__9.Length; <>s__10++)
						{
							<officer>5__11 = <>s__9[<>s__10];
							<distance>5__12 = Vector3.Distance(((Component)<officer>5__11).transform.position, ((Component)<player>5__8).transform.position);
							if (<distance>5__12 < <minDistance>5__5 && !currentPIs.Contains(<officer>5__11) && !currentDrugApprehender.Contains(<officer>5__11))
							{
								<nearestOfficer>5__4 = <officer>5__11;
								try
								{
									<player>5__8.CrimeData.SetPursuitLevel((EPursuitLevel)4);
									<officer>5__11.BeginFootPursuit_Networked(((NetworkBehaviour)<player>5__8).NetworkObject, false);
								}
								catch (Exception ex)
								{
									<ex>5__13 = ex;
								}
								break;
							}
							<officer>5__11 = null;
						}
						<>s__9 = null;
						<player>5__8 = null;
					}
					<>s__6 = null;
					<players>5__3 = null;
					<nearestOfficer>5__4 = null;
					goto IL_0033;
				}
				IL_0033:
				<>2__current = (object)new WaitForSeconds(20f);
				<>1__state = 1;
				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 <PrivateInvestigator>d__12 : 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 Player <randomPlayer>5__5;

		private PoliceOfficer <randomOfficer>5__6;

		private EDay <currentDay>5__7;

		private AvatarSettings <orig>5__8;

		private List<LayerSetting> <bodySettings>5__9;

		private List<AccessorySetting> <accessorySettings>5__10;

		private LayerSetting <jeans>5__11;

		private LayerSetting <shirt>5__12;

		private AccessorySetting <cap>5__13;

		private AccessorySetting <blazer>5__14;

		private AccessorySetting <sneakers>5__15;

		private float <elapsed>5__16;

		private int <i>5__17;

		private float <distance>5__18;

		private float <xInitOffset>5__19;

		private float <zInitOffset>5__20;

		private Vector3 <targetWarpPosition>5__21;

		private Vector3 <warpInit>5__22;

		private int <i>5__23;

		private LayerSetting <layer>5__24;

		private int <i>5__25;

		private AccessorySetting <acc>5__26;

		private float <distance>5__27;

		private float <xOffset>5__28;

		private float <zOffset>5__29;

		private Vector3 <targetPosition>5__30;

		private Vector3 <pos>5__31;

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

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

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

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<players>5__4 = null;
			<randomPlayer>5__5 = null;
			<randomOfficer>5__6 = null;
			<orig>5__8 = null;
			<bodySettings>5__9 = null;
			<accessorySettings>5__10 = null;
			<jeans>5__11 = null;
			<shirt>5__12 = null;
			<cap>5__13 = null;
			<blazer>5__14 = null;
			<sneakers>5__15 = null;
			<layer>5__24 = null;
			<acc>5__26 = 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_0795: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Expected O, but got Unknown
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_080d: Unknown result type (might be due to invalid IL or missing references)
			//IL_096b: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d9: 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_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a10: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1b: Expected O, but got Unknown
			//IL_08f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_090c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0911: Unknown result type (might be due to invalid IL or missing references)
			//IL_0916: Unknown result type (might be due to invalid IL or missing references)
			//IL_0927: Unknown result type (might be due to invalid IL or missing references)
			//IL_0944: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a43: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4e: Expected O, but got Unknown
			//IL_046f: Unknown result type (might be due to invalid IL or missing references)
			//IL_075d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0767: Expected O, but got Unknown
			//IL_04fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_058d: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0639: Unknown result type (might be due to invalid IL or missing references)
			//IL_068f: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_035f: 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)
			//IL_037a: Unknown result type (might be due to invalid IL or missing references)
			//IL_037f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0390: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
			(float, float) tuple;
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<>2__current = (object)new WaitForSeconds(20f);
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				<maxTime>5__1 = 180f;
				goto IL_0067;
			case 2:
				<>1__state = -1;
				<players>5__4 = Il2CppArrayBase<Player>.op_Implicit(Object.FindObjectsOfType<Player>(true));
				<randomPlayer>5__5 = <players>5__4[Random.Range(0, <players>5__4.Length)];
				<randomOfficer>5__6 = officers[Random.Range(0, officers.Length)];
				<i>5__17 = 0;
				while (<i>5__17 <= 4)
				{
					<distance>5__18 = Vector3.Distance(((Component)<randomOfficer>5__6).transform.position, ((Component)<randomPlayer>5__5).transform.position);
					if (<distance>5__18 < 60f)
					{
						break;
					}
					<randomOfficer>5__6 = officers[Random.Range(0, officers.Length)];
					<i>5__17++;
				}
				<currentDay>5__7 = NetworkSingleton<TimeManager>.Instance.CurrentDay;
				if (((object)(EDay)(ref <currentDay>5__7)).ToString().Contains("Saturday") || ((object)(EDay)(ref <currentDay>5__7)).ToString().Contains("Sunday") || currentPIs.Contains(<randomOfficer>5__6) || currentDrugApprehender.Contains(<randomOfficer>5__6) || currentPIs.Count >= 1)
				{
					goto IL_0067;
				}
				if (Object.op_Implicit((Object)(object)((NPC)<randomOfficer>5__6).behaviour.activeBehaviour))
				{
					((NPC)<randomOfficer>5__6).behaviour.activeBehaviour.SendEnd();
				}
				if (((NPC)<randomOfficer>5__6).isInBuilding)
				{
					((NPC)<randomOfficer>5__6).ExitBuilding("");
				}
				if (((NPC)<randomOfficer>5__6).IsInVehicle)
				{
					((NPC)<randomOfficer>5__6).ExitVehicle();
				}
				if (Vector3.Distance(((Component)<randomOfficer>5__6).transform.position, ((Component)<randomPlayer>5__5).transform.position) > 30f)
				{
					<xInitOffset>5__19 = Random.Range(20f, 30f);
					<zInitOffset>5__20 = Random.Range(20f, 30f);
					<xInitOffset>5__19 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
					<zInitOffset>5__20 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
					<targetWarpPosition>5__21 = ((Component)<randomPlayer>5__5).transform.position + new Vector3(<xInitOffset>5__19, 0f, <zInitOffset>5__20);
					((NPC)<randomOfficer>5__6).Movement.GetClosestReachablePoint(<targetWarpPosition>5__21, ref <warpInit>5__22);
					((NPC)<randomOfficer>5__6).Movement.Warp(<warpInit>5__22);
				}
				((NPC)<randomOfficer>5__6).Movement.WalkSpeed = 3f;
				currentPIs.Add(<randomOfficer>5__6);
				<orig>5__8 = <>4__this.DeepCopyAvatarSettings(((NPC)<randomOfficer>5__6).Avatar.CurrentSettings);
				<bodySettings>5__9 = ((NPC)<randomOfficer>5__6).Avatar.CurrentSettings.BodyLayerSettings;
				<accessorySettings>5__10 = ((NPC)<randomOfficer>5__6).Avatar.CurrentSettings.AccessorySettings;
				<i>5__23 = 0;
				while (<i>5__23 < <bodySettings>5__9.Count)
				{
					<layer>5__24 = <bodySettings>5__9[<i>5__23];
					<layer>5__24.layerPath = "";
					<layer>5__24.layerTint = Color.white;
					<bodySettings>5__9[<i>5__23] = <layer>5__24;
					<layer>5__24 = null;
					<i>5__23++;
				}
				<i>5__25 = 0;
				while (<i>5__25 < <accessorySettings>5__10.Count)
				{
					<acc>5__26 = <accessorySettings>5__10[<i>5__25];
					<acc>5__26.path = "";
					<acc>5__26.color = Color.white;
					<accessorySettings>5__10[<i>5__25] = <acc>5__26;
					<acc>5__26 = null;
					<i>5__25++;
				}
				<jeans>5__11 = <bodySettings>5__9[2];
				<jeans>5__11.layerPath = "Avatar/Layers/Bottom/Jeans";
				<jeans>5__11.layerTint = new Color(0.396f, 0.396f, 0.396f);
				<bodySettings>5__9[2] = <jeans>5__11;
				<shirt>5__12 = <bodySettings>5__9[3];
				<shirt>5__12.layerPath = "Avatar/Layers/Top/RolledButtonUp";
				<shirt>5__12.layerTint = new Color(0.326f, 0.578f, 0.896f);
				<bodySettings>5__9[3] = <shirt>5__12;
				<cap>5__13 = <accessorySettings>5__10[0];
				<cap>5__13.path = "Avatar/Accessories/Head/Cap/Cap";
				<cap>5__13.color = new Color(0.613f, 0.493f, 0.344f);
				<accessorySettings>5__10[0] = <cap>5__13;
				<blazer>5__14 = <accessorySettings>5__10[1];
				<blazer>5__14.path = "Avatar/Accessories/Chest/Blazer/Blazer";
				<blazer>5__14.color = new Color(0.613f, 0.493f, 0.344f);
				<accessorySettings>5__10[1] = <blazer>5__14;
				<sneakers>5__15 = <accessorySettings>5__10[2];
				<sneakers>5__15.path = "Avatar/Accessories/Feet/Sneakers/Sneakers";
				<sneakers>5__15.color = new Color(0.151f, 0.151f, 0.151f);
				<accessorySettings>5__10[2] = <sneakers>5__15;
				((NPC)<randomOfficer>5__6).Avatar.ApplyBodyLayerSettings(((NPC)<randomOfficer>5__6).Avatar.CurrentSettings, -1);
				((NPC)<randomOfficer>5__6).Avatar.ApplyAccessorySettings(((NPC)<randomOfficer>5__6).Avatar.CurrentSettings);
				<elapsed>5__16 = 0f;
				break;
			case 3:
				{
					<>1__state = -1;
					<elapsed>5__16 += 5f;
					<distance>5__27 = Vector3.Distance(((Component)<randomOfficer>5__6).transform.position, ((Component)<randomPlayer>5__5).transform.position);
					if (((NPC)<randomOfficer>5__6).Movement.CanMove() && !(<elapsed>5__16 >= <maxTime>5__1))
					{
						((NPC)<randomOfficer>5__6).behaviour.activeBehaviour = null;
						if (((NPC)<randomOfficer>5__6).Movement.CanGetTo(((Component)<randomPlayer>5__5).transform.position, 100f) && <distance>5__27 >= 20f)
						{
							if (((NPC)<randomOfficer>5__6).Movement.IsPaused)
							{
								((NPC)<randomOfficer>5__6).Movement.ResumeMovement();
							}
							<xOffset>5__28 = Random.Range(8f, 14f);
							<zOffset>5__29 = Random.Range(8f, 14f);
							<xOffset>5__28 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
							<zOffset>5__29 *= ((Random.Range(0f, 1f) > 0.5f) ? 1f : (-1f));
							<targetPosition>5__30 = ((Component)<randomPlayer>5__5).transform.position + new Vector3(<xOffset>5__28, 0f, <zOffset>5__29);
							((NPC)<randomOfficer>5__6).Movement.GetClosestReachablePoint(<targetPosition>5__30, ref <pos>5__31);
							((NPC)<randomOfficer>5__6).Movement.SetDestination(<pos>5__31);
							break;
						}
						if (((NPC)<randomOfficer>5__6).Movement.CanGetTo(((Component)<randomPlayer>5__5).transform.position, 100f) && <distance>5__27 <= 20f)
						{
							if (!((NPC)<randomOfficer>5__6).Movement.IsPaused)
							{
								((NPC)<randomOfficer>5__6).Movement.PauseMovement();
							}
							((NPC)<randomOfficer>5__6).Movement.FacePoint(((Component)<randomPlayer>5__5).transform.position, 0.9f);
							if (Random.Range(0f, 1f) > 0.95f)
							{
								<randomPlayer>5__5.CrimeData.AddCrime((Crime)new DrugTrafficking(), 1);
							}
							if (Random.Range(0f, 1f) > 0.95f)
							{
								<randomPlayer>5__5.CrimeData.AddCrime((Crime)new AttemptingToSell(), 1);
							}
							break;
						}
					}
					if (((NPC)<randomOfficer>5__6).Movement.IsPaused)
					{
						((NPC)<randomOfficer>5__6).Movement.ResumeMovement();
					}
					((NPC)<randomOfficer>5__6).Movement.WalkSpeed = 2.4f;
					((NPC)<randomOfficer>5__6).Avatar.ApplyBodyLayerSettings(<orig>5__8, -1);
					((NPC)<randomOfficer>5__6).Avatar.ApplyAccessorySettings(<orig>5__8);
					currentPIs.Remove(<randomOfficer>5__6);
					<players>5__4 = null;
					<randomPlayer>5__5 = null;
					<randomOfficer>5__6 = null;
					<orig>5__8 = null;
					<bodySettings>5__9 = null;
					<accessorySettings>5__10 = null;
					<jeans>5__11 = null;
					<shirt>5__12 = null;
					<cap>5__13 = null;
					<blazer>5__14 = null;
					<sneakers>5__15 = null;
					goto IL_0067;
				}
				IL_0067:
				tuple = ThresholdUtils.Evaluate(ThresholdMappings.PIThres, (int)NetworkSingleton<MoneyManager>.Instance.LifetimeEarnings);
				<min>5__2 = tuple.Item1;
				<max>5__3 = tuple.Item2;
				<>2__current = (object)new WaitForSeconds(Random.Range(<min>5__2, <max>5__3));
				<>1__state = 2;
				return true;
			}
			<>2__current = (object)new WaitForSeconds(5f);
			<>1__state = 3;
			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 <SetOfficers>d__14 : IEnumerator<object>, IEnumerator, IDisposable
	{
		private int <>1__state;

		private object <>2__current;

		public NACops <>4__this;

		private PoliceOfficer[] <>s__1;

		private int <>s__2;

		private PoliceOfficer <officer>5__3;

		private BodySearchBehaviour <bodySearch>5__4;

		private PoliceOfficer[] <>s__5;

		private int <>s__6;

		private PoliceOfficer <officer>5__7;

		private AvatarEquippable <gun>5__8;

		private AvatarRangedWeapon <rangedWeapon>5__9;

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

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

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

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<>s__1 = null;
			<officer>5__3 = null;
			<bodySearch>5__4 = null;
			<>s__5 = null;
			<officer>5__7 = null;
			<gun>5__8 = null;
			<rangedWeapon>5__9 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Expected O, but got Unknown
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Expected O, but got Unknown
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<>2__current = (object)new WaitForSeconds(20f);
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				<>s__1 = officers;
				<>s__2 = 0;
				goto IL_00e6;
			case 2:
				<>1__state = -1;
				<bodySearch>5__4 = ((Component)<officer>5__3).GetComponent<BodySearchBehaviour>();
				<>4__this.OverrideBodySearchEscalation(<bodySearch>5__4);
				<bodySearch>5__4 = null;
				<officer>5__3 = null;
				<>s__2++;
				goto IL_00e6;
			case 3:
				<>1__state = -1;
				<officer>5__7.Leniency = 0.1f;
				<officer>5__7.Suspicion = 1f;
				((NPC)<officer>5__7).OverrideAggression(1f);
				<officer>5__7.BodySearchDuration = 20f;
				<officer>5__7.BodySearchChance = 1f;
				((NPC)<officer>5__7).Movement.RunSpeed = 9f;
				((NPC)<officer>5__7).Movement.WalkSpeed = 2.4f;
				((NPC)<officer>5__7).behaviour.CombatBehaviour.GiveUpRange = 40f;
				((NPC)<officer>5__7).behaviour.CombatBehaviour.GiveUpTime = 60f;
				((NPC)<officer>5__7).behaviour.CombatBehaviour.DefaultSearchTime = 60f;
				((NPC)<officer>5__7).behaviour.CombatBehaviour.DefaultMovementSpeed = 9f;
				((NPC)<officer>5__7).behaviour.CombatBehaviour.GiveUpAfterSuccessfulHits = 40;
				((NPC)<officer>5__7).Health.MaxHealth = 175f;
				((NPC)<officer>5__7).Health.Revive();
				<gun>5__8 = <officer>5__7.GunPrefab;
				if ((Object)(object)<gun>5__8 != (Object)null)
				{
					AvatarEquippable obj = <gun>5__8;
					<rangedWeapon>5__9 = ((obj != null) ? ((Il2CppObjectBase)obj).Cast<AvatarRangedWeapon>() : null);
					if (<rangedWeapon>5__9 != null)
					{
						<rangedWeapon>5__9.CanShootWhileMoving = true;
						<rangedWeapon>5__9.MagazineSize = 20;
						<rangedWeapon>5__9.MaxFireRate = 0.1f;
						((AvatarWeapon)<rangedWeapon>5__9).MaxUseRange = 20f;
						<rangedWeapon>5__9.ReloadTime = 0.5f;
						<rangedWeapon>5__9.RaiseTime = 0.2f;
						<rangedWeapon>5__9.HitChange_MaxRange = 0.3f;
						<rangedWeapon>5__9.HitChange_MinRange = 0.8f;
					}
				}
				<gun>5__8 = null;
				<rangedWeapon>5__9 = null;
				<officer>5__7 = null;
				<>s__6++;
				goto IL_036d;
			case 4:
				{
					<>1__state = -1;
					return false;
				}
				IL_036d:
				if (<>s__6 < <>s__5.Length)
				{
					<officer>5__7 = <>s__5[<>s__6];
					<>2__current = (object)new WaitForSeconds(0.05f);
					<>1__state = 3;
					return true;
				}
				<>s__5 = null;
				<>2__current = null;
				<>1__state = 4;
				return true;
				IL_00e6:
				if (<>s__2 < <>s__1.Length)
				{
					<officer>5__3 = <>s__1[<>s__2];
					<>2__current = (object)new WaitForSeconds(0.05f);
					<>1__state = 2;
					return true;
				}
				<>s__1 = null;
				<>s__5 = officers;
				<>s__6 = 0;
				goto IL_036d;
			}
		}

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

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

	private static Harmony harmonyInstance;

	private static PoliceOfficer[] officers;

	public static List<object> coros = new List<object>();

	public static HashSet<PoliceOfficer> currentPIs = new HashSet<PoliceOfficer>();

	public static HashSet<PoliceOfficer> currentDrugApprehender = new HashSet<PoliceOfficer>();

	public override void OnApplicationStart()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Expected O, but got Unknown
		harmonyInstance = new Harmony("NACopsV1-IL2Cpp");
		harmonyInstance.PatchAll(Assembly.GetExecutingAssembly());
	}

	public override void OnSceneWasInitialized(int buildIndex, string sceneName)
	{
		if (buildIndex == 1)
		{
			officers = Il2CppArrayBase<PoliceOfficer>.op_Implicit(Object.FindObjectsOfType<PoliceOfficer>(true));
			coros.Add(MelonCoroutines.Start(SetOfficers()));
			coros.Add(MelonCoroutines.Start(CrazyCops()));
			coros.Add(MelonCoroutines.Start(NearbyCrazyCop()));
			coros.Add(MelonCoroutines.Start(NearbyLethalCop()));
			coros.Add(MelonCoroutines.Start(PrivateInvestigator()));
			return;
		}
		foreach (object coro in coros)
		{
			MelonCoroutines.Stop(coro);
		}
		coros.Clear();
		currentPIs.Clear();
		currentDrugApprehender.Clear();
	}

	[IteratorStateMachine(typeof(<DrugConsumedCoro>d__8))]
	private static IEnumerator DrugConsumedCoro(Player player, ProductItemInstance product)
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <DrugConsumedCoro>d__8(0)
		{
			player = player,
			product = product
		};
	}

	[IteratorStateMachine(typeof(<ApprehenderOfficerClear>d__9))]
	private static IEnumerator ApprehenderOfficerClear(PoliceOfficer offc)
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <ApprehenderOfficerClear>d__9(0)
		{
			offc = offc
		};
	}

	[IteratorStateMachine(typeof(<NearbyLethalCop>d__10))]
	private IEnumerator NearbyLethalCop()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <NearbyLethalCop>d__10(0)
		{
			<>4__this = this
		};
	}

	[IteratorStateMachine(typeof(<NearbyCrazyCop>d__11))]
	private IEnumerator NearbyCrazyCop()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <NearbyCrazyCop>d__11(0)
		{
			<>4__this = this
		};
	}

	[IteratorStateMachine(typeof(<PrivateInvestigator>d__12))]
	private IEnumerator PrivateInvestigator()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <PrivateInvestigator>d__12(0)
		{
			<>4__this = this
		};
	}

	[IteratorStateMachine(typeof(<CrazyCops>d__13))]
	private IEnumerator CrazyCops()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <CrazyCops>d__13(0)
		{
			<>4__this = this
		};
	}

	[IteratorStateMachine(typeof(<SetOfficers>d__14))]
	private IEnumerator SetOfficers()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <SetOfficers>d__14(0)
		{
			<>4__this = this
		};
	}

	private AvatarSettings DeepCopyAvatarSettings(AvatarSettings original)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Expected O, but got Unknown
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Expected O, but got Unknown
		AvatarSettings val = new AvatarSettings();
		val.BodyLayerSettings = new List<LayerSetting>();
		Enumerator<LayerSetting> enumerator = original.BodyLayerSettings.GetEnumerator();
		while (enumerator.MoveNext())
		{
			LayerSetting current = enumerator.Current;
			val.BodyLayerSettings.Add(new LayerSetting
			{
				layerPath = current.layerPath,
				layerTint = current.layerTint
			});
		}
		val.AccessorySettings = new List<AccessorySetting>();
		Enumerator<AccessorySetting> enumerator2 = original.AccessorySettings.GetEnumerator();
		while (enumerator2.MoveNext())
		{
			AccessorySetting current2 = enumerator2.Current;
			val.AccessorySettings.Add(new AccessorySetting
			{
				path = current2.path,
				color = current2.color
			});
		}
		return val;
	}

	private void OverrideBodySearchEscalation(BodySearchBehaviour bodySearch)
	{
		if ((Object)(object)bodySearch == (Object)null)
		{
			return;
		}
		try
		{
			FieldInfo field = typeof(BodySearchBehaviour).GetField("timeOutsideRange", BindingFlags.Instance | BindingFlags.NonPublic);
			if (field != null)
			{
				field.SetValue(bodySearch, 30f);
			}
			FieldInfo field2 = typeof(BodySearchBehaviour).GetField("targetDistanceOnStart", BindingFlags.Instance | BindingFlags.NonPublic);
			if (field2 != null)
			{
				float num = (float)field2.GetValue(bodySearch);
				field2.SetValue(bodySearch, num + 30f);
			}
		}
		catch (Exception)
		{
		}
	}
}