Decompiled source of UglyMenu v1.0.0

ModMenu.dll

Decompiled 6 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using HarmonyLib;
using Il2CppFishNet.Connection;
using Il2CppFishNet.Object;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppScheduleOne;
using Il2CppScheduleOne.Avatar.Player;
using Il2CppScheduleOne.AvatarFramework.Animation;
using Il2CppScheduleOne.Building;
using Il2CppScheduleOne.Building.Doors;
using Il2CppScheduleOne.Cartel;
using Il2CppScheduleOne.Casino;
using Il2CppScheduleOne.Clothing;
using Il2CppScheduleOne.Combat;
using Il2CppScheduleOne.Core.Items.Framework;
using Il2CppScheduleOne.DevUtilities;
using Il2CppScheduleOne.Dialogue;
using Il2CppScheduleOne.Doors;
using Il2CppScheduleOne.Economy;
using Il2CppScheduleOne.Effects;
using Il2CppScheduleOne.Employees;
using Il2CppScheduleOne.EntityFramework;
using Il2CppScheduleOne.Equipping;
using Il2CppScheduleOne.Growing;
using Il2CppScheduleOne.Interaction;
using Il2CppScheduleOne.ItemFramework;
using Il2CppScheduleOne.Levelling;
using Il2CppScheduleOne.Management;
using Il2CppScheduleOne.Map;
using Il2CppScheduleOne.Money;
using Il2CppScheduleOne.NPCs;
using Il2CppScheduleOne.NPCs.Behaviour;
using Il2CppScheduleOne.NPCs.Schedules;
using Il2CppScheduleOne.Networking;
using Il2CppScheduleOne.ObjectScripts;
using Il2CppScheduleOne.Packaging;
using Il2CppScheduleOne.Persistence;
using Il2CppScheduleOne.Persistence.Datas;
using Il2CppScheduleOne.PlayerScripts;
using Il2CppScheduleOne.PlayerScripts.Health;
using Il2CppScheduleOne.Police;
using Il2CppScheduleOne.Product;
using Il2CppScheduleOne.Product.Packaging;
using Il2CppScheduleOne.Property;
using Il2CppScheduleOne.Quests;
using Il2CppScheduleOne.Storage;
using Il2CppScheduleOne.Tiles;
using Il2CppScheduleOne.Tools;
using Il2CppScheduleOne.Trash;
using Il2CppScheduleOne.UI;
using Il2CppScheduleOne.UI.Management;
using Il2CppScheduleOne.UI.Phone.Map;
using Il2CppScheduleOne.UI.Phone.ProductManagerApp;
using Il2CppScheduleOne.UI.Shop;
using Il2CppScheduleOne.Variables;
using Il2CppScheduleOne.Vehicles;
using Il2CppScheduleOne.Vision;
using Il2CppScheduleOne.VoiceOver;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using MelonLoader;
using MelonLoader.Utils;
using Microsoft.CodeAnalysis;
using Schedule1NastyStyle;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(Schedule1MenuMod), "ModMenu v1", "1.0.0", "CHATGPT", null)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyVersion("0.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace Schedule1NastyStyle
{
	internal static class EmployeeAssignmentCompat
	{
		private sealed class Swap
		{
			internal BuildableItem Item;

			internal Property Original;
		}

		private static bool installed;

		private static Harmony harmony;

		private static ManagementWorldspaceCanvas managementCanvas;

		private static float nextCanvasLookup;

		internal static void ResetManagementStateCache()
		{
			managementCanvas = null;
			nextCanvasLookup = 0f;
		}

		internal static void Install()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			if (installed)
			{
				return;
			}
			installed = true;
			try
			{
				harmony = new Harmony("schedule1nastystyle.employee.assignment.crossproperty");
				PatchBuildableValidation(typeof(ObjectFieldUI));
				PatchBuildableValidation(typeof(ObjectListFieldUI));
				PatchBuildableSelection(typeof(ObjectFieldUI), "ObjectSelected");
				PatchBuildableSelection(typeof(ObjectFieldUI), "ObjectsSelected");
				PatchBuildableSelection(typeof(ObjectListFieldUI), "ObjectSelected");
				PatchBuildableSelection(typeof(ObjectListFieldUI), "ObjectsSelected");
				PatchWrongPropertyValidator(typeof(ObjectSelector), "IsObjectTypeValid");
				PatchWrongPropertyValidator(typeof(EmployeeHome), "IsBuildableEntityAValidEmployeeHome");
				PatchWrongPropertyValidator(typeof(BotanistConfiguration), "IsStationValid");
				PatchWrongPropertyValidator(typeof(ChemistConfiguration), "IsStationValid");
				PatchWrongPropertyValidator(typeof(CleanerConfiguration), "IsObjValid");
				PatchWrongPropertyValidator(typeof(PackagerConfiguration), "IsStationValid");
			}
			catch
			{
			}
		}

		private static void PatchBuildableValidation(Type type)
		{
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: 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_00ef: Expected O, but got Unknown
			//IL_00ef: Expected O, but got Unknown
			if (type == null || harmony == null)
			{
				return;
			}
			try
			{
				MethodInfo methodInfo = AccessTools.Method(typeof(EmployeeAssignmentCompat), "PropertySwapPrefix", (Type[])null, (Type[])null);
				MethodInfo methodInfo2 = AccessTools.Method(typeof(EmployeeAssignmentCompat), "ObjectValidPostfix", (Type[])null, (Type[])null);
				MethodInfo methodInfo3 = AccessTools.Method(typeof(EmployeeAssignmentCompat), "PropertyRestoreFinalizer", (Type[])null, (Type[])null);
				if (methodInfo == null || methodInfo2 == null)
				{
					return;
				}
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
				int num = 0;
				while (methods != null && num < methods.Length)
				{
					MethodInfo methodInfo4 = methods[num];
					if (!(methodInfo4 == null) && !(methodInfo4.Name != "ObjectValid"))
					{
						ParameterInfo[] parameters = methodInfo4.GetParameters();
						if (parameters != null && parameters.Length >= 1 && IsBuildableParameter(parameters[0].ParameterType))
						{
							harmony.Patch((MethodBase)methodInfo4, new HarmonyMethod(methodInfo), new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (methodInfo3 == null) ? ((HarmonyMethod)null) : new HarmonyMethod(methodInfo3), (HarmonyMethod)null);
						}
					}
					num++;
				}
			}
			catch
			{
			}
		}

		private static void PatchBuildableSelection(Type type, string methodName)
		{
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Expected O, but got Unknown
			//IL_00f3: Expected O, but got Unknown
			if (type == null || harmony == null || string.IsNullOrWhiteSpace(methodName))
			{
				return;
			}
			try
			{
				MethodInfo methodInfo = AccessTools.Method(typeof(EmployeeAssignmentCompat), "PropertySwapPrefix", (Type[])null, (Type[])null);
				MethodInfo methodInfo2 = AccessTools.Method(typeof(EmployeeAssignmentCompat), "PropertyRestorePostfix", (Type[])null, (Type[])null);
				MethodInfo methodInfo3 = AccessTools.Method(typeof(EmployeeAssignmentCompat), "PropertyRestoreFinalizer", (Type[])null, (Type[])null);
				if (methodInfo == null || methodInfo2 == null)
				{
					return;
				}
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
				int num = 0;
				while (methods != null && num < methods.Length)
				{
					MethodInfo methodInfo4 = methods[num];
					if (!(methodInfo4 == null) && !(methodInfo4.Name != methodName))
					{
						ParameterInfo[] parameters = methodInfo4.GetParameters();
						if (parameters != null && parameters.Length >= 1 && ParameterContainsBuildable(parameters[0].ParameterType))
						{
							harmony.Patch((MethodBase)methodInfo4, new HarmonyMethod(methodInfo), new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (methodInfo3 == null) ? ((HarmonyMethod)null) : new HarmonyMethod(methodInfo3), (HarmonyMethod)null);
						}
					}
					num++;
				}
			}
			catch
			{
			}
		}

		private static bool IsBuildableParameter(Type type)
		{
			if (type == null)
			{
				return false;
			}
			try
			{
				if (type == typeof(BuildableItem))
				{
					return true;
				}
				if (typeof(BuildableItem).IsAssignableFrom(type))
				{
					return true;
				}
			}
			catch
			{
			}
			return (type.FullName ?? type.Name ?? string.Empty).IndexOf("BuildableItem", StringComparison.OrdinalIgnoreCase) >= 0;
		}

		private static bool ParameterContainsBuildable(Type type)
		{
			if (IsBuildableParameter(type))
			{
				return true;
			}
			if (type == null)
			{
				return false;
			}
			try
			{
				if (type.IsGenericType)
				{
					Type[] genericArguments = type.GetGenericArguments();
					int num = 0;
					while (genericArguments != null && num < genericArguments.Length)
					{
						if (IsBuildableParameter(genericArguments[num]))
						{
							return true;
						}
						num++;
					}
				}
			}
			catch
			{
			}
			return (type.FullName ?? type.Name ?? string.Empty).IndexOf("BuildableItem", StringComparison.OrdinalIgnoreCase) >= 0;
		}

		private static void PropertySwapPrefix(object __instance, object[] __args, out List<Swap> __state)
		{
			__state = null;
			Property currentManagementProperty = GetCurrentManagementProperty(__instance);
			if (!((Object)(object)currentManagementProperty == (Object)null) && __args != null)
			{
				List<Swap> list = new List<Swap>();
				for (int i = 0; i < __args.Length; i++)
				{
					CollectAndSwap(__args[i], currentManagementProperty, list);
				}
				if (list.Count > 0)
				{
					__state = list;
				}
			}
		}

		private static void ObjectValidPostfix(ref bool __result, ref string reason, List<Swap> __state)
		{
			Restore(__state);
			if (!__result && IsWrongPropertyReason(reason))
			{
				__result = true;
				reason = string.Empty;
			}
		}

		private static void WrongPropertyValidationPostfix(ref bool __result, ref string reason)
		{
			if (!__result && IsWrongPropertyReason(reason))
			{
				__result = true;
				reason = string.Empty;
			}
		}

		private static void PatchWrongPropertyValidator(Type type, string methodName)
		{
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Expected O, but got Unknown
			if (type == null || harmony == null || string.IsNullOrWhiteSpace(methodName))
			{
				return;
			}
			try
			{
				MethodInfo methodInfo = AccessTools.Method(typeof(EmployeeAssignmentCompat), "WrongPropertyValidationPostfix", (Type[])null, (Type[])null);
				if (methodInfo == null)
				{
					return;
				}
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
				int num = 0;
				while (methods != null && num < methods.Length)
				{
					MethodInfo methodInfo2 = methods[num];
					if (!(methodInfo2 == null) && !(methodInfo2.Name != methodName) && !(methodInfo2.ReturnType != typeof(bool)))
					{
						ParameterInfo[] parameters = methodInfo2.GetParameters();
						if (parameters != null && parameters.Length == 2 && IsBuildableParameter(parameters[0].ParameterType))
						{
							Type parameterType = parameters[1].ParameterType;
							if (parameterType.IsByRef && !(parameterType.GetElementType() != typeof(string)))
							{
								harmony.Patch((MethodBase)methodInfo2, (HarmonyMethod)null, new HarmonyMethod(methodInfo), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
							}
						}
					}
					num++;
				}
			}
			catch
			{
			}
		}

		private static void PropertyRestorePostfix(List<Swap> __state)
		{
			Restore(__state);
		}

		private static Exception PropertyRestoreFinalizer(Exception __exception, List<Swap> __state)
		{
			Restore(__state);
			return __exception;
		}

		private static bool IsWrongPropertyReason(string reason)
		{
			if (string.IsNullOrWhiteSpace(reason))
			{
				return false;
			}
			string text = reason.Replace("_", " ").Replace("-", " ").Trim();
			if (text.IndexOf("wrong property", StringComparison.OrdinalIgnoreCase) < 0 && text.IndexOf("different property", StringComparison.OrdinalIgnoreCase) < 0)
			{
				if (text.IndexOf("property", StringComparison.OrdinalIgnoreCase) >= 0)
				{
					return text.IndexOf("same", StringComparison.OrdinalIgnoreCase) >= 0;
				}
				return false;
			}
			return true;
		}

		private static void CollectAndSwap(object value, Property targetProperty, List<Swap> swaps)
		{
			if (value == null || (Object)(object)targetProperty == (Object)null || swaps == null)
			{
				return;
			}
			BuildableItem val = (BuildableItem)((value is BuildableItem) ? value : null);
			if ((Object)(object)val != (Object)null)
			{
				SwapOne(val, targetProperty, swaps);
				return;
			}
			try
			{
				PropertyInfo property = value.GetType().GetProperty("Count", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
				MethodInfo method = value.GetType().GetMethod("get_Item", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[1] { typeof(int) }, null);
				if (property != null && method != null)
				{
					int num = Convert.ToInt32(property.GetValue(value, null));
					if (num > 256)
					{
						num = 256;
					}
					for (int i = 0; i < num; i++)
					{
						object obj = null;
						try
						{
							obj = method.Invoke(value, new object[1] { i });
						}
						catch
						{
						}
						BuildableItem val2 = (BuildableItem)((obj is BuildableItem) ? obj : null);
						if ((Object)(object)val2 != (Object)null)
						{
							SwapOne(val2, targetProperty, swaps);
						}
					}
					return;
				}
			}
			catch
			{
			}
			try
			{
				if (!(value is IEnumerable enumerable))
				{
					return;
				}
				int num2 = 0;
				foreach (object item in enumerable)
				{
					if (++num2 <= 256)
					{
						BuildableItem val3 = (BuildableItem)((item is BuildableItem) ? item : null);
						if ((Object)(object)val3 != (Object)null)
						{
							SwapOne(val3, targetProperty, swaps);
						}
						continue;
					}
					break;
				}
			}
			catch
			{
			}
		}

		private static void SwapOne(BuildableItem item, Property targetProperty, List<Swap> swaps)
		{
			if (!((Object)(object)item == (Object)null) && !((Object)(object)targetProperty == (Object)null))
			{
				Property val = null;
				try
				{
					val = item.ParentProperty;
				}
				catch
				{
				}
				if (!SameProperty(val, targetProperty) && TrySetParentProperty(item, targetProperty))
				{
					swaps.Add(new Swap
					{
						Item = item,
						Original = val
					});
				}
			}
		}

		private static void Restore(List<Swap> swaps)
		{
			if (swaps == null || swaps.Count == 0)
			{
				return;
			}
			for (int num = swaps.Count - 1; num >= 0; num--)
			{
				Swap swap = swaps[num];
				if (swap != null && !((Object)(object)swap.Item == (Object)null))
				{
					TrySetParentProperty(swap.Item, swap.Original);
				}
			}
			try
			{
				swaps.Clear();
			}
			catch
			{
			}
		}

		private static bool SameProperty(Property a, Property b)
		{
			if ((Object)(object)a == (Object)null || (Object)(object)b == (Object)null)
			{
				if ((Object)(object)a == (Object)null)
				{
					return (Object)(object)b == (Object)null;
				}
				return false;
			}
			try
			{
				return ((Il2CppObjectBase)a).Pointer == ((Il2CppObjectBase)b).Pointer;
			}
			catch
			{
				return a == b;
			}
		}

		private static bool TrySetParentProperty(BuildableItem item, Property property)
		{
			if ((Object)(object)item == (Object)null)
			{
				return false;
			}
			try
			{
				item.ParentProperty = property;
				if (SameProperty(item.ParentProperty, property))
				{
					return true;
				}
			}
			catch
			{
			}
			try
			{
				PropertyInfo property2 = ((object)item).GetType().GetProperty("ParentProperty", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
				MethodInfo methodInfo = ((property2 == null) ? null : property2.GetSetMethod(nonPublic: true));
				if (methodInfo != null)
				{
					methodInfo.Invoke(item, new object[1] { property });
					return true;
				}
			}
			catch
			{
			}
			try
			{
				FieldInfo fieldInfo = ((object)item).GetType().GetField("_ParentProperty_k__BackingField", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) ?? ((object)item).GetType().GetField("<ParentProperty>k__BackingField", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
				if (fieldInfo != null)
				{
					fieldInfo.SetValue(item, property);
					return true;
				}
			}
			catch
			{
			}
			try
			{
				MethodInfo methodInfo2 = AccessTools.Method(((object)item).GetType(), "set_ParentProperty", (Type[])null, (Type[])null);
				if (methodInfo2 != null)
				{
					methodInfo2.Invoke(item, new object[1] { property });
					return true;
				}
			}
			catch
			{
			}
			return false;
		}

		private static Property GetCurrentManagementProperty(object uiInstance)
		{
			try
			{
				Component val = (Component)((uiInstance is Component) ? uiInstance : null);
				if ((Object)(object)val != (Object)null && (Object)(object)val.gameObject != (Object)null)
				{
					ManagementWorldspaceCanvas componentInParent = val.GetComponentInParent<ManagementWorldspaceCanvas>();
					Property usableCanvasProperty = GetUsableCanvasProperty(componentInParent, requireActive: false);
					if ((Object)(object)usableCanvasProperty != (Object)null)
					{
						managementCanvas = componentInParent;
						return usableCanvasProperty;
					}
				}
			}
			catch
			{
			}
			Property usableCanvasProperty2 = GetUsableCanvasProperty(managementCanvas, requireActive: true);
			if ((Object)(object)usableCanvasProperty2 != (Object)null)
			{
				return usableCanvasProperty2;
			}
			managementCanvas = null;
			float unscaledTime = Time.unscaledTime;
			if (unscaledTime < nextCanvasLookup)
			{
				return null;
			}
			nextCanvasLookup = unscaledTime + 0.2f;
			ManagementWorldspaceCanvas val2 = null;
			int num = 0;
			try
			{
				Object[] array = Il2CppArrayBase<Object>.op_Implicit((Il2CppArrayBase<Object>)(object)Resources.FindObjectsOfTypeAll(Il2CppType.From(typeof(ManagementWorldspaceCanvas))));
				int num2 = 0;
				while (array != null && num2 < array.Length)
				{
					ManagementWorldspaceCanvas val3 = ((array[num2] == (Object)null) ? null : ((Il2CppObjectBase)array[num2]).TryCast<ManagementWorldspaceCanvas>());
					if (!((Object)(object)val3 == (Object)null))
					{
						Property usableCanvasProperty3 = GetUsableCanvasProperty(val3, requireActive: false);
						if (!((Object)(object)usableCanvasProperty3 == (Object)null))
						{
							num++;
							if ((Object)(object)val2 == (Object)null)
							{
								val2 = val3;
							}
							if (IsCanvasActive(val3))
							{
								managementCanvas = val3;
								return usableCanvasProperty3;
							}
						}
					}
					num2++;
				}
			}
			catch
			{
			}
			if (num == 1 && (Object)(object)val2 != (Object)null)
			{
				managementCanvas = val2;
				return GetUsableCanvasProperty(val2, requireActive: false);
			}
			return null;
		}

		private static bool IsCanvasActive(ManagementWorldspaceCanvas canvas)
		{
			if ((Object)(object)canvas == (Object)null)
			{
				return false;
			}
			try
			{
				if ((Object)(object)((Component)canvas).gameObject == (Object)null || !((Component)canvas).gameObject.activeInHierarchy)
				{
					return false;
				}
			}
			catch
			{
				return false;
			}
			try
			{
				if ((Object)(object)canvas != (Object)null && !((Behaviour)canvas).enabled)
				{
					return false;
				}
			}
			catch
			{
			}
			return true;
		}

		private static Property GetUsableCanvasProperty(ManagementWorldspaceCanvas canvas, bool requireActive)
		{
			if ((Object)(object)canvas == (Object)null)
			{
				return null;
			}
			if (requireActive && !IsCanvasActive(canvas))
			{
				return null;
			}
			try
			{
				return canvas.CurrentProperty;
			}
			catch
			{
				return null;
			}
		}
	}
	public sealed class Schedule1MenuMod : MelonMod
	{
		private sealed class PendingHostCommandRequest
		{
			public string Command = string.Empty;

			public string FriendlyName = string.Empty;

			public string Wire = string.Empty;

			public float SentAt;

			public float LastAttemptAt;

			public int Attempts;
		}

		private sealed class RemoteMoneyDropState
		{
			public bool Enabled;

			public float Amount = 500f;

			public float NextAt;
		}

		private sealed class RemoteCashRainState
		{
			public bool Enabled;

			public float NextAt;

			public int GridCursor;
		}

		private sealed class OnlinePlayerEntry
		{
			public Player Player;

			public string Code = string.Empty;

			public string Name = string.Empty;

			public bool IsLocal;
		}

		private sealed class WorldEditMeshEntry
		{
			public string Name = "";

			public string Category = "Other";

			public Mesh Mesh;

			public Material[] Materials;

			public Vector3 DefaultScale = Vector3.one;
		}

		private sealed class WorldEditPlacedObject
		{
			public GameObject Object;

			public string MeshName = "";

			public bool StudioPrimitive;

			public bool StudioSceneObject;

			public string StudioShape = "";

			public string StudioSceneName = "";

			public string StudioSceneChildName = "";

			public bool StudioSceneLocked;

			public bool StudioSceneUnlockedClone;

			public GameObject StudioSceneOriginalObject;

			public Renderer[] StudioSceneOriginalRenderers;

			public bool[] StudioSceneOriginalRendererEnabled;

			public Collider[] StudioSceneOriginalColliders;

			public bool[] StudioSceneOriginalColliderEnabled;

			public Material StudioOriginalMaterial;

			public Color StudioColor = Color.white;

			public float StudioOpacity = 1f;

			public string StudioMaterialName = "Solid";

			public float StudioTextureTiling = 1f;

			public bool StudioCollision = true;

			public Material StudioRuntimeMaterial;
		}

		private sealed class WorldEditMaterialPreset
		{
			public string Name = "Solid";

			public Material SourceMaterial;
		}

		private enum WorldEditDeleteUndoKind
		{
			SceneObject,
			NativePlacedObject,
			LegacyPlacedObject
		}

		private sealed class WorldEditDeleteUndoEntry
		{
			public WorldEditDeleteUndoKind Kind;

			public GameObject Object;

			public string ScenePath = "";

			public WorldEditPlacedObject LegacyItem;

			public string Label = "";
		}

		private sealed class ShopMenuEntry
		{
			public ShopInterface Shop;

			public string Name = "Shop";
		}

		private sealed class RegionMenuEntry
		{
			public MapRegionData Data;

			public EMapRegion Region;

			public string Name = "Region";
		}

		private sealed class DealerReloadDealRefresh
		{
			public Dealer Dealer;

			public Customer Customer;

			public string DealerName = "";

			public string CustomerName = "";

			public string CustomerId = "";

			public object Contract;
		}

		private sealed class OutsideFurniturePlacement
		{
			public string Guid;

			public string ItemId;

			public bool SurfacePlacement;

			public Vector3 Position;

			public Quaternion Rotation;
		}

		private sealed class NativeGridCoordinateTestBackup
		{
			public GridItem Item;

			public Grid Grid;

			public Vector2 OriginCoordinate;

			public int Rotation;

			public Vector3 WorldPosition;

			public Quaternion WorldRotation;

			public string Guid;
		}

		private sealed class WorldCashRainPickup
		{
			public GameObject Object;

			public float DespawnAt;
		}

		private sealed class PlayerMoneyDropPickup
		{
			public GameObject Object;

			public float DespawnAt;
		}

		private sealed class VendingMoneyPrinterEmitter
		{
			public int Id;

			public object Machine;

			public GameObject CashPrefab;

			public Vector3 Position;

			public Vector3 Forward;

			public bool Activated;

			public bool OwnsTemplate;

			public bool SpawnLogged;

			public bool FailureLogged;

			public float NextPrintAt;

			public int SpawnCount;
		}

		private sealed class FiendingPositionHold
		{
			public Customer Customer;

			public Vector3 Position;

			public Quaternion Rotation;

			public float ReleaseAt;
		}

		private sealed class TrashCanCapacityState
		{
			public TrashContainer Container;

			public int OriginalCapacity;
		}

		private sealed class PropertyBusinessEntry
		{
			public object Target;

			public string Key = "";

			public string Name = "";

			public string Code = "";

			public string Kind = "Property";

			public float Price;

			public bool IsOwned;

			public int EmployeeCapacity;

			public int EmployeeCount;

			public readonly Dictionary<string, int> RoleCounts = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
		}

		private sealed class PropertyEmployeeRole
		{
			public string Name = "";

			public string Command = "";
		}

		private sealed class EmployeeRuntimeControlRecord
		{
			public string Key = "";

			public object Employee;

			public float TimeScale = 1f;

			public bool WorkForFree;
		}

		private sealed class PendingRemoteHirePlacement
		{
			public PropertyBusinessEntry Entry;

			public string Role = "";

			public readonly HashSet<string> BeforeKeys = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

			public Vector3 Position;

			public float Yaw;

			public float NextAttemptAt;

			public float ExpiresAt;
		}

		private sealed class EmployeeIdlePositionRecord
		{
			public string Key = "";

			public string EmployeeId = "";

			public string EmployeeName = "";

			public string Role = "";

			public int RoleOrdinal = -1;

			public string PropertyCode = "";

			public Vector3 Position;

			public float Yaw;

			public GameObject RuntimeAnchor;

			public GameObject RuntimeWorkHoldAnchor;

			public Transform NativeIdlePoint;

			public bool NativeIdlePointCaptured;

			public bool RestoreWarpPending;

			public float CleanerWorkGraceUntil;

			public bool IsGroupGenerated;
		}

		private sealed class PropertyGroupIdlePositionRecord
		{
			public string PropertyCode = "";

			public string PropertyKey = "";

			public string PropertyName = "";

			public Vector3 Position;

			public float Yaw;

			public bool RestoreWarpActive;

			public readonly HashSet<string> RestoreWarpedEmployees = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
		}

		private sealed class PropertyDisposalPositionRecord
		{
			public string PropertyCode = "";

			public string PropertyKey = "";

			public string PropertyName = "";

			public Vector3 Position;

			public float Yaw;
		}

		private sealed class InfiniteEmployeeAssignmentTargetRecord
		{
			public string TargetId = "";

			public string TargetName = "";

			public string TargetType = "";

			public Vector3 Position;

			public bool PositionValid;
		}

		private sealed class InfiniteEmployeeRouteRecord
		{
			public string SourceGuid = "";

			public string DestinationGuid = "";

			public int FilterMode;

			public readonly List<string> FilterItemIds = new List<string>();
		}

		private sealed class InfiniteEmployeeAssignmentFieldRecord
		{
			public int FieldIndex;

			public string FieldKind = "";

			public readonly List<InfiniteEmployeeAssignmentTargetRecord> Targets = new List<InfiniteEmployeeAssignmentTargetRecord>();

			public readonly List<InfiniteEmployeeRouteRecord> Routes = new List<InfiniteEmployeeRouteRecord>();
		}

		private sealed class InfiniteEmployeeMemberRecord
		{
			public string EmployeeId = "";

			public string EmployeeName = "";

			public string FirstName = "";

			public string LastName = "";

			public string Role = "";

			public int RoleOrdinal;

			public bool HasAssignedHome;

			public string HomeId = "";

			public string HomeName = "";

			public string HomeType = "";

			public Vector3 HomePosition;

			public bool HomePositionValid;

			public readonly List<InfiniteEmployeeAssignmentFieldRecord> Assignments = new List<InfiniteEmployeeAssignmentFieldRecord>();

			public bool AssignmentSnapshotAvailable;

			public string NativeSaveString = "";

			public bool NativeCreateAttempted;

			public bool RestoreApplied;
		}

		private sealed class InfiniteEmployeeRosterRecord
		{
			public string PropertyCode = "";

			public string PropertyKey = "";

			public string PropertyName = "";

			public readonly Dictionary<string, int> RoleCounts = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);

			public readonly List<InfiniteEmployeeMemberRecord> Members = new List<InfiniteEmployeeMemberRecord>();

			public float NextRestoreAttemptAt;

			public bool RestoreComplete;

			public bool MemberRestoreComplete;

			public bool AutomaticAssignmentRestoreAttempted;

			public string LastLiveSnapshotSignature = "";

			public readonly HashSet<int> RestoreBaseEmployeeIds = new HashSet<int>();

			public bool RestoreBaseSnapshotCaptured;

			public bool AutoRosterRestoreDisabledForSession;

			public bool UserRosterCapturePending;

			public float UserRosterCaptureAt;

			public bool PendingAutoAddAcknowledge;

			public int PendingAutoAddExpectedEmployeeCount;

			public float PendingAutoAddUntil;
		}

		private sealed class SavedCreatorPreset
		{
			public string Id = "";

			public int DrugIndex;

			public string ProductName = "";

			public int QualityIndex;

			public int PackagingIndex;

			public float Addictiveness;

			public int SpawnQuantity = 1;

			public readonly List<string> EffectIds = new List<string>();

			public readonly List<string> EffectNames = new List<string>();
		}

		private readonly struct TeleportEntry
		{
			public readonly string Category;

			public readonly string Name;

			public readonly Vector3 Position;

			public TeleportEntry(string category, string name, Vector3 position)
			{
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_0028: Unknown result type (might be due to invalid IL or missing references)
				Category = category ?? "Other";
				Name = (string.IsNullOrWhiteSpace(name) ? "Unnamed" : name);
				Position = position;
			}
		}

		private sealed class QuestRecord
		{
			public object Value;

			public string Label = "Unknown quest";

			public string State = "Unknown";

			public string TypeName = "";
		}

		private sealed class EventRecord
		{
			public object Value;

			public string GroupId = "";

			public string Label = "Unknown event";

			public string Description = "";

			public string TypeName = "";

			public string Source = "";
		}

		private readonly struct ItemDef
		{
			public readonly string Name;

			public readonly string Id;

			public ItemDef(string name, string id)
			{
				Name = name;
				Id = id;
			}
		}

		private readonly struct VehicleDef
		{
			public readonly string Name;

			public readonly string Code;

			public VehicleDef(string name, string code)
			{
				Name = (string.IsNullOrWhiteSpace(name) ? code : name);
				Code = code ?? "";
			}
		}

		private readonly struct NpcEntry
		{
			public readonly object Npc;

			public readonly string Name;

			public readonly string Id;

			public NpcEntry(object npc, string name, string id)
			{
				Npc = npc;
				Name = ((!string.IsNullOrWhiteSpace(name)) ? name : (string.IsNullOrWhiteSpace(id) ? "NPC" : id));
				Id = id ?? "";
			}
		}

		private sealed class PendingNpcDeath
		{
			public object Npc;

			public string Name = "NPC";

			public float KillAt;

			public float NextVomitBurstAt;

			public int VomitBurstsRemaining;
		}

		private sealed class PendingNpcPhoneUse
		{
			public NPC Npc;

			public string Name = "NPC";

			public float EndAt;

			public string PreviousEquippablePath = "";

			public bool CleanupActive;

			public float CleanupUntil;
		}

		private sealed class PendingNpcConversation
		{
			public NPC Npc1;

			public NPC Npc2;

			public string Name1 = "NPC 1";

			public string Name2 = "NPC 2";

			public bool TalkStarted;

			public Vector3 ApproachPoint1;

			public Vector3 ApproachPoint2;

			public float ApproachDeadline;

			public float NextApproachRefreshAt;

			public float NextControlRefreshAt;

			public float EndAt;

			public float NextTalkAt;

			public int TalkCount;

			public object Behaviour1;

			public object Behaviour2;

			public bool RestoreBehaviour1;

			public bool RestoreBehaviour2;

			public string[] GestureTriggers1 = Array.Empty<string>();

			public string[] GestureTriggers2 = Array.Empty<string>();
		}

		private sealed class PendingNpcCashVomit
		{
			public object Npc;

			public string Name = "NPC";

			public float EndAt;

			public float NextVomitAt;

			public float NextCashAt;

			public int SpawnedCashCount;
		}

		private sealed class PendingNpcExplosion
		{
			public Vector3 Position;

			public float NextBurstAt;

			public int BurstsRemaining;
		}

		private sealed class NpcVisualParticle
		{
			public GameObject Object;

			public Vector3 Velocity;

			public Vector3 BaseScale;

			public float Lifetime;

			public float Remaining;

			public float Gravity;

			public float Growth;
		}

		private readonly struct OwnedVehicleEntry
		{
			public readonly object Vehicle;

			public readonly string Name;

			public readonly string Code;

			public OwnedVehicleEntry(object vehicle, string name, string code)
			{
				Vehicle = vehicle;
				Name = ((!string.IsNullOrWhiteSpace(name)) ? name : (string.IsNullOrWhiteSpace(code) ? "Owned Vehicle" : code));
				Code = code ?? "";
			}
		}

		private sealed class StandaloneMapOverlayMarker
		{
			public Vector3 WorldPosition;

			public string Label = string.Empty;

			public int Kind;
		}

		private sealed class NativeWorldModelEntry
		{
			public string Name = "";

			public string Path = "";

			public GameObject Source;

			public int TransformCount;
		}

		private sealed class NativeWorldGhostPart
		{
			public GameObject GhostObject;

			public MeshFilter GhostFilter;

			public MeshRenderer GhostRenderer;

			public MeshRenderer SourceRenderer;

			public Material[] FinalMaterials;

			public bool StaticBatchExtracted;

			public string SourcePath = "";

			public bool StaticBatchProxy;

			public Mesh StaticBatchMesh;

			public int StaticBatchSubMesh = -1;

			public int StaticMaterialSlot = -1;

			public Matrix4x4 StaticSourceRenderMatrix = Matrix4x4.identity;

			public Matrix4x4 StaticSourceTransformMatrix = Matrix4x4.identity;

			public Matrix4x4 StaticSourceModelWorldToLocal = Matrix4x4.identity;

			public Bounds StaticSourceBounds;

			public bool StaticContributesBounds;

			public int StaticLayer;

			public string SourceRelativePath = "";

			public MaterialPropertyBlock StaticPropertyBlock;
		}

		private sealed class NativeWorldPlacedStaticDrawPart
		{
			public GameObject PlacedRoot;

			public Mesh Mesh;

			public int SubMesh = -1;

			public int MaterialSlot = -1;

			public Matrix4x4 SourceRenderMatrix = Matrix4x4.identity;

			public Matrix4x4 SourceTransformMatrix = Matrix4x4.identity;

			public Matrix4x4 SourceModelWorldToLocal = Matrix4x4.identity;

			public Transform PlacedRendererTransform;

			public MeshRenderer PlacedRenderer;

			public Material Material;

			public int Layer;

			public string SourcePath = "";

			public string SourceRelativePath = "";

			public MaterialPropertyBlock PropertyBlock;

			public float NextVisualStateRefreshAt;
		}

		private sealed class NativeWorldPlacedRecord
		{
			public GameObject Root;

			public string SourcePath = "";

			public string SourceName = "";
		}

		private sealed class NativeWorldSavedPlacement
		{
			public string SourcePath = "";

			public string SourceName = "";

			public Vector3 Position;

			public Quaternion Rotation = Quaternion.identity;

			public int RetryCount;
		}

		private sealed class NativeWorldFunctionalBinding
		{
			public GameObject Root;

			public object Target;

			public string Label = "";

			public InteractableObject Interactable;

			public PhysicsDamageable Damageable;

			public IntPtr InteractablePointer;

			public IntPtr DamageablePointer;

			public float RebindAt;

			public int RebindPasses;

			public bool LastPurchaseInProgress;

			public bool LastBroken;

			public bool ColaFallbackPending;

			public float ColaFallbackAt;

			public bool CashFallbackPending;

			public float CashFallbackAt;

			public int CashFallbackRemaining;

			public float CashFallbackNextAt;
		}

		private sealed class NativeWorldPendingFunctionalImpact
		{
			public PhysicsDamageable Damageable;

			public Impact Impact;
		}

		private const string HostCommandWirePrefix = "UGLYCMD1";

		private const string HostCommandNativeRpcPrefix = "UGLYRPC2:";

		private Harmony hostCommandNativeRpcHarmony;

		private bool hostCommandNativeRpcBridgeInstalled;

		private Action<string> hostCommandLobbyMessageHandler;

		private object hostCommandSubscribedService;

		private float hostCommandNextSubscribeAttemptAt;

		private bool hostCommandBridgeInstalled;

		private float hostCommandLobbyCacheUntil;

		private bool hostCommandLobbyCacheValid;

		private object hostCommandCachedLobby;

		private object hostCommandCachedService;

		private bool hostCommandCachedIsHost;

		private int hostCommandNonce;

		private int hostCommandApplyNonce;

		private readonly HashSet<string> hostCommandSeenRequests = new HashSet<string>(StringComparer.Ordinal);

		private readonly Queue<string> hostCommandSeenRequestOrder = new Queue<string>();

		private readonly HashSet<string> hostCommandSeenApplies = new HashSet<string>(StringComparer.Ordinal);

		private readonly Queue<string> hostCommandSeenApplyOrder = new Queue<string>();

		private readonly Dictionary<int, PendingHostCommandRequest> hostCommandPendingRequests = new Dictionary<int, PendingHostCommandRequest>();

		private readonly Dictionary<string, RemoteMoneyDropState> hostCommandRemoteMoneyDrop = new Dictionary<string, RemoteMoneyDropState>(StringComparer.OrdinalIgnoreCase);

		private readonly Dictionary<string, RemoteCashRainState> hostCommandRemoteCashRain = new Dictionary<string, RemoteCashRainState>(StringComparer.OrdinalIgnoreCase);

		private readonly Dictionary<string, bool> hostCommandRemoteInfiniteHealth = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> hostCommandRemoteNeverWanted = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private bool hostCommandNeverWantedStateSynced;

		private bool hostCommandNeverWantedLastSent;

		private float hostCommandNextMoneyAmountSendAt;

		private bool hostCommandClientStateRequested;

		private bool hostCommandHostPresenceKnown;

		private bool hostCommandHostUglyMenuAvailable;

		private float hostCommandLastHostPresenceAt;

		private float hostCommandNextHostPresenceProbeAt;

		private const float HostCommandHostPresenceStaleSeconds = 7.5f;

		private readonly Dictionary<string, float> hostCommandKnownUglyClients = new Dictionary<string, float>(StringComparer.OrdinalIgnoreCase);

		private readonly Dictionary<string, float> hostCommandItemRelayCapableClients = new Dictionary<string, float>(StringComparer.OrdinalIgnoreCase);

		private readonly Dictionary<string, float> hostCommandKnownUglyPlayersFromHost = new Dictionary<string, float>(StringComparer.OrdinalIgnoreCase);

		private const float HostCommandClientPresenceStaleSeconds = 8f;

		private bool hostCommandDirectPlaceAwaitingHost;

		private float hostCommandDirectPlaceRequestAt;

		private string hostCommandDirectPlacePendingItemId = string.Empty;

		private Quaternion hostCommandDirectPlacePendingRotation = Quaternion.identity;

		private readonly List<OnlinePlayerEntry> onlinePlayers = new List<OnlinePlayerEntry>();

		private Vector2 onlinePlayerScroll;

		private string onlineSelectedPlayerCode = string.Empty;

		private float onlineNextPlayerRefreshAt;

		private float onlineFallbackScanAllowedAt;

		private static Schedule1MenuMod Instance;

		private bool compatibilityBlocked;

		private bool compatibilityPending;

		private bool compatibilityInitialized;

		private float compatibilityCheckStartedAt = -1f;

		private float compatibilityNextProbeAt = -1f;

		private const float CompatibilityProbeIntervalSeconds = 0.25f;

		private const string MinimumCompatibleGameVersion = "0.4.7f9";

		private const string ScheduleOneSteamAppId = "3164500";

		private Harmony currentMiscHarmony;

		private Harmony neverWantedHostHarmony;

		private bool neverWantedHostPolicePatchesInstalled;

		private bool currentMiscPatchesInstalled;

		private float currentMiscPatchReadySince = -1f;

		private bool flightRecorderWorldStateKnown;

		private bool flightRecorderLastWorldReady;

		private bool flightRecorderLocalWorldStateKnown;

		private bool flightRecorderLastLocalWorldReady;

		private bool flightRecorderLoadingGateKnown;

		private bool flightRecorderLastLoadingGate;

		private bool menuOpen;

		private int currentTab;

		private Rect menuRect = new Rect(24f, 24f, 1260f, 760f);

		private Vector2 itemScroll;

		private bool draggingMenu;

		private Vector2 dragOffset;

		private bool menuMinimized;

		private float tabSwitchStartedAt;

		private readonly float[] tabButtonAnim = new float[16];

		private Texture2D menuButtonNormalTexture;

		private Texture2D menuButtonHoverTexture;

		private Texture2D menuButtonActiveTexture;

		private Texture2D menuWhiteTexture;

		private Texture2D menuSoftWhiteTexture;

		private Texture2D menuDarkTrackTexture;

		private readonly List<WorldEditMeshEntry> worldEditRegistry = new List<WorldEditMeshEntry>();

		private readonly List<WorldEditPlacedObject> worldEditPlaced = new List<WorldEditPlacedObject>();

		private Vector2 worldEditScroll;

		private string worldEditSearch = "";

		private string worldEditGridSizeText = "0.5";

		private string worldEditCategory = "All";

		private int worldEditSelectedIndex = -1;

		private GameObject worldEditGhost;

		private string worldEditGhostMeshName = "";

		private float worldEditYaw;

		private float worldEditPitch;

		private float worldEditRoll;

		private float worldEditVerticalOffset;

		private float worldEditGridSize = 0.5f;

		private bool worldEditGridSnap = true;

		private float nextWorldEditRegistryRefresh;

		private bool worldEditRegistryLoaded;

		private bool worldEditBuildMode;

		private bool worldEditDeleteClickMode;

		private readonly HashSet<string> worldEditDeletedScenePaths = new HashSet<string>(StringComparer.Ordinal);

		private GameObject worldEditLastDeletedSceneObject;

		private string worldEditLastDeletedScenePath = "";

		private readonly List<WorldEditDeleteUndoEntry> worldEditDeleteUndoStack = new List<WorldEditDeleteUndoEntry>();

		private readonly HashSet<GameObject> nativeWorldPendingDeleteRoots = new HashSet<GameObject>();

		private readonly HashSet<WorldEditPlacedObject> worldEditPendingDeleteItems = new HashSet<WorldEditPlacedObject>();

		private bool worldEditDeletedModelsDirty;

		private bool worldEditCommitPendingDeletesWrite;

		private bool worldEditLastBuildSaveSucceeded;

		private float nextWorldEditDeletedSceneApply;

		private readonly Queue<string> worldEditDeletedSceneApplyQueue = new Queue<string>();

		private readonly Dictionary<string, int> worldEditDeletedSceneApplyRetries = new Dictionary<string, int>(StringComparer.Ordinal);

		private string worldEditDeletedSceneApplyScope = "";

		private bool worldEditDeletedSceneApplyWorldReady;

		private GameObject worldEditDeletedSceneApplyMapRoot;

		private GameObject worldEditDeletedSceneApplyBusinessesRoot;

		private readonly HashSet<string> worldEditFavouriteMeshNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly List<WorldEditMaterialPreset> worldEditStudioMaterials = new List<WorldEditMaterialPreset>();

		private bool worldEditStudioMode;

		private WorldEditPlacedObject worldEditStudioSelected;

		private int worldEditStudioTool;

		private Vector3 worldEditStudioScale = new Vector3(2f, 1f, 2f);

		private Color worldEditStudioColor = Color.white;

		private float worldEditStudioOpacity = 1f;

		private float worldEditStudioTextureTiling = 1f;

		private int worldEditStudioMaterialIndex;

		private bool worldEditStudioCollision = true;

		private bool worldEditStudioMaterialPickerOpen;

		private Vector2 worldEditStudioMaterialScroll;

		private bool worldEditStudioMouseLook;

		private bool worldEditStudioMoveDragging;

		private bool worldEditStudioMoveDragActivated;

		private Vector2 worldEditStudioMoveDragStartMouse;

		private Vector3 worldEditStudioDragOffset;

		private bool worldEditStudioPreviousFreeCam;

		private Vector3 worldEditStudioOriginalPlayerPosition;

		private Quaternion worldEditStudioOriginalPlayerRotation = Quaternion.identity;

		private Vector3 worldEditStudioFreeCamPosition;

		private float worldEditStudioNextNetworkSync;

		private bool worldEditStudioPreviousNoClip;

		private bool worldEditStudioPreviousThirdPerson;

		private int worldEditStudioGizmoAxis = -1;

		private Vector2 worldEditStudioGizmoDragStart;

		private Quaternion worldEditStudioGizmoStartRotation = Quaternion.identity;

		private int worldEditStudioMoveGizmoAxis = -1;

		private Vector2 worldEditStudioMoveGizmoDragStart;

		private Vector3 worldEditStudioMoveGizmoStartPosition;

		private Vector3 worldEditStudioMoveGizmoWorldAxis = Vector3.right;

		private Vector2 worldEditStudioMoveGizmoScreenAxis = Vector2.right;

		private float worldEditStudioMoveGizmoPixelsPerWorld = 1f;

		private Rect worldEditStudioPanelRect = new Rect(18f, 18f, 360f, 760f);

		private Mesh worldEditStudioBlockMesh;

		private Mesh worldEditStudioSphereMesh;

		private Mesh worldEditStudioTriangleMesh;

		private Mesh worldEditStudioCylinderMesh;

		private GameObject worldEditStudioNavRoot;

		private Component worldEditStudioNavSurface;

		private bool worldEditStudioNavDirty;

		private float worldEditStudioNavRebuildAt;

		private float worldEditStudioNpcResnapAt = -1f;

		private int worldEditStudioNpcAgentTypeId = int.MinValue;

		private string worldEditStudioNavStatus = "NPC Nav: waiting";

		private int modernSpawnerSelectedIndex = -1;

		private int modernSpawnerCategory;

		private bool spawnerRegistryLoaded;

		private float nextSpawnerRegistryRefresh;

		private int lastSpawnerRegistryCount = -1;

		private readonly HashSet<string> spawnerOriginalKnownIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> spawnerWeaponIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> spawnerFurnitureIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> spawnerPlantFurnitureIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> spawnerPlantEnhancerIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> spawnerPlantToolIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> spawnerClothingIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly List<int> spawnerClothingColorValues = new List<int>();

		private readonly List<string> spawnerClothingColorNames = new List<string>();

		private readonly List<Color> spawnerClothingColorSwatches = new List<Color>();

		private readonly Dictionary<string, bool> spawnerClothingColorSupportCache = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase);

		private bool spawnerClothingColorsLoaded;

		private float nextSpawnerClothingColorRefresh;

		private int spawnerClothingColorIndex;

		private readonly HashSet<string> spawnerDrugIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> spawnerMixingItemIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> spawnerProductIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private int spawnerPackagingIndex;

		private int spawnerQualityIndex = 2;

		private string spawnerLastSelectedItemId = string.Empty;

		private string spawnerGiveTargetPlayerCode = "__ME__";

		private string spawnerGiveTargetPlayerName = "Me";

		private float spawnerStorageOpenWarningUntil = -1f;

		private readonly Dictionary<string, PlayerInventory> spawnerTargetInventoryCache = new Dictionary<string, PlayerInventory>(StringComparer.OrdinalIgnoreCase);

		private readonly List<ItemDef> spawnerNewRegistryItems = new List<ItemDef>();

		private readonly HashSet<string> spawnerFavouriteItemIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private bool spawnerOriginalBaselineCaptured;

		private Vector2 npcSpawnerScroll;

		private string npcSpawnerSearch = "";

		private bool npcVisibleOnly;

		private int npcSpawnerSelectedIndex = -1;

		private string npcSpawnerSelectedStableKey = "";

		private string npcSpawnerSelectedStableId = "";

		private bool npcMultiSelectMode;

		private readonly HashSet<string> npcMultiSelectedIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private float nextNpcRegistryRefresh;

		private bool npcRegistryLoaded;

		private readonly List<NpcEntry> liveNpcEntries = new List<NpcEntry>();

		private string npcSelectedComponentCacheKey = string.Empty;

		private bool npcSelectedComponentCacheResolved;

		private Customer npcSelectedCustomerCache;

		private Dealer npcSelectedDealerCache;

		private readonly List<KeyValuePair<int, float>> npcTabRowCache = new List<KeyValuePair<int, float>>();

		private float nextNpcTabRowCacheRefresh;

		private string npcTabRowCacheSearch = "";

		private bool npcTabRowCacheVisibleOnly;

		private int npcRegistryRevision;

		private int npcTabRowCacheRevision = -1;

		private readonly List<PendingNpcDeath> pendingNpcDeaths = new List<PendingNpcDeath>();

		private readonly List<PendingNpcPhoneUse> pendingNpcPhoneUses = new List<PendingNpcPhoneUse>();

		private PendingNpcConversation pendingNpcConversation;

		private Vector2 npcActionScroll;

		private Vector2 shopsScroll;

		private float nextShopRefreshAt;

		private readonly List<ShopMenuEntry> shopEntries = new List<ShopMenuEntry>();

		private bool npcAllAttackPlayer;

		private float nextNpcAllAttackPlayerAt;

		private readonly HashSet<IntPtr> npcForcedCombatPointers = new HashSet<IntPtr>();

		private float nextNpcManualHostileAt;

		private readonly HashSet<IntPtr> npcManualHostilePointers = new HashSet<IntPtr>();

		private readonly Dictionary<IntPtr, float> npcManualHostileStopUntil = new Dictionary<IntPtr, float>();

		private string benzieCartelUiStatus = string.Empty;

		private float nextBenzieCartelUiStatusAt;

		private readonly List<object> benziePendingAttackGoons = new List<object>();

		private readonly List<NetworkObject> benziePendingAttackTargets = new List<NetworkObject>();

		private float benziePendingAttackUntil;

		private float nextBenziePendingAttackAt;

		private readonly List<RegionMenuEntry> regionMenuEntries = new List<RegionMenuEntry>();

		private Vector2 regionMenuScroll;

		private int regionMenuSelectedIndex = -1;

		private bool regionMenuRegistryLoaded;

		private float nextRegionMenuRefreshAt;

		private float regionMenuNextInfluenceRequestAt;

		private string regionMenuLastInfluenceRequestRegion = string.Empty;

		private float regionMenuLastInfluenceRequestValue = -9999f;

		private Vector2 questScroll;

		private readonly List<QuestRecord> questRecords = new List<QuestRecord>();

		private int questSelectedIndex = -1;

		private int questPage;

		private Vector2 eventScroll;

		private readonly List<EventRecord> eventRecords = new List<EventRecord>();

		private int eventSelectedIndex = -1;

		private string eventSearch = "";

		private bool eventRegistryLoaded;

		private float nextEventRegistryRefresh;

		private string pendingNativeEventGroupId = "";

		private string pendingNativeEventLabel = "";

		private float pendingNativeEventNextAt;

		private float pendingNativeEventExpireAt;

		private int pendingNativeEventStage;

		private Vector2 vehicleSpawnerScroll;

		private string vehicleSpawnerSearch = "";

		private int vehicleSpawnerSelectedIndex = -1;

		private float nextVehicleRegistryRefresh;

		private bool vehicleRegistryLoaded;

		private int lastVehicleRegistryCount = -1;

		private readonly List<VehicleDef> liveVehicleDefs = new List<VehicleDef>();

		private Vector2 ownedVehicleScroll;

		private int ownedVehicleSelectedIndex = -1;

		private float nextOwnedVehicleRefresh;

		private readonly List<OwnedVehicleEntry> ownedVehicleEntries = new List<OwnedVehicleEntry>();

		private readonly HashSet<string> deletedOwnedVehicleKeys = new HashSet<string>(StringComparer.Ordinal);

		private readonly HashSet<string> menuSpawnedVehicleKeys = new HashSet<string>(StringComparer.Ordinal);

		private readonly HashSet<string> pendingVehicleSpawnBaselineKeys = new HashSet<string>(StringComparer.Ordinal);

		private string pendingVehicleSpawnCode = "";

		private float pendingVehicleSpawnUntil;

		private int vehicleSpawnerColorIndex;

		private int pendingVehicleSpawnColorIndex;

		private float pendingVehiclePaintNextCheck;

		private readonly Dictionary<string, bool> vehicleColorSupportCache = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase);

		private readonly Color[] vehicleSpawnerPalette = (Color[])(object)new Color[16]
		{
			new Color(0.06f, 0.06f, 0.06f, 1f),
			new Color(0.32f, 0.32f, 0.32f, 1f),
			new Color(0.64f, 0.64f, 0.64f, 1f),
			new Color(0.94f, 0.94f, 0.94f, 1f),
			new Color(1f, 0.76f, 0f, 1f),
			new Color(1f, 0.25f, 0.02f, 1f),
			new Color(0.96f, 0.02f, 0.04f, 1f),
			new Color(0.43f, 0.12f, 0.11f, 1f),
			new Color(0.95f, 0.16f, 0.82f, 1f),
			new Color(0.43f, 0f, 0.92f, 1f),
			new Color(0.13f, 0.22f, 0.46f, 1f),
			new Color(0f, 0.22f, 0.82f, 1f),
			new Color(0f, 0.53f, 0.93f, 1f),
			new Color(0f, 0.72f, 0.88f, 1f),
			new Color(0f, 0.9f, 0.08f, 1f),
			new Color(0f, 0.39f, 0.02f, 1f)
		};

		private object pendingOwnedVehicleDelete;

		private string pendingOwnedVehicleDeleteName = "";

		private string pendingOwnedVehicleDeleteCode = "";

		private float pendingOwnedVehicleDeleteStartedAt;

		private float pendingOwnedVehicleExitRetryAt;

		private string cash = "5000";

		private string balance = "5000";

		private string playerAtmDepositText = "1";

		private string playerAtmWithdrawText = "1";

		private object cachedPlayerAtmMoneyManager;

		private float nextPlayerAtmMoneyManagerResolveAt;

		private bool pendingFreshSaveAtmReset;

		private int pendingFreshSaveAtmResetPasses;

		private float pendingFreshSaveAtmResetAt;

		private bool playerAtmTransferPending;

		private bool playerAtmPendingDeposit;

		private int playerAtmPendingAmount;

		private float playerAtmPendingStartOnline;

		private float playerAtmPendingTargetOnline;

		private float playerAtmPendingStartedAt;

		private object playerAtmPendingManager;

		private string health = "100";

		private string stamina = "200";

		private string moveSpeed = "2";

		private float sprintSpeedMultiplier = 1f;

		private bool shiftSpeedBoostApplied;

		private float lastAppliedShiftSpeedMultiplier = -1f;

		private string jumpForce = "2";

		private string search = "";

		private string quantity = "1";

		private string status = "Ready";

		private int creatorDrugIndex;

		private int creatorQualityIndex = 2;

		private int creatorPackagingIndex;

		private int creatorQuantity = 1;

		private string creatorProductName = "";

		private float creatorAddictiveness = 0.15f;

		private Vector2 creatorTabScroll;

		private Vector2 creatorScroll;

		private Vector2 creatorPresetScroll;

		private readonly bool[] creatorEffectSelected = new bool[64];

		private readonly int[] creatorEffectQuantity = new int[64];

		private readonly List<SavedCreatorPreset> savedCreatorPresets = new List<SavedCreatorPreset>();

		private bool creatorRegistrationPending;

		private string creatorPendingProductId = "";

		private string creatorPendingDisplayName = "";

		private int creatorPendingQualityIndex;

		private int creatorPendingPackagingIndex;

		private int creatorPendingQuantity;

		private int creatorPendingEffectCount;

		private float creatorPendingAddictiveness;

		private float creatorPendingSuggestedPrice;

		private float creatorPendingStartedAt;

		private static readonly string[] CreatorDrugNames = new string[7] { "OG Kush", "Sour Diesel", "Green Crack", "Grandaddy Purple", "Meth", "Cocaine", "Shrooms" };

		private static readonly string[] CreatorProductIds = new string[7] { "ogkush", "sourdiesel", "greencrack", "granddaddypurple", "", "", "" };

		private static readonly string[] CreatorQualityNames = new string[5] { "Trash", "Poor", "Standard", "Premium", "Heavenly" };

		private static readonly string[] CreatorPackagingNames = new string[4] { "Loose", "Baggie", "Jar", "Brick" };

		private static readonly string[] CreatorPackagingIds = new string[4] { "", "baggie", "jar", "brick" };

		private string activeInput;

		private bool previousCursorVisible;

		private CursorLockMode previousCursorLock;

		private PlayerInput[] cachedPlayerInputs = (PlayerInput[])(object)new PlayerInput[0];

		private bool menuMovementStateCaptured;

		private bool menuTypingGameInputBlocked;

		private bool menuInventoryInputStateCaptured;

		private bool menuOriginalHotbarEnabled = true;

		private bool menuOriginalEquippingEnabled = true;

		private readonly Dictionary<int, bool> menuPunchControllerStates = new Dictionary<int, bool>();

		private PunchController[] menuPunchControllers = (PunchController[])(object)new PunchController[0];

		private bool menuOriginalCanMove = true;

		private bool menuOriginalCanJump = true;

		private bool menuOriginalCanLook = true;

		private PunchController menuPunchController;

		private bool menuPunchStateCaptured;

		private bool menuOriginalPunchingEnabled = true;

		private Vector2 playerCheatScroll;

		private bool weaponNoSpread;

		private readonly List<Object> weaponReticleLineObjects = new List<Object>();

		private readonly Dictionary<int, float[]> weaponReticleLineOriginals = new Dictionary<int, float[]>();

		private bool weaponReticleLinesCached;

		private bool weaponInfiniteAmmo;

		private bool weaponNoRecoil;

		private bool weaponAimbot;

		private bool weaponAutoFire;

		private bool weaponOneHitKillPunch;

		private readonly List<Object> weaponPunchControllers = new List<Object>();

		private readonly Dictionary<int, float[]> weaponPunchDamageOriginals = new Dictionary<int, float[]>();

		private float nextWeaponPunchControllerRetry;

		private const float WeaponOneHitPunchDamage = 10000f;

		private const float WeaponAutoFireInterval = 0.1f;

		private float nextWeaponAutoFireTime;

		private bool weaponAutoFireWasHeld;

		private Equippable_RangedWeapon cachedAutoFireWeapon;

		private float nextAutoFireWeaponRefresh;

		private float nextAimbotNpcRefresh;

		private readonly List<NPC> cachedAimbotNpcs = new List<NPC>();

		private Vector2 worldScroll;

		private Vector2 miscScroll;

		private Vector2 teleportScroll;

		private Vector2 employeeScroll;

		private bool playerInfiniteHealth;

		private bool playerInfiniteStamina;

		private bool playerInfiniteEnergy;

		private bool playerNeverWanted;

		private float nextWeaponNoRecoilMaintenance;

		private readonly Dictionary<int, float> weaponNoRecoilOriginalShakeMultipliers = new Dictionary<int, float>();

		private readonly Dictionary<int, string> weaponNoRecoilOriginalAnimationTriggers = new Dictionary<int, string>();

		private readonly Dictionary<int, Object> weaponNoRecoilTrackedWeapons = new Dictionary<int, Object>();

		private bool playerSlotsAlwaysWin;

		private bool playerBlackjackStart21;

		private readonly Dictionary<int, int> blackjackOpeningCardCounts = new Dictionary<int, int>();

		private bool playerNoClip;

		private bool playerNoClipKeybindEnabled = true;

		private bool playerThirdPersonKeybindEnabled = true;

		private KeyCode menuToggleKey = (KeyCode)286;

		private KeyCode noClipToggleKey = (KeyCode)110;

		private KeyCode thirdPersonToggleKey = (KeyCode)103;

		private KeyCode moreInventoryToggleKey = (KeyCode)98;

		private KeyCode mapTeleportToggleKey = (KeyCode)99;

		private bool settingsPanelOpen;

		private bool loopGateFlightRecorder = true;

		private bool loopGateWorldEsp = true;

		private bool loopGateMoreInventoryGui = true;

		private bool loopGateMoreInventory = true;

		private bool loopGateSharedWorldSync = true;

		private bool loopGateHostCommandBridge = true;

		private bool loopGateEmployeePosition = true;

		private bool loopGateEmployeeRuntime = true;

		private bool loopGateRemoteHire = true;

		private bool loopGatePhoneRefresh = true;

		private bool loopGateWeaponAutoFire = true;

		private bool loopGateOneHitPunch = true;

		private bool loopGateShiftSpeed = true;

		private bool loopGateNpcVisualParticles = true;

		private bool loopGateNpcExplosions = true;

		private bool loopGateNpcDeaths = true;

		private bool loopGateNpcPhoneUses = true;

		private bool loopGateNpcConversation = true;

		private bool loopGateNpcCash = true;

		private bool loopGateFiendingPositions = true;

		private bool loopGateNpcAttackAll = true;

		private bool loopGateNpcManualHostiles = true;

		private bool loopGateBenzieAttack = true;

		private bool loopGatePlayerMoneyDrop = true;

		private bool loopGateWorldEdit = true;

		private bool loopGateShopRefresh = true;

		private bool loopGateVehicleRuntime = true;

		private bool loopGateBunnyHop = true;

		private bool loopGateForceRain = true;

		private bool loopGateCashRain = true;

		private bool loopGateVendingPrinter = true;

		private bool loopGateUnlimitedAtm = true;

		private bool loopGateDirectPlacePersistence = true;

		private bool loopGateDirectPlaceRuntime = true;

		private bool loopGateMapTeleport = true;

		private bool loopGateRankPopup = true;

		private bool loopGateInfiniteHealth = true;

		private bool loopGateInfiniteStamina = true;

		private bool loopGateInfiniteEnergy = true;

		private bool loopGateMiscRuntime = true;

		private bool loopGateAutoWaterSoil = true;

		private bool loopGateAutoProcessingDiscovery = true;

		private bool loopGateAutoChemistry = true;

		private bool loopGateAutoOven = true;

		private bool loopGateAutoDrying = true;

		private bool loopGateAutoPackage = true;

		private bool loopGateFiendingRescan = true;

		private bool loopGateLateNoClip = true;

		private bool loopGateLateThirdPerson = true;

		private bool loopGateLateAimbot = true;

		private bool loopGateLateDirectPlace = true;

		private bool loopGateLateMapPointer = true;

		private string pendingKeybindCapture;

		private float nextTitleScreenStateCheck;

		private bool cachedTitleScreenVisible;

		private bool titleKeybindPanelDismissed;

		private string menuFeatureLoadedSavePath = "";

		private string menuFeatureLoadedSaveIdentity = "";

		private string menuFeaturePreviousSavePath = "";

		private string menuFeaturePreviousSaveIdentity = "";

		private float nextMenuFeatureSaveIdentityProbeAt;

		private readonly List<DealerReloadDealRefresh> dealerReloadDealRefreshes = new List<DealerReloadDealRefresh>();

		private string dealerReloadDealRefreshSavePath = "";

		private int dealerReloadDealRefreshPhase;

		private float dealerReloadDealRefreshAt;

		private const float MinMenuVisibility = 0.2f;

		private float menuVisibility = 0.55f;

		private const float MinMenuScale = 0.55f;

		private float menuScale = 0.75f;

		private bool noClipKeybindPendingEnable;

		private float noClipKeybindRetryUntil;

		private float noClipKeybindNextRetry;

		private bool noClipBodyFollowCaptured;

		private Vector3 noClipBodyCameraOffset = Vector3.zero;

		private float noClipNextBodyNetworkSync;

		private bool noClipCustomActive;

		private Vector3 noClipCustomPosition = Vector3.zero;

		private HUD cachedNoClipHud;

		private float noClipNextHudEnsure;

		private bool playerThirdPerson;

		private const float ThirdPersonMinDistance = 1f;

		private const float ThirdPersonMaxDistance = 5f;

		private float thirdPersonDistance = 3f;

		private const float ThirdPersonHeight = 0.3f;

		private Transform thirdPersonCameraContainer;

		private Vector3 thirdPersonCameraContainerOriginalLocalPosition;

		private bool thirdPersonCameraContainerCaptured;

		private Transform thirdPersonMainCameraTransform;

		private Vector3 thirdPersonMainCameraOriginalLocalPosition;

		private bool thirdPersonMainCameraCaptured;

		private Transform thirdPersonOverlayCameraTransform;

		private Vector3 thirdPersonOverlayCameraOriginalLocalPosition;

		private bool thirdPersonOverlayCameraCaptured;

		private bool thirdPersonInternalCameraLocalPosCaptured;

		private Vector3 thirdPersonOriginalInternalCameraLocalPos;

		private bool thirdPersonMeshVisibilityCaptured;

		private bool thirdPersonOriginalMeshVisibility;

		private bool thirdPersonAvatarVisibilityCaptured;

		private bool thirdPersonOriginalAvatarVisibility;

		private int thirdPersonCapturedPlayerId = -1;

		private const float ThirdPersonMaxInteractionRange = 10f;

		private bool thirdPersonInteractionRayOverrideActive;

		private readonly Dictionary<int, float> thirdPersonOriginalInteractableRanges = new Dictionary<int, float>();

		private bool energyFallbackStateCaptured;

		private bool originalSprintingRequiresStamina = true;

		private bool worldNpcEsp;

		private bool worldPlayerEsp;

		private bool worldFreezeTime;

		private bool worldForceRain;

		private RV cachedNativeRv;

		private float nextNativeRvResolveAt;

		private readonly List<GameObject> nativeRvRepairHiddenObjects = new List<GameObject>();

		private readonly List<GameObject> nativeRvRepairHiddenFurniture = new List<GameObject>();

		private const string NativeRvRepairPersistentFolder = "UglyMenu_RVRepairSaves";

		private string nativeRvRepairLoadedSavePath = string.Empty;

		private bool nativeRvRepairSavedStateKnown;

		private bool nativeRvRepairSavedState;

		private bool nativeRvRepairApplyPending;

		private float nativeRvRepairNextApplyAt;

		private int nativeRvRepairApplyAttempts;

		private bool worldVendingMoneyPrinter;

		private bool worldCashRain;

		private bool worldUnlimitedAtmDeposit;

		private bool atmOriginalWeeklyDepositSumCaptured;

		private float atmOriginalWeeklyDepositSum;

		private int activeFurniturePlacementTest;

		private Vector3 furnitureTestPendingPosition;

		private Quaternion furnitureTestPendingRotation;

		private bool furnitureTestPendingTransform;

		private readonly HashSet<IntPtr> furnitureTestFreePointers = new HashSet<IntPtr>();

		private readonly List<GridItem> furnitureTestFreeItems = new List<GridItem>();

		private readonly Dictionary<IntPtr, Quaternion> directPlaceRotationLocks = new Dictionary<IntPtr, Quaternion>();

		private readonly Dictionary<IntPtr, BuildableItem> directPlaceRotationItems = new Dictionary<IntPtr, BuildableItem>();

		private const int FT_BOUNDS = 1;

		private const int FT_BOX = 2;

		private const int FT_VALID = 4;

		private const int FT_SKIP_INTERSECTIONS = 8;

		private const int FT_FALLBACK_GRID = 16;

		private const int FT_ORIGIN_APPROX = 32;

		private const int FT_ORIGIN_ZERO = 64;

		private const int FT_FREE_PREVIEW = 128;

		private const int FT_REPOSITION = 256;

		private const int FT_FREEZE_TRANSFORM = 512;

		private const int FT_TILE_VALID = 1024;

		private const int FT_SHARE_TILE = 2048;

		private const int FT_DESTROY = 4096;

		private const int FT_CAN_DESTROY = 8192;

		private const int FT_STORAGE_OPEN = 16384;

		private const int FT_ANGLE = 32768;

		private const int FT_NO_CULL = 65536;

		private const int FT_PICKUP = 131072;

		private const int FT_DIRECT_CREATE = 262144;

		private const int FT_ORIGIN_CENTER = 524288;

		private const int FT_FORCE_WHITE = 1048576;

		private const int FT_STOP_BUILD = 2097152;

		private const int FT_FORCE_PARENT = 4194304;

		private const int FT_PREVIEW_RAYCAST = 8388608;

		private const int FT_GRID_SNAP_GROUND = 16777216;

		private readonly Dictionary<string, OutsideFurniturePlacement> outsideFurniturePlacements = new Dictionary<string, OutsideFurniturePlacement>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<IntPtr> outsideFurniturePersistentPointers = new HashSet<IntPtr>();

		private readonly HashSet<IntPtr> outsideFurnitureProtectedPropertyPointers = new HashSet<IntPtr>();

		private readonly HashSet<string> outsideFurnitureFakeBackingGuids = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private const float OutsideFurnitureFakeGridOffset = 50000f;

		private const float OutsideFurnitureFakeGridWindow = 1000f;

		private GridItem lastDirectPlacedFurniture;

		private NativeGridCoordinateTestBackup nativeGridCoordinateTestBackup;

		private string nativeGridCoordinateTestStatus = "Place one furniture outside first.";

		private bool nativeGridSaveOverrideArmed;

		private string nativeGridSaveOverrideItemGuid = "";

		private string nativeGridSaveOverrideGridGuid = "";

		private Vector2 nativeGridSaveOverrideCoordinate;

		private int nativeGridSaveOverrideRotation;

		private bool nativeGridSaveOverrideApplied;

		private int nativeGridSaveOverrideApplyCount;

		private Grid nativeGridNearestRealGrid;

		private Tile nativeGridNearestRealTile;

		private float nativeGridNearestRealTileDistance = float.PositiveInfinity;

		private Vector3 nativeGridNearestRealTilePosition;

		private string nativeGridNearestRealGridLabel = "";

		private Surface nativeSurfaceNearestSurface;

		private float nativeSurfaceNearestDistance = float.PositiveInfinity;

		private Vector3 nativeSurfaceNearestPoint;

		private string nativeSurfaceNearestLabel = "";

		private bool outsideFurnitureLastSaveWasSaving;

		private string outsideFurnitureLoadedSavePath = "";

		private int outsideFurnitureLoadApplyPasses;

		private float outsideFurnitureNextLoadApplyAt;

		private bool outsideFurnitureFinalRestoreDoneForLoadedSave;

		private const string OutsideFurnitureSaveFile = "UglyMenu_OutsideFurniture.txt";

		private const string GridSnapAnchorSaveFile = "UglyMenu_GridSnapAnchor.txt";

		private LoadManager cachedOutsideFurnitureLoadManager;

		private SaveManager cachedOutsideFurnitureSaveManager;

		private float nextOutsideFurniturePersistenceCheckAt;

		private float nextOutsideFurnitureLoadManagerLookupAt;

		private float nextOutsideFurnitureSaveManagerLookupAt;

		private bool pendingDirectPlaceRelease;

		private float pendingDirectPlaceReleaseAt;

		private object pendingDirectPlaceBuildManager;

		private bool pendingDirectPlaceRearm;

		private float pendingDirectPlaceRearmAt;

		private object pendingDirectPlaceRearmBuildManager;

		private string pendingDirectPlaceRearmItemId = "";

		private int pendingDirectPlaceRearmSlotIndex = -1;

		private bool pendingDirectPlaceGhostRotationRestore;

		private Quaternion pendingDirectPlaceGhostRotation;

		private int pendingDirectPlaceGhostGridRotation;

		private float pendingDirectPlaceGhostRotationRestoreUntil;

		private bool preparedDirectPlaceGhostRotation;

		private Quaternion preparedDirectPlaceGhostWorldRotation;

		private int preparedDirectPlaceGhostGridRotation;

		private bool activeDirectPlaceContinuousBuild;

		private int activeDirectPlaceHotbarSlotIndex = -1;

		private string activeDirectPlaceItemId = "";

		private object activeDirectPlaceBuildManager;

		private readonly RaycastHit[] furniturePlacementHits = (RaycastHit[])(object)new RaycastHit[32];

		private BuildManager cachedFurnitureBuildManager;

		private Grid cachedFurniturePlacementFallbackGrid;

		private Vector3 cachedFurniturePlacementFallbackPoint;

		private float nextFurniturePlacementFallbackGridResolveAt;

		private Grid cachedFurnitureMotelGrid;

		private float nextFurnitureMotelGridResolveAt;

		private IntPtr furnitureTacoUnlockEnsuredPropertyPointer = IntPtr.Zero;

		private Surface cachedFurnitureMotelSurface;

		private float nextFurnitureMotelSurfaceResolveAt;

		private int directPlaceSurfacePlacementFrame = -1;

		private float nextDirectPlaceClientGridManualClickAt;

		private bool remoteDirectPlaceRelayEnabled;

		private bool remoteDirectPlaceGridSnapEnabled;

		private int nativeMotelGridTest;

		private bool persistentDirectPlaceEnabled;

		private bool persistentGridSnapEnabled;

		private bool gridEditorOpen;

		private int gridEditorGhostInstanceId = -1;

		private Vector3 gridEditorGhostAnchorPosition;

		private bool gridEditorMovementStateCaptured;

		private bool gridEditorOriginalCanMove = true;

		private bool gridEditorOriginalCanJump = true;

		private float gridEditorHoldFurnitureWarningUntil;

		private float gridEditorPostConfirmJumpSuppressUntil;

		private bool gridEditorPostConfirmRestoreCanJump = true;

		private Vector3 native16GridAnchorOffset = Vector3.zero;

		private readonly Dictionary<IntPtr, Vector3> native16PlacedPositions = new Dictionary<IntPtr, Vector3>();

		private readonly Dictionary<IntPtr, Quaternion> native16PlacedRotations = new Dictionary<IntPtr, Quaternion>();

		private readonly Dictionary<IntPtr, GridItem> native16PlacedItems = new Dictionary<IntPtr, GridItem>();

		private bool nativeMotelGridCaptured;

		private Vector3 nativeMotelGridOriginalPosition;

		private Quaternion nativeMotelGridOriginalRotation;

		private Vector3 nativeMotelContainerOriginalPosition;

		private Quaternion nativeMotelContainerOriginalRotation;

		private IntPtr nativeMotelGridCapturedPointer = IntPtr.Zero;

		private float nextDirectPlaceSurfaceManualClickAt;

		private readonly HashSet<IntPtr> furnitureTestFreeSurfacePointers = new HashSet<IntPtr>();

		private int furnitureWhiteGhostInstanceId = -1;

		private float nextFurnitureGhostPositionUpdateAt;

		private GameObject furnitureVirtualGridRoot;

		private readonly List<GameObject> furnitureVirtualGridLines = new List<GameObject>();

		private const int FurnitureVirtualGridHalfCells = 5;

		private Grid cachedFurnitureExperimentalGrid;

		private Vector3 cachedFurnitureExperimentalGridPoint;

		private float nextFurnitureExperimentalGridResolveAt;

		private int cachedFurnitureExperimentalGridMethod;

		private float nextWorldCashRainAt;

		private bool worldCashRainResolveWarningLogged;

		private int worldCashRainGridCursor;

		private const int WorldCashRainMaxActive = 1900;

		private const float WorldCashRainLifetime = 60f;

		private readonly List<WorldCashRainPickup> worldCashRainPickups = new List<WorldCashRainPickup>();

		private bool playerMoneyDrop;

		private float playerMoneyDropAmount = 500f;

		private float nextPlayerMoneyDropAt;

		private bool playerMoneyDropResolveWarningLogged;

		private const float PlayerMoneyDropInterval = 0.1f;

		private const float PlayerMoneyDropLifetime = 60f;

		private const int PlayerMoneyDropMaxActive = 600;

		private readonly List<PlayerMoneyDropPickup> playerMoneyDropPickups = new List<PlayerMoneyDropPickup>();

		private MoneyManager cachedPlayerMoneyDropMoneyManager;

		private object cachedPlayerMoneyDropCashSound;

		private MethodInfo cachedPlayerMoneyDropPlayOneShotMethod;

		private float nextVendingMachineScanAt;

		private float nextVendingMoneyPrintAt;

		private readonly List<object> vendingMoneyPrinterMachines = new List<object>();

		private readonly HashSet<int> vendingMoneyPrinterActivatedMachines = new HashSet<int>();

		private readonly Dictionary<int, VendingMoneyPrinterEmitter> vendingMoneyPrinterEmitters = new Dictionary<int, VendingMoneyPrinterEmitter>();

		private float nextForceRainApplyTime;

		private string worldEspRangeText = "100";

		private string worldTimeScaleText = "1";

		private string worldTimeText = "1200";

		private bool onlineTimeScaleRestrictionActive;

		private float nextOnlineTimeScaleRestrictionProbe;

		private bool miscInstantDeadDrop;

		private bool miscInstantLaundering;

		private bool miscAutoMix;

		private bool miscAutoChemistry;

		private bool miscAutoCauldron;

		private bool miscAutoOven;

		private bool miscAutoOvenNetworkSyncInProgress;

		private bool miscAutoDryingRack;

		private float nextMiscAutoProcessingTick;

		private float nextMiscAutoProcessingRescan;

		private readonly List<ChemistryStation> miscAutoChemistryStations = new List<ChemistryStation>();

		private readonly List<Cauldron> miscAutoCauldrons = new List<Cauldron>();

		private readonly List<LabOven> miscAutoOvens = new List<LabOven>();

		private readonly List<DryingRack> miscAutoDryingRacks = new List<DryingRack>();

		private bool miscPerfectPickpocket;

		private bool miscAutoSowSeeds;

		private readonly HashSet<int> miscAutoSowHandledTasks = new HashSet<int>();

		private readonly HashSet<int> miscAutoSowSuccessTasks = new HashSet<int>();

		private bool miscAutoWaterSoil;

		private bool miscInstantSoilEnhancement;

		private bool miscInstantSeedPlanting;

		private bool miscInstantPlantTrimming;

		private float nextMiscAutoWaterSoilTick;

		private float nextMiscAutoWaterSoilRescan;

		private readonly List<Pot> miscAutoWaterSoilPots = new List<Pot>();

		private bool miscAutoPackage;

		private float nextMiscAutoPackageTick;

		private readonly List<PackagingTool> miscAutoPackageTools = new List<PackagingTool>();

		private float nextMiscAutoPackageToolScan;

		private Type miscAutoPackageTaskManagerType;

		private object miscAutoPackageTaskManager;

		private float nextMiscAutoPackageTaskManagerResolve;

		private readonly Dictionary<int, float> miscAutoPackageFirstSeenAt = new Dictionary<int, float>();

		private readonly HashSet<int> miscAutoPackageSealedInstances = new HashSet<int>();

		private readonly Dictionary<int, int> miscAutoPackageStages = new Dictionary<int, int>();

		private Component miscAutoPackageActiveFunctional;

		private readonly HashSet<int> miscAutoPackageVisualPlaced = new HashSet<int>();

		private bool miscAutoPackageStationOpen;

		private PackagingStation miscAutoPackageCurrentStation;

		private bool miscAutoPackageNativeTaskActive;

		private bool miscAutoPackageAwaitingCommit;

		private int miscAutoPackageCommitPackagingQty = -1;

		private int miscAutoPackageCommitProductQty = -1;

		private int miscAutoPackageCommitOutputQty = -1;

		private float miscAutoPackageCommitStartedAt;

		private float miscAutoPackageResumeAfter;

		private bool miscBunnyHop;

		private bool bunnyHopWasAirborne;

		private float lastBunnyHopJumpTime;

		private bool miscUsePlantGrowSpeed;

		private bool miscUseDealSuccessChance;

		private bool miscUseSampleSuccessChance;

		private bool miscDealsAnytime;

		private bool miscPawnTemperAlwaysZero;

		private bool miscPawnShopCounterOffer;

		private PawnShopInterface cachedPawnShopInterface;

		private float nextPawnShopInterfaceResolveAt;

		private bool miscAllCustomersFiending;

		private float lastFiendingCustomerScan;

		private readonly HashSet<int> fiendingTriggeredCustomers = new HashSet<int>();

		private readonly Dictionary<int, float> npcManualFiendingOriginalAddiction = new Dictionary<int, float>();

		private readonly Dictionary<int, FiendingPositionHold> fiendingPositionHolds = new Dictionary<int, FiendingPositionHold>();

		private bool miscUseStackSize;

		private bool miscUseTrashGrabberCapacity;

		private bool miscTrashCanNeverFull;

		private const int MiscTrashCanNeverFullCapacity = 1000000;

		private bool miscTrashDropper;

		private const float MiscTrashDropInterval = 0.1f;

		private float nextMiscTrashDropAt;

		private bool miscTrashDropperResolveWarningLogged;

		private object cachedMiscTrashDropManager;

		private readonly Dictionary<int, TrashCanCapacityState> miscTrashCanCapacityStates = new Dictionary<int, TrashCanCapacityState>();

		private string miscPlantGrowSpeedText = "100";

		private string miscDealSuccessChanceText = "100";

		private string miscSampleSuccessChanceText = "100";

		private string miscStackSizeText = "999";

		private string miscTrashGrabberCapacityText = "100";

		private string teleportFilter = "";

		private string customTeleportName = "";

		private bool mapTapTeleportEnabled;

		private bool mapTapMouseDown;

		private Vector2 mapTapMouseDownPosition;

		private float mapTapMouseDownTime;

		private MapApp cachedMapTapApp;

		private MapPositionUtility cachedMapPositionUtility;

		private bool standaloneMapOpen;

		private bool standaloneMapInputCaptured;

		private bool standaloneMapPreviousCursorVisible;

		private CursorLockMode standaloneMapPreviousCursorLock;

		private bool standaloneMapOriginalCanMove = true;

		private bool standaloneMapOriginalCanJump = true;

		private bool standaloneMapOriginalCanLook = true;

		private bool standaloneMapOriginalHotbarEnabled = true;

		private bool standaloneMapOriginalEquippingEnabled = true;

		private bool standaloneMapOriginalPunchingEnabled = true;

		private PlayerMovement standaloneMapMovement;

		private PlayerCamera standaloneMapCamera;

		private PlayerInventory standaloneMapInventory;

		private PunchController standaloneMapPunchController;

		private Rect standaloneMapScreenRect;

		private Rect standaloneMapSourceLocalRect;

		private bool standaloneMapMouseDown;

		private Vector2 standaloneMapMouseDownPosition;

		private int standaloneMapRevealAfterFrame = -1;

		private float standaloneMapAutoCloseAt;

		private bool standaloneMapPostTeleportCalibrationPending;

		private Vector2 standaloneMapPostTeleportCalibrationVisual;

		private float standaloneMapPostTeleportCalibrationAt;

		private int standaloneMapCalibrationAttemptIndex;

		private int standaloneMapCalibrationLastAttempt;

		private const int StandaloneMapCalibrationAttemptCount = 12;

		private const float StandaloneMapBakedScaleX = 0.987165f;

		private const float StandaloneMapBakedOffsetX = 1025.084f;

		private const float StandaloneMapBakedScaleY = 1.002912f;

		private const float StandaloneMapBakedOffsetY = -1028.558f;

		private float standaloneMapActiveScaleX = 0.987165f;

		private float standaloneMapActiveOffsetX = 1025.084f;

		private float standaloneMapActiveScaleY = 1.002912f;

		private float standaloneMapActiveOffsetY = -1028.558f;

		private bool standaloneMapHasSavedCalibration;

		private bool standaloneMapRecalibrationMode;

		private string standaloneMapCalibrationStatus = "";

		private GameObject standaloneMapRenderCameraObject;

		private Camera standaloneMapRenderCamera;

		private GameObject standaloneMapSpriteObject;

		private SpriteRenderer standaloneMapSpriteRenderer;

		private readonly List<Vector2> mapCalibrationUtility = new List<Vector2>();

		private readonly List<Vector2> mapCalibrationVisual = new List<Vector2>();

		private string mapCalibrationRectName = "";

		private bool mapCalibrationPending;

		private float mapCalibrationReadyAt;

		private RectTransform cachedMapPlayerMarker;

		private bool mapGroundSnapPending;

		private Vector2 mapGroundSnapXZ;

		private float mapGroundSnapUntil;

		private float mapGroundSnapNextTry;

		private RectTransform mapTapViewRect;

		private Vector2 mapTapViewAnchoredPosition;

		private Vector3 mapTapViewLocalScale;

		private bool mapTapViewRestorePending;

		private float mapTapViewRestoreUntil;

		private bool mapPoiPressBlockActive;

		private RectTransform mapPoiPressBlockRect;

		private Vector2 mapPoiPressBlockAnchoredPosition;

		private Vector3 mapPoiPressBlockLocalPosition;

		private Vector3 mapPoiPressBlockLocalScale;

		private readonly List<PropertyBusinessEntry> propertyBusinessRegistry = new List<PropertyBusinessEntry>();

		private readonly List<PropertyEmployeeRole> propertyBusinessEmployeeRoles = new List<PropertyEmployeeRole>();

		private Vector2 propertyBusinessScroll;

		private Vector2 propertyBusinessEmployeeScroll;

		private string propertyBusinessSearch = "";

		private string propertyBusinessSelectedKey = "";

		private float nextPropertyBusinessRegistryRefresh;

		private bool propertyBusinessRegistryLoaded;

		private string propertyBusinessUnavailableRole = "";

		private float propertyBusinessUnavailableUntil;

		private readonly Dictionary<string, EmployeeIdlePositionRecord> propertyEmployeeIdlePositions = new Dictionary<string, EmployeeIdlePositionRecord>(StringComparer.OrdinalIgnoreCase);

		private readonly Dictionary<string, PropertyGroupIdlePositionRecord> propertyGroupIdlePositions = new Dictionary<string, PropertyGroupIdlePositionRecord>(StringComparer.OrdinalIgnoreCase);

		private readonly Dictionary<string, PropertyDisposalPositionRecord> propertyCleanerDisposalPositions = new Dictionary<string, PropertyDisposalPositionRecord>(StringComparer.OrdinalIgnoreCase);

		private readonly Dictionary<string, InfiniteEmployeeRosterRecord> infiniteEmployeeRosters = new Dictionary<string, InfiniteEmployeeRosterRecord>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> infiniteEmployeeProperties = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly Dictionary<string, int> propertyBusinessNativeEmployeeCapacities = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);

		private const int InfiniteEmployeeCapacity = 9999;

		private const float PropertyGroupIdleCenterSpacing = 0.67f;

		private const string PropertyEmployeePositionSaveFile = "UglyMenu_EmployeePositions.txt";

		private const string PropertyEmployeePersistentFolder = "UglyMenu_EmployeePropertyState";

		private string propertyEmployeePositionLoadedSavePath = "";

		private string propertyBusinessSelectedEmployeeKey = "";

		private float nextPropertyEmployeePositionTick;

		private float nextInfiniteEmployeeRosterSnapshotAt;

		private float propertyEmployeeIdleRestoreReadyAt;

		private float propertyInfiniteEmployeeAssignmentGuardUntil;

		private float propertyDisposalRestoreReadyAt;

		private readonly Dictionary<string, EmployeeRuntimeControlRecord> propertyEmployeeRuntimeControls = new Dictionary<string, EmployeeRuntimeControlRecord>(StringComparer.OrdinalIgnoreCase);

		private readonly List<PendingRemoteHirePlacement> pendingRemoteHirePlacements = new List<PendingRemoteHirePlacement>();

		private readonly HashSet<string> pendingRemoteHireClaimedKeys = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private float nextEmployeeRuntimeControlTick;

		private const float RemoteHirePropertyDistance = 80f;

		private object propertylessEmployeeTestEmployee;

		private object propertylessEmployeeTestOriginalProperty;

		private string propertylessEmployeeTestName = "";

		private const int MotelEmployeeCapacityOverride = 64;

		private float nextMotelEmployeeOverrideAt;

		private string employeeFilter = "";

		private string employeeSpeedText = "2";

		private float lastNastyCheatTick;

		private float lastNastyMiscTick;

		private float noClipSpeed = 10f;

		private readonly List<string> playerRankNames = new List<string>();

		private int playerRankIndex;

		private int playerRankTier = 1;

		private int playerRankTiersPerRank = 5;

		private bool playerRanksLoaded;

		private bool levelRankupPopupPending;

		private float levelRankupPopupNextAt;

		private float levelRankupPopupReadyAt;

		private int levelRankupPopupAttempts;

		private int levelRankupPopupTargetTotalXp;

		private object levelRankupPopupOldRank;

		private object levelRankupPopupNewRank;

		private bool rankupCursorControlActive;

		private float rankupCursorGraceUntil;

		private RankUpCanvas rankupCursorCanvas;

		private readonly List<Component> cachedNpcEsp = new List<Component>();

		private readonly List<Component> cachedPlayerEsp = new List<Component>();

		private float lastTypedEspRefresh;

		private float lastEspRenderErrorLog = -999f;

		private readonly Dictionary<int, string> cachedEspNames = new Dictionary<int, string>();

		private bool nastyLiveCacheReady;

		private Object[] cachedNastySceneObjects = (Object[])(object)new Object[0];

		private Transform cachedLocalPlayerTransform;

		private Component cachedCharacterController;

		private readonly List<Object> cachedSupplierTargets = new List<Object>();

		private readonly List<Object> cachedLaunderingTargets = new List<Object>();

		private readonly List<Object> cachedMixingTargets = new List<Object>();

		private readonly List<Object> cachedItemDefinitionTargets = new List<Object>();

		private readonly List<Object> cachedTrashGrabberTargets = new List<Object>();

		private readonly List<Object> cachedGrowthTargets = new List<Object>();

		private readonly List<Object> cachedDealChanceTargets = new List<Object>();

		private bool growthTargetsCached;

		private bool dealTargetsCached;

		private string lastAppliedGrowthText;

		private string lastAppliedDealText;

		private string lastAppliedStackText;

		private string worldEspMaxLabelsText = "50";

		private readonly List<TeleportEntry> teleportLocations = new List<TeleportEntry>();

		private readonly List<TeleportEntry> customTeleports = new List<TeleportEntry>();

		private string customTeleportLoadedScope = string.Empty;

		private readonly List<Component> cachedEmployees = new List<Component>();

		private readonly Dictionary<int, int> originalStackLimits = new Dictionary<int, int>();

		private readonly Dictionary<string, float> employeeOriginalValues = new Dictionary<string, float>();

		private readonly List<NpcVisualParticle> npcVisualParticles = new List<NpcVisualParticle>();

		private readonly List<PendingNpcExplosion> pendingNpcExplosions = new List<PendingNpcExplosion>();

		private readonly List<PendingNpcCashVomit> pendingNpcCashVomits = new List<PendingNpcCashVomit>();

		private GameObject npcCashPickupPrefab;

		private GameObject remoteVanillaItemPickupPrefab;

		private float nextNpcCashPrefabResolveAt;

		private bool npcCashPrefabSearchLogged;

		private bool npcCashPrefabPrescanSaveActive;

		private string npcCashPrefabPrescanSavePath = "";

		private float nextNpcCashPrefabPrescanAt;

		private ItemDef[] Items = new ItemDef[166]
		{
			new ItemDef("TV", "TV"),
			new ItemDef("Acid", "acid"),
			new ItemDef("Addy", "addy"),
			new ItemDef("Air Pot", "airpot"),
			new ItemDef("Antique Wall Lamp", "antiquewalllamp"),
			new ItemDef("Apron", "apron"),
			new ItemDef("Artwork (Beach Day)", "artworkbeachday"),
			new ItemDef("Artwork (Lines)", "artworklines"),
			new ItemDef("Artwork (Menace)", "artworkmenace"),
			new ItemDef("Artwork (Millie)", "artworkmillie"),
			new ItemDef("Artwork (Offer)", "artworkoffer"),
			new ItemDef("Artwork (Rapscallion)", "artworkrapscallion"),
			new ItemDef("Baby Blue", "babyblue"),
			new ItemDef("Baggie", "baggie"),
			new ItemDef("Banana", "banana"),
			new ItemDef("Baseball Bat", "baseballbat"),
			new ItemDef("Battery", "battery"),
			new ItemDef("Bed", "bed"),
			new ItemDef("Belt", "belt"),
			new ItemDef("Big Sprinkler", "bigsprinkler"),
			new ItemDef("Biker Crank", "bikercrank"),
			new ItemDef("Blazer", "blazer"),
			new ItemDef("Brick", "brick"),
			new ItemDef("Brick Press", "brickpress"),
			new ItemDef("Brut du Gloop", "brutdugloop"),
			new ItemDef("Bucket Hat", "buckethat"),
			new ItemDef("Button-Up Shirt", "buttonup"),
			new ItemDef("Cap", "cap"),
			new ItemDef("Cargo Pants", "cargopants"),
			new ItemDef("Cash", "cash"),
			new ItemDef("Cauldron", "cauldron"),
			new ItemDef("Chateau La Peepee", "chateaulapeepee"),
			new ItemDef("Cheap Skateboard", "cheapskateboard"),
			new ItemDef("Chef Hat", "chefhat"),
			new ItemDef("Chemistry Station", "chemistrystation"),
			new ItemDef("Chili", "chili"),
			new ItemDef("Cocaine", "cocaine"),
			new ItemDef("Cocaine Base", "cocainebase"),
			new ItemDef("Coca Leaf", "cocaleaf"),
			new ItemDef("Coca Seed", "cocaseed"),
			new ItemDef("Coffee Table", "coffeetable"),
			new ItemDef("Collar Jacket", "collarjacket"),
			new ItemDef("Combat Boots", "combatboots"),
			new ItemDef("Cowboy Hat", "cowboyhat"),
			new ItemDef("Cruiser", "cruiser"),
			new ItemDef("Cuke", "cuke"),
			new ItemDef("Default Weed", "defaultweed"),
			new ItemDef("Display Cabinet", "displaycabinet"),
			new ItemDef("Donut", "donut"),
			new ItemDef("Dress Shoes", "dressshoes"),
			new ItemDef("Drying Rack", "dryingrack"),
			new ItemDef("Dumpster", "dumpster"),
			new ItemDef("Electric Plant Trimmers", "electrictrimmers"),
			new ItemDef("Energy Drink", "energydrink"),
			new ItemDef("Extra Long-Life Soil", "extralonglifesoil"),
			new ItemDef("Fertilizer", "fertilizer"),
			new ItemDef("Filing Cabinet", "filingcabinet"),
			new ItemDef("Fingerless Gloves", "fingerlessgloves"),
			new ItemDef("Flannel Shirt", "flannelshirt"),
			new ItemDef("Flashlight", "flashlight"),
			new ItemDef("Flat Cap", "flatcap"),
			new ItemDef("Flats", "flats"),
			new ItemDef("Floor Lamp", "floorlamp"),
			new ItemDef("Flu Medicine", "flumedicine"),
			new ItemDef("Frying Pan", "fryingpan"),
			new ItemDef("Full Spectrum Grow Light", "fullspectrumgrowlight"),
			new ItemDef("Gasoline", "gasoline"),
			new ItemDef("Glass", "glass"),
			new ItemDef("Gloves", "gloves"),
			new ItemDef("Gold Bar", "goldbar"),
			new ItemDef("Gold Chain", "goldchain"),
			new ItemDef("Gold Watch", "goldwatch"),
			new ItemDef("Golden Skateboard", "goldenskateboard"),
			new ItemDef("Grandaddy Purple", "granddaddypurple"),
			new ItemDef("Grandaddy Purple Seed", "granddaddypurpleseed"),
			new ItemDef("Grandfather Clock", "grandfatherclock"),
			new ItemDef("Green Crack", "greencrack"),
			new ItemDef("Green Crack Seed", "greencrackseed"),
			new ItemDef("Grow Tent", "growtent"),
			new ItemDef("Halogen Grow Light", "halogengrowlight"),
			new ItemDef("High-Quality Pseudo", "highqualitypseudo"),
			new ItemDef("Horse Semen", "horsesemen"),
			new ItemDef("Iodine", "iodine"),
			new ItemDef("Jar", "jar"),
			new ItemDef("Jeans", "jeans"),
			new ItemDef("Jorts", "jorts"),
			new ItemDef("Lab Oven", "laboven"),
			new ItemDef("Large Storage Rack", "largestoragerack"),
			new ItemDef("Laundering Station", "launderingstation"),
			new ItemDef("LED Grow Light", "ledgrowlight"),
			new ItemDef("Legend Sunglasses", "legendsunglasses"),
			new ItemDef("Lightweight Skateboard", "lightweightskateboard"),
			new ItemDef("Baby Blue (Liquid)", "liquidbabyblue"),
			new ItemDef("Biker Crank (Liquid)", "liquidbikercrank"),
			new ItemDef("Glass (Liquid)", "liquidglass"),
			new ItemDef("Meth (Liquid)", "liquidmeth"),
			new ItemDef("Long-Life Soil", "longlifesoil"),
			new ItemDef("Long Skirt", "longskirt"),
			new ItemDef("Low-Quality Pseudo", "lowqualitypseudo"),
			new ItemDef("M1911", "m1911"),
			new ItemDef("M1911 Magazine", "m1911mag"),
			new ItemDef("Machete", "machete"),
			new ItemDef("Management Clipboard", "managementclipboard"),
			new ItemDef("Medium Storage Rack", "mediumstoragerack"),
			new ItemDef("Mega Bean", "megabean"),
			new ItemDef("Metal Sign", "metalsign"),
			new ItemDef("Metal Square Table", "metalsquaretable"),
			new ItemDef("Meth", "meth"),
			new ItemDef("Mixing Station", "mixingstation"),
			new ItemDef("Mixing Station Mk2", "mixingstationmk2"),
			new ItemDef("Modern Wall Lamp", "modernwalllamp"),
			new ItemDef("Moisture-Preserving Pot", "moisturepreservingpot"),
			new ItemDef("Motor Oil", "motoroil"),
			new ItemDef("Mouth Wash", "mouthwash"),
			new ItemDef("OG Kush", "ogkush"),
			new ItemDef("OG Kush Seed", "ogkushseed"),
			new ItemDef("Ol' Man Jimmy's", "oldmanjimmys"),
			new ItemDef("Overalls", "overalls"),
			new ItemDef("Packaging Station", "packagingstation"),
			new ItemDef("Packaging Station Mk2", "packagingstationmk2"),
			new ItemDef("Paracetamol", "paracetamol"),
			new ItemDef("PGR", "pgr"),
			new ItemDef("Phosphorus", "phosphorus"),
			new ItemDef("Plastic Pot", "plasticpot"),
			new ItemDef("Porkpie Hat", "porkpiehat"),
			new ItemDef("Pot Sprinkler", "potsprinkler"),
			new ItemDef("Pseudo", "pseudo"),
			new ItemDef("Rectangle Frame Glasses", "rectangleframeglasses"),
			new ItemDef("Revolver", "revolver"),
			new ItemDef("Revolver Cylinder", "revolvercylinder"),
			new ItemDef("Button-Up Shirt (Rolled)", "rolledbuttonup"),
			new ItemDef("Safe", "safe"),
			new ItemDef("Sandals", "sandals"),
			new ItemDef("Saucepan", "saucepan"),
			new ItemDef("Silver Chain", "silverchain"),
			new ItemDef("Silver Watch", "silverwatch"),
			new ItemDef("Skateboard", "skateboard"),
			new ItemDef("Skirt", "skirt"),
			new ItemDef("Small Round Glasses", "smallroundglasses"),
			new ItemDef("Small Storage Rack", "smallstoragerack"),
			new ItemDef("Small Trash Can", "smalltrashcan"),
			new ItemDef("Sneakers", "sneakers"),
			new ItemDef("Soil", "soil"),
			new ItemDef("Soil Pourer", "soilpourer"),
			new ItemDef("Sour Diesel", "sourdiesel"),
			new ItemDef("Sour Diesel Seed", "sourdieselseed"),
			new ItemDef("Speed Dealer Shades", "speeddealershades"),
			new ItemDef("Speed Grow", "speedgrow"),
			new ItemDef("Suspension Rack", "suspensionrack"),
			new ItemDef("Tactical Vest", "tacticalvest"),
			new ItemDef("Test Weed", "testweed"),
			new ItemDef("Trash Bag", "trashbag"),
			new ItemDef("Trash Can", "trashcan"),
			new ItemDef("Trash Grabber", "trashgrabber"),
			new ItemDef("Toilet (Pre-owned)", "toilet"),
			new ItemDef("Golden Toilet", "goldentoilet"),
			new ItemDef("Plant Trimmers", "trimmers"),
			new ItemDef("T-Shirt", "tshirt"),
			new ItemDef("Vest", "vest"),
			new ItemDef("Viagra", "viagra"),
			new ItemDef("V-Neck Shirt", "vneck"),
			new ItemDef("Wall Clock", "wallclock"),
			new ItemDef("Wall-Mounted Shelf", "wallmountedshelf"),
			new ItemDef("Watering Can", "wateringcan"),
			new ItemDef("Wooden Sign", "woodensign"),
			new ItemDef("Wooden Square Table", "woodsquaretable")
		};

		private const float CartelInfluenceMenuScale = 1000f;

		private const string SharedWorldBuild = "v053akh";

		private const string SharedWorldBuildKey = "uglymenu_sharedworld_build";

		private const string SharedWorldFurniturePrefix = "uglymenu_sharedworld_furn";

		private const string SharedWorldRvKey = "uglymenu_sharedworld_rv";

		private const int SharedWorldChunkSize = 3000;

		private const float SharedWorldPollInterval = 1.25f;

		private float nextSharedWorldSyncAt;

		private readonly Dictionary<string, MethodInfo> sharedWorldMethodCache = new Dictionary<string, MethodInfo>(StringComparer.Ordinal);

		private bool sharedWorldInLobby;

		private bool sharedWorldIsHost;

		private string sharedWorldLastFurnitureSnapshot = string.Empty;

		private int sharedWorldFurnitureRevision;

		private int sharedWorldFurnitureChunkCount;

		private int sharedWorldClientFurnitureRevision = -1;

		private int sharedWorldFurnitureApplyPasses;

		private float sharedWorldNextFurnitureApplyAt;

		private readonly HashSet<string> sharedWorldClientFurnitureGuids = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly Dictionary<string, GameObject> sharedWorldFurnitureVisuals = new Dictionary<string, GameObject>(StringComparer.OrdinalIgnoreCase);

		private readonly Dictionary<string, GameObject> sharedWorldFurnitureNativeObjects = new Dictionary<string, GameObject>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> sharedWorldFurnitureMissingItemLogged = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<string> sharedWorldHostObservedFurnitureGuids = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

		private readonly Dictionary<string, GameObject> sharedWorldHostFurnitureObjects = new Dictionary<string, GameObject>(StringComparer.OrdinalIgnoreCase);

		private bool sharedWorldHostRvKnown;

		private bool sharedWorldHostRvRepaired;

		private int sharedWorldRvRevision;

		private int sharedWorldClientRvRevision = -1;

		private const int StandaloneMapMarkerPlace = 0;

		private const int StandaloneMapMarkerDeal = 1;

		private const int StandaloneMapMarkerDeadDrop = 2;

		private readonly List<StandaloneMapOverlayMarker> standaloneMapOverlayMarkers = new List<StandaloneMapOverlayMarker>();

		private float standaloneMapNextOverlayMarkerRefreshAt;

		private readonly List<NativeWorldModelEntry> nativeWorldModels = new List<NativeWorldModelEntry>();

		private readonly List<GameObject> nativeWorldPlacedThisSession = new List<GameObject>();

		private readonly List<NativeWorldPlacedRecord> nativeWorldPlacedRecords = new List<NativeWorldPlacedRecord>();

		private readonly List<NativeWorldSavedPlacement> nativeWorldPendingSavedPlacements = new List<NativeWorldSavedPlacement>();

		private readonly List<NativeWorldPlacedStaticDrawPart> nativeWorldPlacedStaticDrawParts = new List<NativeWorldPlacedStaticDrawPart>();

		private Vector2 nativeWorldModelScroll;

		private string nativeWorldModelSearch = "";

		private int nativeWorldModelSelected = -1;

		private bool nativeWorldModelsLoaded;

		private bool nativeWorldModelsScanning;

		private readonly Queue<Transform> nativeWorldModelScanQueue = new Queue<Transform>();

		private readonly Queue<GameObject> nativeWorldModelCandidateQueue = new Queue<GameObject>();

		private readonly Dictionary<string, NativeWorldModelEntry> nativeWorldModelScanFound = new Dictionary<string, NativeWorldModelEntry>(StringComparer.OrdinalIgnoreCase);

		private readonly HashSet<int> nativeWorldModelKnownRootIds = new HashSet<int>();

		private int nativeWorldModelScanProcessedNodes;

		private int nativeWorldModelScanProcessedCandidates;

		private float nativeWorldModelScanNextStatusAt;

		private GameObject nativeWorldModelGhost;

		private NativeWorldModelEntry nativeWorldModelPlacementEntry;

		private bool nativeWorldModelPlacementMode;

		private bool nativeWorldModelGroundSnap = true;

		private bool nativeWorldModelCollision = true;

		private bool nativeWorldModelPlacementV