Decompiled source of T Mod pack v1.0.1

CDXX.dll

Decompiled 5 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Threading.Tasks;
using CDXX;
using HarmonyLib;
using Il2CppFishNet.Connection;
using Il2CppFishNet.Managing.Logging;
using Il2CppFishNet.Managing.Server;
using Il2CppFishNet.Object;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppScheduleOne;
using Il2CppScheduleOne.Combat;
using Il2CppScheduleOne.DevUtilities;
using Il2CppScheduleOne.Dialogue;
using Il2CppScheduleOne.Economy;
using Il2CppScheduleOne.Employees;
using Il2CppScheduleOne.Equipping;
using Il2CppScheduleOne.GameTime;
using Il2CppScheduleOne.ItemFramework;
using Il2CppScheduleOne.Levelling;
using Il2CppScheduleOne.Messaging;
using Il2CppScheduleOne.Money;
using Il2CppScheduleOne.NPCs;
using Il2CppScheduleOne.NPCs.Behaviour;
using Il2CppScheduleOne.NPCs.CharacterClasses;
using Il2CppScheduleOne.NPCs.Relation;
using Il2CppScheduleOne.ObjectScripts;
using Il2CppScheduleOne.Persistence;
using Il2CppScheduleOne.PlayerScripts;
using Il2CppScheduleOne.Police;
using Il2CppScheduleOne.Product;
using Il2CppScheduleOne.Product.Packaging;
using Il2CppScheduleOne.Property;
using Il2CppScheduleOne.Quests;
using Il2CppScheduleOne.Storage;
using Il2CppScheduleOne.Trash;
using Il2CppScheduleOne.UI;
using Il2CppScheduleOne.UI.MainMenu;
using Il2CppScheduleOne.UI.Phone;
using Il2CppScheduleOne.UI.Phone.Messages;
using Il2CppScheduleOne.UI.Shop;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using Il2CppTMPro;
using MelonLoader;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(CDXXCore), "CDXX", "1.6.3", "Arcturus", "https://www.nexusmods.com/schedule1/mods/89?tab=description")]
[assembly: MelonGame("TVGS", "Schedule I")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("CDXX")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("CDXX")]
[assembly: AssemblyTitle("CDXX")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace CDXX
{
	public static class Setup
	{
		public static string Version = "1.6.3";
	}
	public class CDXXCore : MelonMod
	{
		[CompilerGenerated]
		private sealed class <InitializeCDXX>d__7 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public CDXXCore <>4__this;

			private NPC[] <allNPCs>5__1;

			private Scene <scene>5__2;

			private NPC[] <>s__3;

			private int <>s__4;

			private NPC <npc>5__5;

			private IEnumerator<GameObject> <>s__6;

			private GameObject <obj>5__7;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<allNPCs>5__1 = null;
				<>s__3 = null;
				<npc>5__5 = null;
				<>s__6 = null;
				<obj>5__7 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
				//IL_0103: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = CDXXManager.WaitForRequiredSystems();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<allNPCs>5__1 = Il2CppArrayBase<NPC>.op_Implicit(Object.FindObjectsOfType<NPC>(true));
					<>s__3 = <allNPCs>5__1;
					for (<>s__4 = 0; <>s__4 < <>s__3.Length; <>s__4++)
					{
						<npc>5__5 = <>s__3[<>s__4];
						if ((Object)(object)<npc>5__5 != (Object)null && <npc>5__5.ID.Contains("beth"))
						{
							<>4__this._cdxxManager = CDXXManager.CreateNew(<npc>5__5);
							break;
						}
						<npc>5__5 = null;
					}
					<>s__3 = null;
					<>4__this._cdxxManager?.StartConversation();
					<scene>5__2 = SceneManager.GetActiveScene();
					<>s__6 = ((Il2CppArrayBase<GameObject>)(object)((Scene)(ref <scene>5__2)).GetRootGameObjects()).GetEnumerator();
					try
					{
						while (<>s__6.MoveNext())
						{
							<obj>5__7 = <>s__6.Current;
							if (((Object)<obj>5__7).name == "CDXX_CustomInput")
							{
								<>4__this.ChatObject = <obj>5__7;
							}
							<obj>5__7 = null;
						}
					}
					finally
					{
						if (<>s__6 != null)
						{
							<>s__6.Dispose();
						}
					}
					<>s__6 = null;
					if ((Object)(object)<>4__this.ChatObject == (Object)null)
					{
						MelonLogger.Error("Failed to find CDXX_CustomInput");
					}
					MelonLogger.Warning("[CDXX] Successfully Initialized");
					return false;
				}
			}

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

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

		private bool loadCDXX = true;

		private CDXXManager _cdxxManager;

		public TextMeshProUGUI TitleClone;

		public GameObject ChatObject;

		public override void OnInitializeMelon()
		{
			MelonLogger.Warning("Successfully Loaded Melon");
		}

		public override void OnSceneWasInitialized(int buildIndex, string sceneName)
		{
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			if (sceneName == "Main")
			{
				if (((MelonBase)this).MelonAssembly.Assembly.FullName.Contains("CDXX"))
				{
					if (loadCDXX)
					{
						MelonLogger.Warning("[CDXX] Initializing CDXX");
						MelonCoroutines.Start(InitializeCDXX());
					}
				}
				else
				{
					MelonLogger.Error("AuthError");
				}
				MelonLogger.Warning("[CDXX] Settings:");
				MelonLogger.Msg($"Enabled: {loadCDXX}");
			}
			else if (sceneName == "Menu" && !((Object)(object)TitleClone != (Object)null))
			{
				TitleClone = Object.Instantiate<TextMeshProUGUI>(GameObject.Find("MainMenu/Home/Bank/Title").GetComponentInChildren<TextMeshProUGUI>());
				((Object)TitleClone).name = "CDXXVer";
				((Graphic)TitleClone).color = Color.white;
				((TMP_Text)TitleClone).transform.SetParent(((TMP_Text)GameObject.Find("MainMenu/Home/Bank/Title").GetComponentInChildren<TextMeshProUGUI>()).transform.parent, false);
				Transform transform = ((TMP_Text)TitleClone).transform;
				Resolution currentResolution = Screen.currentResolution;
				transform.position = new Vector3(300f, (float)((Resolution)(ref currentResolution)).height);
				((TMP_Text)TitleClone).text = $"CDXX v{Setup.Version}\nStatus: {(loadCDXX ? "Enabled" : "Disabled")}\nF4: Toggle CDXX";
			}
		}

		public override void OnUpdate()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).name == "Menu")
			{
				if (!((Object)(object)TitleClone == (Object)null))
				{
					if (Input.GetKeyDown((KeyCode)285))
					{
						loadCDXX = !loadCDXX;
						((TMP_Text)TitleClone).text = $"CDXX v{Setup.Version}\nStatus: {(loadCDXX ? "Enabled" : "Disabled")}\nF4: Toggle CDXX";
					}
					Transform transform = ((TMP_Text)TitleClone).transform;
					Resolution currentResolution = Screen.currentResolution;
					transform.position = new Vector3(150f, (float)(((Resolution)(ref currentResolution)).height - 50));
					((Graphic)TitleClone).color = (loadCDXX ? Color.green : Color.red);
				}
			}
			else
			{
				if (!(((Scene)(ref activeScene)).name == "Main") || _cdxxManager == null || !ChatObject.active || !_cdxxManager._awaitingInput)
				{
					return;
				}
				if (Input.GetKeyDown((KeyCode)27) && ChatObject.active)
				{
					_cdxxManager._awaitingInput = false;
					ChatObject.SetActive(false);
					((Component)Singleton<GameInput>.Instance.PlayerInput).gameObject.SetActive(true);
				}
				string inputString = Input.inputString;
				for (int i = 0; i < inputString.Length; i++)
				{
					char c = inputString[i];
					switch (c)
					{
					case '\b':
						if (_cdxxManager._currentInput.Length > 0)
						{
							CDXXManager cdxxManager = _cdxxManager;
							string currentInput = _cdxxManager._currentInput;
							cdxxManager._currentInput = currentInput.Substring(0, currentInput.Length - 1);
						}
						break;
					default:
						if (c != '\r')
						{
							if (!char.IsControl(c))
							{
								_cdxxManager._currentInput += c;
							}
							break;
						}
						goto case '\n';
					case '\n':
						_cdxxManager._awaitingInput = false;
						_cdxxManager._currentInputCallback?.Invoke(_cdxxManager._currentInput);
						break;
					}
				}
				((TMP_Text)_cdxxManager._inputDescription).text = _cdxxManager._currentPrompt + ":";
				((TMP_Text)_cdxxManager._inputDisplay).text = _cdxxManager._currentInput + "|";
			}
		}

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

		public override void OnSceneWasUnloaded(int buildIndex, string sceneName)
		{
			if (sceneName == "Main")
			{
				MelonLogger.Warning("[CDXX] Cleaning");
				_cdxxManager?.FullCleanup();
				_cdxxManager = null;
				MelonLogger.Warning("[CDXX] Cleanup Done");
			}
		}
	}
	public class CDXXManager
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass53_0
		{
			public string input;

			internal void <ChangeProductStat>b__0(string result)
			{
				input = result;
			}
		}

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

			private object <>2__current;

			public ProductDefinition product;

			public string statName;

			public Action<ProductDefinition, float> floatSetter;

			public Func<ProductDefinition, float> floatGetter;

			public Action<ProductDefinition, string> stringSetter;

			public Func<ProductDefinition, string> stringGetter;

			public CDXXManager <>4__this;

			private <>c__DisplayClass53_0 <>8__1;

			private string <currentValue>5__2;

			private float <newFloatValue>5__3;

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

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

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

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

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>8__1 = new <>c__DisplayClass53_0();
					<currentValue>5__2 = ((floatGetter != null) ? floatGetter(product).ToString() : stringGetter(product));
					<>8__1.input = "";
					<>2__current = <>4__this.WaitForInput($"Enter new {statName} (current: {<currentValue>5__2})", delegate(string result)
					{
						<>8__1.input = result;
					});
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					if (floatSetter != null && float.TryParse(<>8__1.input, out <newFloatValue>5__3))
					{
						floatSetter(product, <newFloatValue>5__3);
						<>4__this._messageSystem.SendNPCMessage($"{statName} changed to {<newFloatValue>5__3}");
					}
					else if (stringSetter != null)
					{
						stringSetter(product, <>8__1.input);
						<>4__this._messageSystem.SendNPCMessage(statName + " changed to " + <>8__1.input);
					}
					else
					{
						<>4__this._messageSystem.SendNPCMessage("Invalid input entered");
					}
					<>4__this.ShowProductOptions(product);
					return false;
				}
			}

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

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

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

			private object <>2__current;

			public Action callback;

			public CDXXManager <>4__this;

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

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

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

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

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					break;
				case 1:
					<>1__state = -1;
					break;
				}
				if (<>4__this.isChoosing)
				{
					<>2__current = null;
					<>1__state = 1;
					return true;
				}
				callback();
				return false;
			}

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

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

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

			private object <>2__current;

			public string prompt;

			public Action<string> callback;

			public CDXXManager <>4__this;

			private Scene <scene>5__1;

			private IEnumerator<GameObject> <>s__2;

			private GameObject <obj>5__3;

			private IEnumerator<GameObject> <>s__4;

			private GameObject <obj>5__5;

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

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

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

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

			private bool MoveNext()
			{
				//IL_0062: Unknown result type (might be due to invalid IL or missing references)
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>4__this._currentPrompt = prompt;
					<>4__this._currentInputCallback = callback;
					<>4__this._awaitingInput = true;
					<>4__this._currentInput = "";
					<scene>5__1 = SceneManager.GetActiveScene();
					<>s__2 = ((Il2CppArrayBase<GameObject>)(object)((Scene)(ref <scene>5__1)).GetRootGameObjects()).GetEnumerator();
					try
					{
						while (<>s__2.MoveNext())
						{
							<obj>5__3 = <>s__2.Current;
							if (((Object)<obj>5__3).name == "CDXX_CustomInput")
							{
								<obj>5__3.SetActive(true);
							}
							<obj>5__3 = null;
						}
					}
					finally
					{
						if (<>s__2 != null)
						{
							<>s__2.Dispose();
						}
					}
					<>s__2 = null;
					((TMP_Text)<>4__this._inputDescription).text = prompt + ":";
					((TMP_Text)<>4__this._inputDisplay).text = <>4__this._currentInput + "|";
					((Component)Singleton<GameInput>.Instance.PlayerInput).gameObject.SetActive(false);
					PlayerSingleton<PlayerCamera>.Instance.SetCanLook(false);
					break;
				case 1:
					<>1__state = -1;
					break;
				}
				if (<>4__this._awaitingInput)
				{
					<>2__current = null;
					<>1__state = 1;
					return true;
				}
				<>s__4 = ((Il2CppArrayBase<GameObject>)(object)((Scene)(ref <scene>5__1)).GetRootGameObjects()).GetEnumerator();
				try
				{
					while (<>s__4.MoveNext())
					{
						<obj>5__5 = <>s__4.Current;
						if (((Object)<obj>5__5).name == "CDXX_CustomInput")
						{
							<obj>5__5.SetActive(false);
						}
						<obj>5__5 = null;
					}
				}
				finally
				{
					if (<>s__4 != null)
					{
						<>s__4.Dispose();
					}
				}
				<>s__4 = null;
				((Component)Singleton<GameInput>.Instance.PlayerInput).gameObject.SetActive(true);
				PlayerSingleton<PlayerCamera>.Instance.SetCanLook(true);
				return false;
			}

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

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

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

			private object <>2__current;

			private float <timeout>5__1;

			private float <elapsed>5__2;

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

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

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

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

			private bool MoveNext()
			{
				//IL_0051: Unknown result type (might be due to invalid IL or missing references)
				//IL_005b: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<timeout>5__1 = 30f;
					<elapsed>5__2 = 0f;
					break;
				case 1:
					<>1__state = -1;
					break;
				}
				if (((Object)(object)Singleton<NotificationsManager>.Instance == (Object)null || (Object)(object)PlayerSingleton<MessagesApp>.Instance == (Object)null || (Object)(object)PlayerSingleton<DealerManagementApp>.Instance == (Object)null || (Object)(object)NetworkSingleton<NPCManager>.Instance == (Object)null || (Object)(object)NetworkSingleton<MoneyManager>.Instance == (Object)null || (Object)(object)NetworkSingleton<LevelManager>.Instance == (Object)null || (Object)(object)PlayerSingleton<PlayerInventory>.Instance == (Object)null) && <elapsed>5__2 < <timeout>5__1)
				{
					<elapsed>5__2 += 0.1f;
					<>2__current = (object)new WaitForSeconds(0.1f);
					<>1__state = 1;
					return true;
				}
				if (<elapsed>5__2 >= <timeout>5__1)
				{
					MelonLogger.Error("Timed out waiting for required systems");
				}
				return false;
			}

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

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

		private static CDXXManager _instance;

		public CDXXMessageSystem _messageSystem;

		public NPC _npcInstance;

		public Supplier _supplierInstance;

		public GameObject _npcObject;

		public NPC _npcTemplate;

		public RectTransform _panelRt;

		public bool _isUIVisible = false;

		public Button _sendButton;

		public TextMeshProUGUI _inputDisplay;

		public TextMeshProUGUI _inputDescription;

		public string _currentInput = "";

		public Action<string> _currentInputCallback;

		public string _currentPrompt;

		public bool _awaitingInput = false;

		private bool neverwanted = false;

		private bool lowEndMode = false;

		private GameObject EnvironmentFX = GameObject.Find("Managers/@EnvironmentFX");

		private bool isChoosing = false;

		private ProductDefinition chosenProduct = new ProductDefinition();

		[IteratorStateMachine(typeof(<WaitForInput>d__18))]
		public IEnumerator WaitForInput(string prompt, Action<string> callback)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <WaitForInput>d__18(0)
			{
				<>4__this = this,
				prompt = prompt,
				callback = callback
			};
		}

		[IteratorStateMachine(typeof(<WaitForBool>d__19))]
		public IEnumerator WaitForBool(Action callback)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <WaitForBool>d__19(0)
			{
				<>4__this = this,
				callback = callback
			};
		}

		private CDXXManager()
		{
		}//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Expected O, but got Unknown


		public static CDXXManager CreateNew(NPC Template)
		{
			if (_instance != null)
			{
				_instance.FullCleanup();
				_instance = null;
			}
			_instance = new CDXXManager();
			_instance.Initialize(Template);
			return _instance;
		}

		public void FullCleanup()
		{
			if ((Object)(object)_npcObject != (Object)null)
			{
				Object.Destroy((Object)(object)_npcObject);
				_npcObject = null;
			}
			if ((Object)(object)_npcInstance != (Object)null && NPCManager.NPCRegistry.Contains(_npcInstance))
			{
				NPCManager.NPCRegistry.Remove(_npcInstance);
				_npcInstance = null;
			}
		}

		private void Initialize(NPC Template)
		{
			if (!((Object)(object)Template == (Object)null))
			{
				_npcObject = Object.Instantiate<GameObject>(((Component)Template).gameObject);
				_npcObject.SetActive(false);
				_npcObject.SetActive(true);
				_npcInstance = _npcObject.GetComponent<NPC>();
				((Object)_npcObject).name = "CDXX";
				_npcInstance.FirstName = "CDXX";
				_npcInstance.LastName = Setup.Version ?? "";
				_npcInstance.dialogueHandler = null;
				_npcInstance.ID = "cdxx_" + Setup.Version;
				_npcInstance.BakedGUID = "cdxx_" + Setup.Version;
				_npcInstance.ConversationCanBeHidden = false;
				_npcInstance.ShowRelationshipInfo = false;
				_npcInstance.MugshotSprite = ((App<DealerManagementApp>)(object)PlayerSingleton<DealerManagementApp>.Instance).AppIcon;
				_npcInstance.MSGConversation = null;
				_npcInstance.ConversationCategories = new List<EConversationCategory>();
				_npcInstance.Avatar = Player.Local.Avatar;
				_messageSystem = new CDXXMessageSystem(_npcInstance);
				_messageSystem.SendNPCMessage("CDXX " + Setup.Version + " has been initialized. \ndiscord.gg/NMSgEhYX2x");
				CreateCustomUI();
			}
		}

		public void StartConversation()
		{
			try
			{
				MENU_MAIN(openMessage: false);
			}
			catch (Exception value)
			{
				MelonLogger.Error($"Failed to start conversation: {value}");
			}
		}

		[IteratorStateMachine(typeof(<WaitForRequiredSystems>d__25))]
		public static IEnumerator WaitForRequiredSystems()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <WaitForRequiredSystems>d__25(0);
		}

		public void CreateCustomUI()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Expected O, but got Unknown
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Expected O, but got Unknown
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Unknown result type (might be due to invalid IL or missing references)
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Expected O, but got Unknown
			//IL_031e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			//IL_036f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("CDXX_CustomInput");
			Canvas val2 = val.AddComponent<Canvas>();
			val2.renderMode = (RenderMode)0;
			val2.sortingOrder = 9999;
			GameObject val3 = new GameObject("Panel");
			val3.transform.SetParent(val.transform);
			Image val4 = val3.AddComponent<Image>();
			((Graphic)val4).color = new Color(0.1f, 0.1f, 0.1f, 0.85f);
			val4.type = (Type)1;
			_panelRt = val3.GetComponent<RectTransform>();
			_panelRt.anchorMin = new Vector2(0f, 0.5f);
			_panelRt.anchorMax = new Vector2(0f, 0.5f);
			_panelRt.pivot = new Vector2(0f, 0.5f);
			_panelRt.anchoredPosition = new Vector2(300f, 0f);
			_panelRt.sizeDelta = new Vector2(200f, 25f);
			GameObject val5 = new GameObject("Description");
			val5.transform.SetParent(val3.transform);
			_inputDescription = val5.AddComponent<TextMeshProUGUI>();
			((TMP_Text)_inputDescription).fontSize = 14f;
			((Graphic)_inputDescription).color = Color.white;
			((TMP_Text)_inputDescription).alignment = (TextAlignmentOptions)257;
			((TMP_Text)_inputDescription).text = "";
			((TMP_Text)_inputDescription).enableWordWrapping = false;
			RectTransform component = val5.GetComponent<RectTransform>();
			component.anchorMin = new Vector2(0f, 0.5f);
			component.anchorMax = new Vector2(0f, 0.5f);
			component.pivot = new Vector2(0f, 0.5f);
			component.anchoredPosition = new Vector2(0f, 25f);
			component.sizeDelta = new Vector2(300f, 25f);
			GameObject val6 = new GameObject("InputDisplay");
			val6.transform.SetParent(val3.transform);
			_inputDisplay = val6.AddComponent<TextMeshProUGUI>();
			((TMP_Text)_inputDisplay).fontSize = 14f;
			((Graphic)_inputDisplay).color = Color.white;
			((TMP_Text)_inputDisplay).alignment = (TextAlignmentOptions)257;
			((TMP_Text)_inputDisplay).enableWordWrapping = true;
			RectTransform component2 = val6.GetComponent<RectTransform>();
			component2.anchorMin = new Vector2(0f, 0.5f);
			component2.anchorMax = new Vector2(0f, 0.5f);
			component2.pivot = new Vector2(0f, 0.5f);
			component2.anchoredPosition = new Vector2(0f, 0f);
			component2.sizeDelta = new Vector2(200f, 25f);
			GameObject val7 = new GameObject("Instructions");
			val7.transform.SetParent(val3.transform);
			TextMeshProUGUI val8 = val7.AddComponent<TextMeshProUGUI>();
			((TMP_Text)val8).fontSize = 14f;
			((Graphic)val8).color = Color.white;
			((TMP_Text)val8).alignment = (TextAlignmentOptions)257;
			((TMP_Text)val8).text = "ESC - Cancel\nENTER - Change";
			RectTransform component3 = val7.GetComponent<RectTransform>();
			component3.anchorMin = new Vector2(0f, 0.5f);
			component3.anchorMax = new Vector2(0f, 0.5f);
			component3.pivot = new Vector2(0f, 0.5f);
			component3.anchoredPosition = new Vector2(0f, -30f);
			component3.sizeDelta = new Vector2(300f, 25f);
			val.SetActive(false);
		}

		public void MENU_MAIN(bool openMessage)
		{
			if (openMessage)
			{
				_messageSystem.SendPlayerMessage("Return");
			}
			_messageSystem?.ShowResponses(new MessageResponse("Players", MENU_PLAYERS), new MessageResponse("NPCs", MENU_NPCS), new MessageResponse("Products", MENU_PRODUCTS), new MessageResponse("Dealers", MENU_DEALERS), new MessageResponse("Shops", MENU_SHOPS), new MessageResponse("Suppliers", MENU_SUPPLIERS), new MessageResponse("Quests", MENU_QUESTS), new MessageResponse("World Management", MENU_WORLD), new MessageResponse("Bank Management", MENU_BANK), new MessageResponse("Building Management", MENU_BUILDINGS), new MessageResponse("Misc", MENU_MISC));
			if (openMessage)
			{
				_messageSystem.SendNPCMessage("Done.");
			}
		}

		public void MENU_WORLD()
		{
			_messageSystem.SendPlayerMessage("Open World Management");
			_messageSystem.ShowResponses(new MessageResponse("Never Wanted", delegate
			{
				_messageSystem.SendPlayerMessage("Toggle Never Wanted");
				neverwanted = !neverwanted;
				Enumerator<PoliceOfficer> enumerator3 = PoliceOfficer.Officers.GetEnumerator();
				while (enumerator3.MoveNext())
				{
					PoliceOfficer current3 = enumerator3.Current;
					if (neverwanted)
					{
						current3.PursuitBehaviour.arrestingEnabled = false;
						((Component)((Behaviour)current3.PursuitBehaviour).Npc).gameObject.SetActive(false);
						current3.Deactivate();
					}
					else
					{
						current3.PursuitBehaviour.arrestingEnabled = true;
						((Component)((Behaviour)current3.PursuitBehaviour).Npc).gameObject.SetActive(true);
						current3.Activate();
					}
				}
				_messageSystem.SendPlayerMessage($"Toggled to {neverwanted}");
			}), new MessageResponse("Set Time", delegate
			{
				MelonCoroutines.Start(WaitForInput("Enter time (eg: 1800)", delegate(string input)
				{
					if (float.TryParse(input, out var result))
					{
						if (result > 0f)
						{
							_messageSystem.SendPlayerMessage($"Set to time to {result}");
							NetworkSingleton<TimeManager>.Instance.CurrentTime = (int)result;
							_messageSystem.SendNPCMessage("Done.");
						}
						else
						{
							_messageSystem.SendNPCMessage("Amount must be positive");
						}
					}
					else
					{
						_messageSystem.SendNPCMessage("Invalid amount entered");
					}
				}));
			}), new MessageResponse("Sleep Here", delegate
			{
				_messageSystem.SendPlayerMessage("Sleep here for the night.");
				TimeManager val3 = Object.FindObjectOfType<TimeManager>();
				if (val3.CurrentTime > 1800)
				{
					foreach (Player item in Object.FindObjectsOfType<Player>())
					{
						item.SetReadyToSleep(true);
						item.SleepStart();
					}
					_messageSystem.SendNPCMessage("Alright, i'll provide cover from my spot...");
				}
				else
				{
					_messageSystem.SendNPCMessage("You can't sleep yet...");
				}
			}), new MessageResponse("Skip Day", delegate
			{
				_messageSystem.SendPlayerMessage("Skip The Day");
				TimeManager val2 = Object.FindObjectOfType<TimeManager>();
				foreach (Player item2 in Object.FindObjectsOfType<Player>())
				{
					item2.SetReadyToSleep(true);
					item2.SleepStart();
				}
				val2.EndSleep();
				val2.SetData((NetworkConnection)null, val2.ElapsedDays + 1, 700, 0f);
				_messageSystem.SendNPCMessage("It's done.");
			}), new MessageResponse("Drop Money", delegate
			{
				_messageSystem.SendPlayerMessage("Drop Cash");
				if (((NetworkBehaviour)Player.Local).IsHost)
				{
					ATM[] array = Il2CppArrayBase<ATM>.op_Implicit(Object.FindObjectsOfType<ATM>());
					ATM[] array2 = array;
					foreach (ATM val in array2)
					{
						val.CashSpawnPoint = GameObject.Find(((Object)((Component)Player.Local).gameObject).name ?? "").transform;
						val.DropCash();
					}
					_messageSystem.SendNPCMessage("It's done.");
				}
				else
				{
					_messageSystem.SendNPCMessage("Only the host can do this.");
				}
			}), new MessageResponse("Back", delegate
			{
				MENU_MAIN(openMessage: true);
			}));
			_messageSystem.SendNPCMessage("Done.");
		}

		private void MENU_QUESTS()
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Invalid comparison between Unknown and I4
			_messageSystem.SendPlayerMessage("Open Quest Management");
			List<MessageResponse> list = new List<MessageResponse>();
			for (int i = 0; i < Quest.Quests.Count; i++)
			{
				Quest quest = Quest.Quests[i];
				if ((int)quest.QuestState != 1)
				{
					continue;
				}
				list.Add(new MessageResponse(quest.GetQuestTitle(), delegate
				{
					_messageSystem.ShowResponses(new MessageResponse("Toggle Tracking", delegate
					{
						_messageSystem.SendPlayerMessage("Track " + quest.GetQuestTitle());
						quest.SetIsTracked(!quest.IsTracked);
						_messageSystem.SendNPCMessage(quest.IsTracked ? (quest.GetQuestTitle() + " is now being tracked.") : (quest.GetQuestTitle() + " is no longer being tracked."));
					}), new MessageResponse("Teleport", delegate
					{
						//IL_0049: Unknown result type (might be due to invalid IL or missing references)
						//IL_004f: Invalid comparison between Unknown and I4
						//IL_0073: Unknown result type (might be due to invalid IL or missing references)
						//IL_0087: Unknown result type (might be due to invalid IL or missing references)
						//IL_008c: Unknown result type (might be due to invalid IL or missing references)
						_messageSystem.SendPlayerMessage("Take me to the location for " + quest.GetQuestTitle() + ".");
						Enumerator<QuestEntry> enumerator2 = quest.Entries.GetEnumerator();
						while (enumerator2.MoveNext())
						{
							QuestEntry current2 = enumerator2.Current;
							if ((int)current2.State != 2 && (Object)(object)current2.PoILocation != (Object)null)
							{
								PlayerSingleton<PlayerMovement>.Instance.Teleport(current2.PoILocation.position + new Vector3(0f, 5f, 0f));
							}
						}
						_messageSystem.SendNPCMessage("Teleported to " + quest.GetQuestTitle());
					}), new MessageResponse("Force Complete", delegate
					{
						//IL_0049: Unknown result type (might be due to invalid IL or missing references)
						//IL_004f: Invalid comparison between Unknown and I4
						_messageSystem.SendPlayerMessage("Force completion for " + quest.GetQuestTitle() + ".");
						Enumerator<QuestEntry> enumerator = quest.Entries.GetEnumerator();
						while (enumerator.MoveNext())
						{
							QuestEntry current = enumerator.Current;
							if ((int)current.State != 2)
							{
								current.Complete();
							}
						}
						quest.Complete(true);
						_messageSystem.SendNPCMessage("Done.");
					}), new MessageResponse("Back", MENU_QUESTS));
				}));
			}
			list.Add(new MessageResponse("Back", delegate
			{
				MENU_MAIN(openMessage: true);
			}));
			if (list.Count == 0)
			{
				_messageSystem.SendNPCMessage("No Businesses available!");
				MENU_MAIN(openMessage: false);
			}
			else
			{
				_messageSystem.ShowResponses(list.ToArray());
				_messageSystem.SendNPCMessage("Done.");
			}
		}

		public void MENU_SHOPS()
		{
			_messageSystem.SendPlayerMessage("Open Shop Management");
			_messageSystem.ShowResponses(new MessageResponse("Dan", delegate
			{
				foreach (NPC item in Object.FindObjectsOfType<NPC>())
				{
					if (item.FirstName == "Dan" && Object.op_Implicit((Object)(object)((Component)item).GetComponent<Dan>()))
					{
						Dan component2 = ((Component)item).GetComponent<Dan>();
						component2.ShopInterface.SetIsOpen(true);
					}
				}
			}), new MessageResponse("Clothing", delegate
			{
				foreach (NPC item2 in Object.FindObjectsOfType<NPC>())
				{
					if (item2.FirstName == "Fiona" && Object.op_Implicit((Object)(object)((Component)item2).GetComponent<Fiona>()))
					{
						Fiona component = ((Component)item2).GetComponent<Fiona>();
						component.ShopInterface.SetIsOpen(true);
					}
				}
			}), new MessageResponse("Back", delegate
			{
				MENU_MAIN(openMessage: true);
			}));
			_messageSystem.SendNPCMessage("Done.");
		}

		private void MENU_EMPLOYEES(Property property)
		{
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			List<MessageResponse> list = new List<MessageResponse>();
			Enumerator<Employee> enumerator = property.Employees.GetEnumerator();
			DialogueContainer reason = default(DialogueContainer);
			while (enumerator.MoveNext())
			{
				Employee npc = enumerator.Current;
				list.Add(new MessageResponse($"{(npc.GetWorkIssue(ref reason) ? "[!]" : "")} {((NPC)npc).FirstName} ({npc.EmployeeType})", delegate
				{
					List<MessageResponse> list2 = new List<MessageResponse>
					{
						new MessageResponse("Teleport", delegate
						{
							//IL_0037: Unknown result type (might be due to invalid IL or missing references)
							_messageSystem.SendPlayerMessage("Take me to " + ((NPC)npc).FirstName);
							PlayerSingleton<PlayerMovement>.Instance.Teleport(((Component)npc).transform.position);
							_messageSystem.SendNPCMessage("Teleported to " + ((NPC)npc).FirstName);
						}),
						new MessageResponse("Open Bed Case", delegate
						{
							//IL_0041: Unknown result type (might be due to invalid IL or missing references)
							_messageSystem.SendPlayerMessage("Open " + ((NPC)npc).FirstName + "'s bed case.");
							PlayerSingleton<PlayerMovement>.Instance.Teleport(((Component)npc.GetBed()).transform.position);
							((PlaceableStorageEntity)npc.GetBed()).StorageEntity.Open();
							((Component)Singleton<GameplayMenu>.Instance).gameObject.SetActive(false);
							_messageSystem.SendNPCMessage("Opened " + ((NPC)npc).FirstName + "'s case.");
						})
					};
					if (npc.GetWorkIssue(ref reason))
					{
						list2.Add(new MessageResponse("Get Work Issues", delegate
						{
							_messageSystem.SendPlayerMessage("Get " + ((NPC)npc).FirstName + "'s problems.");
							for (int i = 0; npc.WorkIssues.Count > i; i++)
							{
								_messageSystem.SendNPCMessage($"Problem #{i + 1}\n{npc.WorkIssues[i].Reason}\n{npc.WorkIssues[i].Fix}");
							}
						}));
					}
					list2.Add(new MessageResponse("Increase Daily Wage", delegate
					{
						_messageSystem.SendPlayerMessage("Increase " + ((NPC)npc).FirstName + "'s Wage.");
						Employee obj2 = npc;
						obj2.DailyWage += 50f;
						_messageSystem.SendNPCMessage($"Increased {((NPC)npc).FirstName}'s Wage to {npc.DailyWage}.");
					}));
					list2.Add(new MessageResponse("Decrease Daily Wage", delegate
					{
						_messageSystem.SendPlayerMessage("Decrease " + ((NPC)npc).FirstName + "'s Wage.");
						Employee obj = npc;
						obj.DailyWage -= 50f;
						_messageSystem.SendNPCMessage($"Decreased {((NPC)npc).FirstName}'s Wage to {npc.DailyWage}.");
					}));
					list2.Add(new MessageResponse("Fire Employee", delegate
					{
						_messageSystem.SendPlayerMessage("Fire " + ((NPC)npc).FirstName + ".");
						npc.Fire();
						_messageSystem.SendNPCMessage("Fired " + ((NPC)npc).FirstName + ".");
					}));
					list2.Add(new MessageResponse("Back", MENU_BUILDINGS_PROPERTIES));
					_messageSystem.ShowResponses(list2.ToArray());
				}));
			}
			list.Add(new MessageResponse("Back", delegate
			{
				MENU_BUILDINGS_PROPERTIES();
			}));
			if (list.Count == 0)
			{
				_messageSystem.SendNPCMessage("No Dealers available!");
				MENU_BUILDINGS_PROPERTIES();
			}
			else
			{
				_messageSystem.ShowResponses(list.ToArray());
			}
		}

		private void MENU_SUPPLIERS()
		{
			_messageSystem.SendPlayerMessage("Open Supplier Management");
			List<MessageResponse> list = new List<MessageResponse>();
			int num = 0;
			foreach (NPC item in Object.FindObjectsOfType<NPC>())
			{
				if (Object.op_Implicit((Object)(object)((Component)item).GetComponent<Supplier>()))
				{
					num++;
					Supplier _npc = ((Component)item).GetComponent<Supplier>();
					list.Add(new MessageResponse(item.FirstName, delegate
					{
						MENU_SUPPLIER(_npc);
					}));
				}
			}
			list.Add(new MessageResponse("Back", delegate
			{
				MENU_MAIN(openMessage: true);
			}));
			if (num > 0)
			{
				_messageSystem.ShowResponses(list.ToArray());
				_messageSystem.SendNPCMessage("Done.");
			}
			else
			{
				_messageSystem.SendNPCMessage("I can't find any suppliers.");
				MENU_MAIN(openMessage: false);
			}
		}

		public void MENU_SUPPLIER(Supplier supplier)
		{
			_messageSystem.SendPlayerMessage("Open " + ((NPC)supplier).FirstName + ".");
			List<MessageResponse> list = new List<MessageResponse>();
			if (!((NPC)supplier).RelationData.Unlocked)
			{
				list.Add(new MessageResponse("Unlock", delegate
				{
					_messageSystem.SendPlayerMessage("Force unlock " + ((NPC)supplier).FirstName);
					((NPC)supplier).RelationData.Unlock((EUnlockType)1, true);
					supplier.SetUnlocked();
					_messageSystem.SendNPCMessage("Forced " + ((NPC)supplier).FirstName + "'s unlock status.");
				}));
			}
			list.Add(new MessageResponse("Teleport", delegate
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				_messageSystem.SendPlayerMessage("Take me to " + ((NPC)supplier).FirstName);
				PlayerSingleton<PlayerMovement>.Instance.Teleport(((Component)supplier).transform.position);
				_messageSystem.SendNPCMessage("Teleported to " + ((NPC)supplier).FirstName);
			}));
			list.Add(new MessageResponse("Create Order", delegate
			{
				_messageSystem.SendPlayerMessage("Create order with " + ((NPC)supplier).FirstName);
				List<Listing> val = new List<Listing>();
				foreach (Listing item in (Il2CppArrayBase<Listing>)(object)supplier.OnlineShopItems)
				{
					val.Add(item);
				}
				Action<List<CartEntry>, float> val2 = DelegateSupport.ConvertDelegate<Action<List<CartEntry>, float>>((Delegate)(Action<List<CartEntry>, float>)delegate(List<CartEntry> cartEntries, float price)
				{
					supplier.DeaddropConfirmed(cartEntries, price);
				});
				PlayerSingleton<MessagesApp>.Instance.PhoneShopInterface.Open("Request Dead Drop", "Purchase items from " + ((NPC)supplier).FirstName + " using CDXX!", ((NPC)supplier).MSGConversation, val, 100000f, supplier.debt, val2);
				_messageSystem.SendNPCMessage("Created order with " + ((NPC)supplier).FirstName);
			}));
			list.Add(new MessageResponse("Back", MENU_SUPPLIERS));
			_messageSystem.ShowResponses(list.ToArray());
			_messageSystem.SendNPCMessage("Done.");
		}

		private void MENU_DEALERS()
		{
			_messageSystem.SendPlayerMessage("Open Dealers Management");
			List<MessageResponse> list = new List<MessageResponse>();
			int num = 0;
			foreach (NPC item in Object.FindObjectsOfType<NPC>())
			{
				if (Object.op_Implicit((Object)(object)((Component)item).GetComponent<Dealer>()))
				{
					num++;
					Dealer _npc = ((Component)item).GetComponent<Dealer>();
					list.Add(new MessageResponse(item.FirstName, delegate
					{
						MENU_DEALER(_npc);
					}));
				}
			}
			list.Add(new MessageResponse("Collect All Cash", delegate
			{
				foreach (NPC item2 in Object.FindObjectsOfType<NPC>())
				{
					if (Object.op_Implicit((Object)(object)((Component)item2).GetComponent<Dealer>()))
					{
						((Component)item2).GetComponent<Dealer>().CollectCash();
					}
				}
			}));
			list.Add(new MessageResponse("Back", delegate
			{
				MENU_MAIN(openMessage: true);
			}));
			if (num > 0)
			{
				_messageSystem.ShowResponses(list.ToArray());
				_messageSystem.SendNPCMessage("Done.");
			}
			else
			{
				_messageSystem.SendNPCMessage("I can't find any dealers.");
				MENU_MAIN(openMessage: false);
			}
		}

		public void MENU_DEALER(Dealer dealer)
		{
			_messageSystem.SendPlayerMessage("Open " + ((NPC)dealer).FirstName + ".");
			List<MessageResponse> list = new List<MessageResponse>();
			if (!dealer.IsRecruited)
			{
				list.Add(new MessageResponse("Unlock", delegate
				{
					_messageSystem.SendPlayerMessage("Force unlock " + ((NPC)dealer).FirstName);
					((NPC)dealer).RelationData.Unlock((EUnlockType)1, true);
					dealer.SetIsRecruited((NetworkConnection)null);
					_messageSystem.SendNPCMessage("Forced " + ((NPC)dealer).FirstName + "'s unlock status.");
				}));
			}
			list.Add(new MessageResponse("Customers", delegate
			{
				MENU_CUSTOMERS(dealer);
			}));
			list.Add(new MessageResponse("Teleport", delegate
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				_messageSystem.SendPlayerMessage("Take me to " + ((NPC)dealer).FirstName);
				PlayerSingleton<PlayerMovement>.Instance.Teleport(((Component)dealer).transform.position);
				_messageSystem.SendNPCMessage("Teleported to " + ((NPC)dealer).FirstName);
			}));
			list.Add(new MessageResponse("Teleport to Home", delegate
			{
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				_messageSystem.SendPlayerMessage("Take me to " + ((NPC)dealer).FirstName + "'s home.");
				PlayerSingleton<PlayerMovement>.Instance.Teleport(((Component)dealer.Home).transform.position);
				_messageSystem.SendNPCMessage("Teleported to " + ((NPC)dealer).FirstName + "'s home.");
			}));
			list.Add(new MessageResponse("Open Inventory", delegate
			{
				_messageSystem.SendPlayerMessage("Trade with " + ((NPC)dealer).FirstName);
				((Component)Singleton<GameplayMenu>.Instance).gameObject.SetActive(false);
				dealer.TradeItems();
				_messageSystem.SendNPCMessage("Trading with " + ((NPC)dealer).FirstName);
			}));
			list.Add(new MessageResponse("Set Cut", delegate
			{
				MelonCoroutines.Start(WaitForInput("Set Cut Amount (eg: 0)", delegate(string input)
				{
					if (float.TryParse(input, out var result))
					{
						if (result > 0f)
						{
							_messageSystem.SendPlayerMessage($"Set {((NPC)dealer).FirstName}'s cut to {result}%.");
							dealer.Cut = result / 100f;
							_messageSystem.SendNPCMessage("Done.");
						}
						else
						{
							_messageSystem.SendNPCMessage("Amount must be positive");
						}
					}
					else
					{
						_messageSystem.SendNPCMessage("Invalid amount entered");
					}
				}));
			}));
			list.Add(new MessageResponse("Collect Cash", delegate
			{
				_messageSystem.SendPlayerMessage("Force collect " + ((NPC)dealer).FirstName + "'s cash.");
				dealer.CollectCash();
				_messageSystem.SendNPCMessage("Done.");
			}));
			list.Add(new MessageResponse("Back", MENU_DEALERS));
			_messageSystem.ShowResponses(list.ToArray());
			_messageSystem.SendNPCMessage("Done.");
		}

		public void MENU_CUSTOMERS(Dealer dealer)
		{
			_messageSystem.SendPlayerMessage("Open " + ((NPC)dealer).FirstName + "'s customers.");
			List<MessageResponse> responses = new List<MessageResponse>();
			List<Customer> customer = dealer.AssignedCustomers;
			int pageSize = 6;
			int totalPages = (int)Math.Ceiling((float)customer.Count / (float)pageSize);
			int currentPage = 0;
			GenerateCustomerPage(currentPage);
			if (dealer.AssignedCustomers.Count == 0)
			{
				_messageSystem.SendNPCMessage("No Customers available!");
				MENU_DEALER(dealer);
			}
			else
			{
				_messageSystem.ShowResponses(responses.ToArray());
				_messageSystem.SendNPCMessage("Done.");
			}
			void GenerateCustomerPage(int page)
			{
				responses = new List<MessageResponse>();
				int num = page * pageSize;
				int num2 = Math.Min(num + pageSize, customer.Count);
				for (int i = num; i < num2; i++)
				{
					Customer _customer = customer[i];
					responses.Add(new MessageResponse(_customer.NPC.FirstName, delegate
					{
						MENU_CUSTOMER(_customer, dealer);
					}));
				}
				if (page < totalPages - 1)
				{
					responses.Add(new MessageResponse(">>", delegate
					{
						currentPage++;
						GenerateCustomerPage(currentPage);
					}));
				}
				if (page > 0)
				{
					responses.Add(new MessageResponse("<<", delegate
					{
						currentPage--;
						GenerateCustomerPage(currentPage);
					}));
				}
				else
				{
					responses.Add(new MessageResponse("Back", delegate
					{
						MENU_MAIN(openMessage: true);
					}));
				}
				_messageSystem.ShowResponses(responses.ToArray());
			}
		}

		public void MENU_CUSTOMER(Customer customer, Dealer dealer)
		{
			_messageSystem.SendPlayerMessage("Open " + customer.NPC.FirstName);
			List<MessageResponse> list = new List<MessageResponse>();
			list.Add(new MessageResponse("Teleport", delegate
			{
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				_messageSystem.SendPlayerMessage("Take me to " + customer.NPC.FirstName);
				PlayerSingleton<PlayerMovement>.Instance.Teleport(((Component)customer).transform.position);
				_messageSystem.SendNPCMessage("Teleported to " + customer.NPC.FirstName);
			}));
			list.Add(new MessageResponse("Create Deal", delegate
			{
				_messageSystem.SendPlayerMessage("Create deal with " + customer.NPC.FirstName);
				if (customer.IsAwaitingDelivery)
				{
					_messageSystem.SendNPCMessage("They're already waiting for something.");
				}
				else
				{
					ContractInfo val = customer.CheckContractGeneration(true);
					customer.OfferContract(val);
					_messageSystem.SendNPCMessage("Created deal with " + customer.NPC.FirstName);
				}
			}));
			list.Add(new MessageResponse("Back", delegate
			{
				MENU_CUSTOMERS(dealer);
			}));
			_messageSystem.ShowResponses(list.ToArray());
			_messageSystem.SendNPCMessage("Done");
		}

		public void MENU_PLAYERS()
		{
			_messageSystem.SendPlayerMessage("Open Players Management");
			List<MessageResponse> list = new List<MessageResponse>();
			Player local = Player.Local;
			foreach (Player player in Object.FindObjectsOfType<Player>())
			{
				list.Add(new MessageResponse(player.PlayerName, delegate
				{
					MENU_PLAYER(player);
				}));
			}
			list.Add(new MessageResponse("Back", delegate
			{
				MENU_MAIN(openMessage: true);
			}));
			if (list.Count == 0)
			{
				_messageSystem.SendNPCMessage("No players available!");
				MENU_MAIN(openMessage: false);
			}
			else
			{
				_messageSystem.ShowResponses(list.ToArray());
				_messageSystem.SendNPCMessage("Done.");
			}
		}

		public void MENU_PLAYER(Player player)
		{
			_messageSystem.SendPlayerMessage("Open " + player.PlayerName + "'s info");
			List<MessageResponse> list = new List<MessageResponse>();
			if ((Object)(object)player == (Object)(object)Player.Local)
			{
				list.Add(new MessageResponse("Give Cash", delegate
				{
					MelonCoroutines.Start(WaitForInput("Set cash to give (eg: 100)", delegate(string input)
					{
						if (float.TryParse(input, out var result4))
						{
							if (result4 > 0f)
							{
								_messageSystem.SendPlayerMessage($"Add {result4} to my balance");
								NetworkSingleton<MoneyManager>.Instance.ChangeCashBalance(result4, true, false);
							}
							else
							{
								_messageSystem.SendPlayerMessage($"Subtract {0f - result4} to my balance");
								NetworkSingleton<MoneyManager>.Instance.ChangeCashBalance(result4, true, false);
							}
							_messageSystem.SendNPCMessage($"You now have ${NetworkSingleton<MoneyManager>.Instance.cashBalance}");
						}
						else
						{
							_messageSystem.SendNPCMessage("Invalid amount entered");
						}
					}));
				}));
				list.Add(new MessageResponse("Give XP", delegate
				{
					MelonCoroutines.Start(WaitForInput("Set XP to give (eg: 100)", delegate(string input)
					{
						//IL_010c: Unknown result type (might be due to invalid IL or missing references)
						if (float.TryParse(input, out var result3))
						{
							if (result3 > 0f)
							{
								_messageSystem.SendPlayerMessage($"Add {result3} XP");
							}
							else
							{
								_messageSystem.SendPlayerMessage($"Subtract {0f - result3} XP");
								NetworkSingleton<MoneyManager>.Instance.ChangeCashBalance(result3, true, false);
							}
							NetworkSingleton<LevelManager>.Instance.AddXP(100);
						}
						else
						{
							_messageSystem.SendNPCMessage("Invalid amount entered");
						}
						_messageSystem.SendNPCMessage($"XP has been given. You're currently {NetworkSingleton<LevelManager>.Instance.Rank} {NetworkSingleton<LevelManager>.Instance.Tier} ({NetworkSingleton<LevelManager>.Instance.XP}/{NetworkSingleton<LevelManager>.Instance.XPToNextTier})");
					}));
				}));
				list.Add(new MessageResponse("Set Jump Power", delegate
				{
					MelonCoroutines.Start(WaitForInput("Set Jump Power (eg: 5)", delegate(string input)
					{
						if (float.TryParse(input, out var result2))
						{
							if (result2 > 0f)
							{
								_messageSystem.SendPlayerMessage($"Set Jump Speed to {result2}");
								PlayerMovement.JumpMultiplier = result2;
								_messageSystem.SendNPCMessage("Done.");
							}
							else
							{
								_messageSystem.SendNPCMessage("Amount must be positive");
							}
						}
						else
						{
							_messageSystem.SendNPCMessage("Invalid amount entered");
						}
					}));
				}));
				list.Add(new MessageResponse("Set Walk Speed", delegate
				{
					MelonCoroutines.Start(WaitForInput("Set Walk Speed (eg: 5)", delegate(string input)
					{
						if (float.TryParse(input, out var result))
						{
							if (result > 0f)
							{
								_messageSystem.SendPlayerMessage($"Set Walk Speed to {result}");
								PlayerMovement.StaticMoveSpeedMultiplier = result;
								_messageSystem.SendNPCMessage("Done.");
							}
							else
							{
								_messageSystem.SendNPCMessage("Amount must be positive");
							}
						}
						else
						{
							_messageSystem.SendNPCMessage("Invalid amount entered");
						}
					}));
				}));
			}
			if (((NetworkBehaviour)player).IsNetworked && ((NetworkBehaviour)Player.Local).IsHost && (Object)(object)Player.Local != (Object)(object)player)
			{
				list.Add(new MessageResponse("Kick", delegate
				{
					string playerName = player.PlayerName;
					_messageSystem.SendPlayerMessage("Kick " + playerName);
					((NetworkBehaviour)player).ServerManager.Kick(player.Connection, (KickReason)2, (LoggingType)3, "Kicked by " + Player.Local.PlayerName + " using CDXX");
					_messageSystem.SendNPCMessage(playerName + " has been kicked!");
				}));
			}
			if (((NetworkBehaviour)player).IsNetworked && ((NetworkBehaviour)Player.Local).IsHost)
			{
				list.Add(new MessageResponse("Airstrike", delegate
				{
					//IL_0027: Unknown result type (might be due to invalid IL or missing references)
					//IL_002c: Unknown result type (might be due to invalid IL or missing references)
					ExplosionData val = default(ExplosionData);
					((ExplosionData)(ref val))..ctor(1f, 1000f, 10f);
					NetworkSingleton<CombatManager>.Instance.CreateExplosion(((Component)player).transform.position, val);
				}));
			}
			list.Add(new MessageResponse("Toggle Map Marker", delegate
			{
				_messageSystem.SendPlayerMessage("Toggle " + player.PlayerName + "'s map marker");
				((Component)player.PoI).gameObject.SetActive(!((Component)player.PoI).gameObject.active);
				_messageSystem.SendNPCMessage($"Toggled {player.PlayerName}'s marker to {((Component)player.PoI).gameObject.active}!");
			}));
			list.Add(new MessageResponse("Inventory Management", delegate
			{
				MENU_INVENTORY(player);
			}));
			list.Add(new MessageResponse("Teleport", delegate
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				_messageSystem.SendPlayerMessage("Take me to " + player.PlayerName);
				PlayerSingleton<PlayerMovement>.Instance.Teleport(((Component)player).transform.position);
				_messageSystem.SendNPCMessage("Teleported to " + player.PlayerName);
			}));
			list.Add(new MessageResponse("Back", delegate
			{
				MENU_PLAYERS();
			}));
			_messageSystem.ShowResponses(list.ToArray());
			_messageSystem.SendNPCMessage("Done.");
		}

		public void MENU_BUILDINGS()
		{
			_messageSystem.SendPlayerMessage("Open Building Management");
			_messageSystem.ShowResponses(new MessageResponse("Properties", MENU_BUILDINGS_PROPERTIES), new MessageResponse("Business", MENU_BUILDINGS_BUSINESSES), new MessageResponse("Back", delegate
			{
				MENU_MAIN(openMessage: true);
			}));
			_messageSystem.SendNPCMessage("Done.");
		}

		private void MENU_BUILDINGS_BUSINESSES()
		{
			_messageSystem.SendPlayerMessage("Open Businesses");
			List<MessageResponse> list = new List<MessageResponse>();
			for (int i = 0; i < Business.Businesses.Count; i++)
			{
				Business currentProperty = Business.Businesses[i];
				list.Add(new MessageResponse(((Property)currentProperty).PropertyName, delegate
				{
					MENU_BUSINESS(currentProperty);
				}));
			}
			list.Add(new MessageResponse("Back", MENU_BUILDINGS));
			if (list.Count == 0)
			{
				_messageSystem.SendNPCMessage("No Businesses available!");
				MENU_MAIN(openMessage: false);
			}
			else
			{
				_messageSystem.ShowResponses(list.ToArray());
				_messageSystem.SendNPCMessage("Done.");
			}
		}

		public void MENU_BUSINESS(Business business)
		{
			List<MessageResponse> list = new List<MessageResponse>();
			if (!((Property)business).IsOwned)
			{
				list.Add(new MessageResponse("Unlock", delegate
				{
					((Property)business).SetOwned();
				}));
			}
			list.Add(new MessageResponse("Teleport", delegate
			{
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003d: Unknown result type (might be due to invalid IL or missing references)
				_messageSystem.SendPlayerMessage("Take me to the " + ((Property)business).PropertyName);
				Vector3 position = ((Property)business).SpawnPoint.position;
				PlayerSingleton<PlayerMovement>.Instance.Teleport(position);
				_messageSystem.SendNPCMessage("Teleported to " + ((Property)business).PropertyName);
			}));
			int num = 0;
			Enumerator<Employee> enumerator = ((Property)business).Employees.GetEnumerator();
			while (enumerator.MoveNext())
			{
				Employee current = enumerator.Current;
				num++;
			}
			if (num > 0)
			{
				list.Add(new MessageResponse("Employees", delegate
				{
					MENU_EMPLOYEES((Property)(object)business);
				}));
			}
			list.Add(new MessageResponse("Back", MENU_BUILDINGS_PROPERTIES));
			_messageSystem.ShowResponses(list.ToArray());
		}

		private void MENU_BUILDINGS_PROPERTIES()
		{
			_messageSystem.SendPlayerMessage("Open Properties");
			List<MessageResponse> list = new List<MessageResponse>();
			for (int i = 0; i < Property.Properties.Count; i++)
			{
				Property currentProperty = Property.Properties[i];
				list.Add(new MessageResponse(currentProperty.PropertyName, delegate
				{
					MENU_PROPERTY(currentProperty);
				}));
			}
			list.Add(new MessageResponse("Back", MENU_BUILDINGS));
			if (list.Count == 0)
			{
				_messageSystem.SendNPCMessage("No Businesses available!");
				MENU_MAIN(openMessage: false);
			}
			else
			{
				_messageSystem.ShowResponses(list.ToArray());
				_messageSystem.SendNPCMessage("Done.");
			}
		}

		public void MENU_PROPERTY(Property property)
		{
			List<MessageResponse> list = new List<MessageResponse>();
			if (!property.IsOwned)
			{
				list.Add(new MessageResponse("Unlock", delegate
				{
					property.SetOwned();
				}));
			}
			int num = 0;
			foreach (TrashItem item in Object.FindObjectsOfType<TrashItem>())
			{
				if ((Object)(object)item.CurrentProperty == (Object)(object)property)
				{
					num++;
				}
			}
			if (num > 0)
			{
				list.Add(new MessageResponse("Clean Trash", delegate
				{
					TrashItem[] array = Il2CppArrayBase<TrashItem>.op_Implicit(Object.FindObjectsOfType<TrashItem>());
					TrashItem[] array2 = array;
					foreach (TrashItem val in array2)
					{
						if ((Object)(object)val.CurrentProperty == (Object)(object)property)
						{
							val.DestroyTrash();
						}
					}
				}));
			}
			list.Add(new MessageResponse("Teleport", delegate
			{
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003d: Unknown result type (might be due to invalid IL or missing references)
				_messageSystem.SendPlayerMessage("Take me to the " + property.PropertyName);
				Vector3 position = property.SpawnPoint.position;
				PlayerSingleton<PlayerMovement>.Instance.Teleport(position);
				_messageSystem.SendNPCMessage("Teleported to " + property.PropertyName);
			}));
			int num2 = 0;
			Enumerator<Employee> enumerator2 = property.Employees.GetEnumerator();
			while (enumerator2.MoveNext())
			{
				Employee current2 = enumerator2.Current;
				num2++;
			}
			if (num2 > 0)
			{
				list.Add(new MessageResponse("Employees", delegate
				{
					MENU_EMPLOYEES(property);
				}));
			}
			list.Add(new MessageResponse("Back", MENU_BUILDINGS_PROPERTIES));
			_messageSystem.ShowResponses(list.ToArray());
		}

		public void MENU_BANK()
		{
			_messageSystem.SendPlayerMessage("Open Bank Management");
			_messageSystem.ShowResponses(new MessageResponse("Deposit", delegate
			{
				ShowBankAmountInput(Enums.BankType.Deposit);
			}), new MessageResponse("Withdraw", delegate
			{
				ShowBankAmountInput(Enums.BankType.Withdraw);
			}), new MessageResponse("Check Balance", delegate
			{
				_messageSystem.SendPlayerMessage("Check Balance");
				_messageSystem.SendNPCMessage($"Current Balance:\nCash: ${NetworkSingleton<MoneyManager>.Instance.cashBalance}\nBank: ${NetworkSingleton<MoneyManager>.Instance.onlineBalance}");
				MENU_BANK();
			}), new MessageResponse("Back", delegate
			{
				MENU_MAIN(openMessage: true);
			}));
			_messageSystem.SendNPCMessage("Done.");
		}

		public void MENU_NPCS()
		{
			_messageSystem.SendPlayerMessage("Open NPC Management");
			List<MessageResponse> responses = new List<MessageResponse>();
			List<NPC> npcs = new List<NPC>();
			foreach (NPC item in Object.FindObjectsOfType<NPC>())
			{
				if ((Object)(object)((Component)item).GetComponent<Customer>() != (Object)null)
				{
					npcs.Add(item);
				}
			}
			int pageSize = 6;
			int totalPages = (int)Math.Ceiling((float)npcs.Count / (float)pageSize);
			int currentPage = 0;
			GenerateNPCPage(currentPage);
			if (responses.Count == 0)
			{
				_messageSystem.SendNPCMessage("No NPCs available!");
				MENU_MAIN(openMessage: false);
			}
			else
			{
				_messageSystem.ShowResponses(responses.ToArray());
				_messageSystem.SendNPCMessage("Done.");
			}
			void GenerateNPCPage(int page)
			{
				responses = new List<MessageResponse>();
				int num = page * pageSize;
				int num2 = Math.Min(num + pageSize, npcs.Count);
				for (int i = num; i < num2; i++)
				{
					NPC npc = npcs[i];
					responses.Add(new MessageResponse(npc.FirstName, delegate
					{
						ShowNPCOptions(npc);
					}));
				}
				if (page < totalPages - 1)
				{
					responses.Add(new MessageResponse(">>", delegate
					{
						currentPage++;
						GenerateNPCPage(currentPage);
					}));
				}
				if (page > 0)
				{
					responses.Add(new MessageResponse("<<", delegate
					{
						currentPage--;
						GenerateNPCPage(currentPage);
					}));
				}
				else
				{
					responses.Add(new MessageResponse("Back", delegate
					{
						MENU_MAIN(openMessage: true);
					}));
				}
				_messageSystem.ShowResponses(responses.ToArray());
			}
		}

		public void MENU_PRODUCTS()
		{
			if (!isChoosing)
			{
				_messageSystem.SendPlayerMessage("Open Products Management");
			}
			List<MessageResponse> responses = new List<MessageResponse>();
			List<ProductDefinition> products = NetworkSingleton<ProductManager>.Instance.AllProducts;
			int pageSize = 6;
			int totalPages = (int)Math.Ceiling((float)products.Count / (float)pageSize);
			int currentPage = 0;
			GenerateProductPage(currentPage);
			if (responses.Count == 0)
			{
				_messageSystem.SendNPCMessage("No Products available!");
				MENU_MAIN(openMessage: false);
				return;
			}
			_messageSystem.ShowResponses(responses.ToArray());
			if (!isChoosing)
			{
				_messageSystem.SendNPCMessage("Done.");
			}
			void GenerateProductPage(int page)
			{
				responses = new List<MessageResponse>();
				int num = page * pageSize;
				int num2 = Math.Min(num + pageSize, products.Count);
				for (int i = num; i < num2; i++)
				{
					ProductDefinition product = products[i];
					responses.Add(new MessageResponse(((ItemDefinition)product).Name, delegate
					{
						if (!isChoosing)
						{
							ShowProductOptions(product);
						}
						else
						{
							_messageSystem.SendPlayerMessage(((ItemDefinition)product).Name);
							ShowProductOptions(chosenProduct);
						}
					}));
				}
				if (page < totalPages - 1)
				{
					responses.Add(new MessageResponse(">>", delegate
					{
						currentPage++;
						GenerateProductPage(currentPage);
					}));
				}
				if (page > 0)
				{
					responses.Add(new MessageResponse("<<", delegate
					{
						currentPage--;
						GenerateProductPage(currentPage);
					}));
				}
				else
				{
					responses.Add(new MessageResponse("Create New Product", delegate
					{
						List<string> validTypes = new List<string> { "Weed", "Cocaine", "Meth" };
						MelonCoroutines.Start(WaitForInput("Enter Product Type (Weed, Cocaine, Meth)", delegate(string input)
						{
							//IL_0025: Unknown result type (might be due to invalid IL or missing references)
							//IL_002f: Expected O, but got Unknown
							//IL_0030: Unknown result type (might be due to invalid IL or missing references)
							//IL_003a: Expected O, but got Unknown
							//IL_003b: Unknown result type (might be due to invalid IL or missing references)
							//IL_0045: Expected O, but got Unknown
							string name = string.Empty;
							string id = string.Empty;
							WeedAppearanceSettings weedSettings = new WeedAppearanceSettings();
							CocaineAppearanceSettings cocaineSettings = new CocaineAppearanceSettings();
							MethAppearanceSettings methSettings = new MethAppearanceSettings();
							foreach (string type in validTypes)
							{
								if (type.ToLower() == input.ToLower())
								{
									MelonCoroutines.Start(WaitForInput("Enter Name", delegate(string drugName)
									{
										name = drugName;
										MelonCoroutines.Start(WaitForInput("Enter ID", delegate(string drugId)
										{
											if (!string.IsNullOrEmpty(drugId))
											{
												id = drugId;
											}
											else
											{
												id = drugName + "_CDXX";
											}
											MelonCoroutines.Start(WaitForInput("Enter Properties (eg: smelly,calming,foggy)", delegate(string properties)
											{
												string[] array = properties.Split(',');
												List<string> val = new List<string>();
												string[] array2 = array;
												foreach (string text in array2)
												{
													val.Add(text);
												}
												if (type.ToLower() == "weed")
												{
													MelonCoroutines.Start(WaitForInput("Enter Main Color (eg: 255,255,255)", delegate(string primaryColor)
													{
														//IL_0045: Unknown result type (might be due to invalid IL or missing references)
														if (string.IsNullOrEmpty(primaryColor))
														{
															primaryColor = "255,255,255";
														}
														string[] array8 = primaryColor.Split(',');
														byte b16 = byte.Parse(array8[0]);
														byte b17 = byte.Parse(array8[1]);
														byte b18 = byte.Parse(array8[2]);
														weedSettings.MainColor = new Color32(b16, b17, b18, (byte)1);
														MelonCoroutines.Start(WaitForInput("Enter Secondary Color (eg: 255,255,255)", delegate(string secondaryColor)
														{
															//IL_0030: Unknown result type (might be due to invalid IL or missing references)
															string[] array9 = secondaryColor.Split(',');
															byte b19 = byte.Parse(array9[0]);
															byte b20 = byte.Parse(array9[1]);
															byte b21 = byte.Parse(array9[2]);
															weedSettings.SecondaryColor = new Color32(b19, b20, b21, (byte)1);
															MelonCoroutines.Start(WaitForInput("Enter Leaf Color (eg: 255,255,255)", delegate(string leafColor)
															{
																//IL_0030: Unknown result type (might be due to invalid IL or missing references)
																string[] array10 = leafColor.Split(',');
																byte b22 = byte.Parse(array10[0]);
																byte b23 = byte.Parse(array10[1]);
																byte b24 = byte.Parse(array10[2]);
																weedSettings.LeafColor = new Color32(b22, b23, b24, (byte)1);
																MelonCoroutines.Start(WaitForInput("Enter Stem Color (eg: 255,255,255)", delegate(string stemColor)
																{
																	//IL_0030: Unknown result type (might be due to invalid IL or missing references)
																	string[] array11 = stemColor.Split(',');
																	byte b25 = byte.Parse(array11[0]);
																	byte b26 = byte.Parse(array11[1]);
																	byte b27 = byte.Parse(array11[2]);
																	weedSettings.StemColor = new Color32(b25, b26, b27, (byte)1);
																}));
															}));
														}));
													}));
													NetworkSingleton<ProductManager>.Instance.CreateWeed_Server(name, id, (EDrugType)0, val, weedSettings);
												}
												else if (type.ToLower() == "cocaine")
												{
													MelonCoroutines.Start(WaitForInput("Enter Main Color (eg: 255,255,255)", delegate(string primaryColor)
													{
														//IL_0030: Unknown result type (might be due to invalid IL or missing references)
														string[] array6 = primaryColor.Split(',');
														byte b10 = byte.Parse(array6[0]);
														byte b11 = byte.Parse(array6[1]);
														byte b12 = byte.Parse(array6[2]);
														cocaineSettings.MainColor = new Color32(b10, b11, b12, (byte)1);
														MelonCoroutines.Start(WaitForInput("Enter Secondary Color (eg: 255,255,255)", delegate(string secondaryColor)
														{
															//IL_0030: Unknown result type (might be due to invalid IL or missing references)
															string[] array7 = secondaryColor.Split(',');
															byte b13 = byte.Parse(array7[0]);
															byte b14 = byte.Parse(array7[1]);
															byte b15 = byte.Parse(array7[2]);
															cocaineSettings.SecondaryColor = new Color32(b13, b14, b15, (byte)1);
														}));
													}));
													NetworkSingleton<ProductManager>.Instance.CreateCocaine_Server(name, id, (EDrugType)2, val, cocaineSettings);
												}
												else if (type.ToLower() == "meth")
												{
													MelonCoroutines.Start(WaitForInput("Enter Main Color (eg: 255,255,255)", delegate(string primaryColor)
													{
														//IL_0030: Unknown result type (might be due to invalid IL or missing references)
														string[] array3 = primaryColor.Split(',');
														byte b = byte.Parse(array3[0]);
														byte b2 = byte.Parse(array3[1]);
														byte b3 = byte.Parse(array3[2]);
														methSettings.MainColor = new Color32(b, b2, b3, (byte)1);
														MelonCoroutines.Start(WaitForInput("Enter Secondary Color (eg: 255,255,255):", delegate(string secondaryColor)
														{
															//IL_0030: Unknown result type (might be due to invalid IL or missing references)
															string[] array4 = secondaryColor.Split(',');
															byte b4 = byte.Parse(array4[0]);
															byte b5 = byte.Parse(array4[1]);
															byte b6 = byte.Parse(array4[2]);
															methSettings.SecondaryColor = new Color32(b4, b5, b6, (byte)1);
															MelonCoroutines.Start(WaitForInput("Enter Secondary Color (eg: 255,255,255):", delegate(string secondaryColor)
															{
																string[] array5 = secondaryColor.Split(',');
																byte b7 = byte.Parse(array5[0]);
																byte b8 = byte.Parse(array5[1]);
																byte b9 = byte.Parse(array5[2]);
															}));
														}));
													}));
													NetworkSingleton<ProductManager>.Instance.CreateMeth_Server(name, id, (EDrugType)2, val, methSettings);
												}
											}));
										}));
									}));
								}
							}
						}));
					}));
					responses.Add(new MessageResponse("Back", delegate
					{
						MENU_MAIN(openMessage: true);
					}));
				}
				_messageSystem.ShowResponses(responses.ToArray());
			}
		}

		private void MENU_INVENTORY(Player player)
		{
			_messageSystem.SendPlayerMessage("Open Inventory");
			List<MessageResponse> list = new List<MessageResponse>();
			foreach (ItemSlot slots in (Il2CppArrayBase<ItemSlot>)(object)player.Inventory)
			{
				if (slots.ItemInstance == null)
				{
					continue;
				}
				list.Add(new MessageResponse(slots.ItemInstance.Name, delegate
				{
					_messageSystem.SendPlayerMessage("Edit " + slots.ItemInstance.Name);
					Task.Delay(1000);
					_messageSystem.SendNPCMessage("Editing " + slots.ItemInstance.Name);
					_messageSystem.ShowResponses(new MessageResponse("Duplicate", delegate
					{
						_messageSystem.SendPlayerMessage("Duplicate " + slots.ItemInstance.Name);
						if (slots.ItemInstance.Quantity * 2 > slots.ItemInstance.StackLimit)
						{
							slots.ItemInstance.SetQuantity(slots.ItemInstance.StackLimit);
							_messageSystem.SendNPCMessage("stack limit reached");
						}
						else
						{
							slots.ItemInstance.SetQuantity(slots.ItemInstance.Quantity * 2);
							_messageSystem.SendNPCMessage("call it done.");
						}
					}), new MessageResponse("Package (Baggie)", delegate
					{
						_messageSystem.SendPlayerMessage("Package " + slots.ItemInstance.Name + " into a Baggie");
						ItemDefinition item2 = Registry.GetItem("baggie");
						PackagingDefinition packaging2 = (PackagingDefinition)(object)((item2 is PackagingDefinition) ? item2 : null);
						if (slots.ItemInstance is ProductItemInstance)
						{
							ItemInstance itemInstance2 = slots.ItemInstance;
							((ProductItemInstance)((itemInstance2 is ProductItemInstance) ? itemInstance2 : null)).SetPackaging(packaging2);
							PlayerSingleton<PlayerInventory>.Instance.SetEquippingEnabled(false);
							PlayerSingleton<PlayerInventory>.Instance.SetEquippingEnabled(true);
							_messageSystem.SendNPCMessage("Packaged " + slots.ItemInstance.Name + " into Baggie");
						}
						else
						{
							_messageSystem.SendNPCMessage("I can't package this.");
						}
					}), new MessageResponse("Package (Jar)", delegate
					{
						_messageSystem.SendPlayerMessage("Package " + slots.ItemInstance.Name + " into a Jar");
						ItemDefinition item = Registry.GetItem("jar");
						PackagingDefinition packaging = (PackagingDefinition)(object)((item is PackagingDefinition) ? item : null);
						if (slots.ItemInstance is ProductItemInstance)
						{
							ItemInstance itemInstance = slots.ItemInstance;
							((ProductItemInstance)((itemInstance is ProductItemInstance) ? itemInstance : null)).SetPackaging(packaging);
							PlayerSingleton<PlayerInventory>.Instance.SetEquippingEnabled(false);
							PlayerSingleton<PlayerInventory>.Instance.SetEquippingEnabled(true);
							_messageSystem.SendNPCMessage("Packaged " + slots.ItemInstance.Name + " into Jar");
						}
						else
						{
							_messageSystem.SendNPCMessage("I can't package this.");
						}
					}), new MessageResponse("Back", delegate
					{
						MENU_INVENTORY(player);
					}));
				}));
			}
			list.Add(new MessageResponse("Back", MENU_PLAYERS));
			if (list.Count == 0)
			{
				_messageSystem.SendNPCMessage("No items available!");
				MENU_PLAYERS();
			}
			else
			{
				_messageSystem.ShowResponses(list.ToArray());
				_messageSystem.SendNPCMessage("Done.");
			}
		}

		private void MENU_MISC()
		{
			_messageSystem.SendPlayerMessage("Open Misc Menu");
			_messageSystem.ShowResponses(new MessageResponse("Save and Reload", delegate
			{
				_messageSystem.SendPlayerMessage("Save my game");
				_messageSystem.SendNPCMessage("Sure, allow me just one moment...");
				Singleton<SaveManager>.Instance.Save();
				SaveInfo activeSaveInfo2 = Singleton<LoadManager>.Instance.ActiveSaveInfo;
				Task.Delay(1000);
				Singleton<LoadManager>.Instance.ExitToMenu((SaveInfo)null, (Data)null, false);
				Task.Delay(2000);
				Singleton<LoadManager>.Instance.StartGame(activeSaveInfo2, false);
			}), new MessageResponse("Unlock Achievements", delegate
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				_messageSystem.SendPlayerMessage("Unlock my achievements");
				foreach (EAchievement item in (Il2CppArrayBase<EAchievement>)(object)Singleton<AchievementManager>.Instance.achievements)
				{
					Singleton<AchievementManager>.instance.UnlockAchievement(item);
				}
				_messageSystem.SendNPCMessage("Done, check your profile.");
			}), new MessageResponse("Toggle Low End Mode", delegate
			{
				_messageSystem.SendPlayerMessage("Toggle Low End Mode");
				lowEndMode = !lowEndMode;
				EnvironmentFX.SetActive(!lowEndMode);
				_messageSystem.SendNPCMessage("Done.");
			}), new MessageResponse("Save Cloning", delegate
			{
				_messageSystem.SendPlayerMessage("Open Save Cloning Menu");
				List<MessageResponse> list = new List<MessageResponse>();
				for (int i = 1; i <= 5; i++)
				{
					int saveSlot = i;
					list.Add(new MessageResponse($"Clone to Save Slot {saveSlot}", delegate
					{
						_messageSystem.SendPlayerMessage($"Clone to Slot {saveSlot}");
						MelonCoroutines.Start(WaitForInput("Save Name:", delegate(string input)
						{
							SaveInfo activeSaveInfo = Singleton<LoadManager>.Instance.ActiveSaveInfo;
							string text = activeSaveInfo.SavePath.Replace($"SaveGame_{activeSaveInfo.SaveSlotNumber}", $"SaveGame_{saveSlot}");
							activeSaveInfo.SaveSlotNumber = saveSlot;
							activeSaveInfo.SavePath = text;
							activeSaveInfo.OrganisationName = input;
							Singleton<SaveManager>.Instance.Save(text);
							MelonLogger.Msg(activeSaveInfo.SavePath);
							_messageSystem.SendNPCMessage("Done.");
						}));
					}));
				}
				list.Add(new MessageResponse("Back", delegate
				{
					MENU_MISC();
				}));
				_messageSystem.ShowResponses(list.ToArray());
				_messageSystem.SendNPCMessage("Done.");
			}), new MessageResponse("Back", delegate
			{
				MENU_MAIN(openMessage: true);
			}));
			_messageSystem.SendNPCMessage("Done.");
		}

		private void ShowNPCOptions(NPC npc)
		{
			List<MessageResponse> list = new List<MessageResponse>();
			_messageSystem.SendNPCMessage($"{npc.fullName}'s Stats:\n\nUnlocked: {npc.RelationData.Unlocked}\nRelationship: {npc.RelationData.RelationDelta}%");
			if (!npc.RelationData.Unlocked)
			{
				list.Add(new MessageResponse("Unlock", delegate
				{
					_messageSystem.SendPlayerMessage("Unlock " + npc.FirstName);
					npc.RelationData.Unlock((EUnlockType)1, true);
					_messageSystem.SendNPCMessage("Unlocked relationship with " + npc.FirstName);
				}));
			}
			list.Add(new MessageResponse("Teleport", delegate
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0050: Unknown result type (might be due to invalid IL or missing references)
				_messageSystem.SendPlayerMessage("Teleport to " + npc.FirstName);
				PlayerSingleton<PlayerMovement>.Instance.Teleport(((Component)npc).transform.position + new Vector3(0f, 5f, 0f));
				_messageSystem.SendNPCMessage("Teleported to " + npc.FirstName);
			}));
			list.Add(new MessageResponse("Set as CDXX Icon", delegate
			{
				_messageSystem.SendPlayerMessage("Set " + npc.FirstName + " as CDXX Icon");
				_npcInstance.MugshotSprite = npc.MugshotSprite;
				_messageSystem.SendNPCMessage("Set " + npc.FirstName + " to CDXX Icon");
			}));
			Customer customer = ((Component)npc).GetComponent<Customer>();
			if ((Object)(object)customer != (Object)null && !customer.IsAwaitingDelivery)
			{
				list.Add(new MessageResponse("Create Deal", delegate
				{
					_messageSystem.SendPlayerMessage("Create deal with " + npc.FirstName);
					if ((Object)(object)customer == (Object)null)
					{
						_messageSystem.SendNPCMessage("I can't do that with " + npc.FirstName);
					}
					else if (customer.IsAwaitingDelivery)
					{
						_messageSystem.SendNPCMessage("They're already waiting for something.");
					}
					else
					{
						ContractInfo val = customer.CheckContractGeneration(true);
						customer.OfferContract(val);
						_messageSystem.SendNPCMessage("Created deal with " + customer.NPC.FirstName);
					}
				}));
			}
			list.Add(new MessageResponse("Set Relationship", delegate
			{
				_messageSystem.SendPlayerMessage("Set Relationship for " + npc.FirstName);
				MelonCoroutines.Start(WaitForInput($"Enter relationship (Current: {npc.RelationData.RelationDelta}%)", delegate(string input)
				{
					if (float.TryParse(input, out var result))
					{
						if (result > 0f)
						{
							npc.RelationData.RelationDelta = result;
							npc.RelationData.SetRelationship(result);
							_messageSystem.SendNPCMessage($"Set relationship for {npc.FirstName} to {npc.RelationData.RelationDelta}");
						}
					}
					else
					{
						_messageSystem.SendNPCMessage("Invalid amount entered");
					}
					ShowNPCOptions(npc);
				}));
			}));
			list.Add(new MessageResponse("Back", MENU_NPCS));
			_messageSystem.ShowResponses(list.ToArray());
		}

		[IteratorStateMachine(typeof(<ChangeProductStat>d__53))]
		private IEnumerator ChangeProductStat(ProductDefinition product, string statName, Action<ProductDefinition, float> floatSetter = null, Func<ProductDefinition, float> floatGetter = null, Action<ProductDefinition, string> stringSetter = null, Func<ProductDefinition, string> stringGetter = null)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <ChangeProductStat>d__53(0)
			{
				<>4__this = this,
				product = product,
				statName = statName,
				floatSetter = floatSetter,
				floatGetter = floatGetter,
				stringSetter = stringSetter,
				stringGetter = stringGetter
			};
		}

		private void ShowBankAmountInput(Enums.BankType transactionType)
		{
			string action = ((transactionType == Enums.BankType.Deposit) ? "Deposit" : "Withdraw");
			_messageSystem.SendPlayerMessage(action + " Amount");
			MelonCoroutines.Start(WaitForInput("Enter amount to " + action, delegate(string input)
			{
				if (float.TryParse(input, out var result))
				{
					if (result > 0f)
					{
						try
						{
							if (transactionType == Enums.BankType.Deposit)
							{
								if (NetworkSingleton<MoneyManager>.Instance.cashBalance >= result)
								{
									NetworkSingleton<MoneyManager>.Instance.cashInstance.ChangeBalance(0f - result);
									NetworkSingleton<MoneyManager>.Instance.CreateOnlineTransaction("CDXX " + action, result, 1f, "Processed by " + Player.Local.PlayerName);
									_messageSystem.SendNPCMessage($"Successfully deposited ${result}\nNew Balance: ${NetworkSingleton<MoneyManager>.Instance.onlineBalance}");
								}
								else
								{
									_messageSystem.SendNPCMessage("Not enough cash to deposit");
								}
							}
							else if (NetworkSingleton<MoneyManager>.Instance.onlineBalance >= result)
							{
								NetworkSingleton<MoneyManager>.Instance.cashInstance.ChangeBalance(result);
								NetworkSingleton<MoneyManager>.Instance.CreateOnlineTransaction("CDXX " + action, 0f - result, 1f, "Processed by " + Player.Local.PlayerName);
								_messageSystem.SendNPCMessage($"Successfully withdrew ${result}\nNew Balance: ${NetworkSingleton<MoneyManager>.Instance.onlineBalance}");
							}
							else
							{
								_messageSystem.SendNPCMessage("Not enough funds in account");
							}
						}
						catch (Exception value)
						{
							MelonLogger.Error($"Bank transaction failed: {value}");
							_messageSystem.SendNPCMessage("Transaction failed - please try again");
						}
					}
					else
					{
						_messageSystem.SendNPCMessage("Amount must be positive");
					}
				}
				else
				{
					_messageSystem.SendNPCMessage("Invalid amount entered");
				}
				MENU_BANK();
			}));
		}

		private void ShowProductOptions(ProductDefinition product)
		{
			if (!isChoosing)
			{
				_messageSystem.SendNPCMessage($"{((ItemDefinition)product).Name}'s Stats:\n\nPrice: ${product.Price}\nAddictiveness: {Math.Round(product.GetAddictiveness() * 100f)}%\nEffect Duration: {product.EffectsDuration} seconds.");
			}
			else
			{
				isChoosing = false;
			}
			_messageSystem.ShowResponses(new MessageResponse("Give", delegate
			{
				ItemDefinition item = Registry.GetItem(((ItemDefinition)product).ID);
				if ((Object)(object)item == (Object)null)
				{
					MelonLogger.Warning("Item not found in registry");
				}
				else
				{
					ItemInstance defaultInstance = item.GetDefaultInstance(1);
					if (PlayerSingleton<PlayerInventory>.Instance.CanItemFitInInventory(defaultInstance, 1))
					{
						PlayerSingleton<PlayerInventory>.Instance.AddItemToInventory(defaultInstance);
					}
				}
			}), new MessageResponse("Set as CDXX Icon", delegate
			{
				_messageSystem.SendPlayerMessage("Set as Icon");
				_npcInstance.MugshotSprite = ((ItemDefinition)product).Icon;
				_messageSystem.SendNPCMessage("Done.");
			}), new MessageResponse("Create Mix Recipe", delegate
			{
				_messageSystem.SendPlayerMessage("Create mix recipe for " + ((ItemDefinition)product).Name);
				string _mixer = string.Empty;
				MelonCoroutines.Start(WaitForInput("Enter Mixer (eg: energydrink)", delegate(string mixer)
				{
					_mixer = mixer;
					isChoosing = true;
					chosenProduct = product;
					_messageSystem.SendNPCMessage("Choose the product you would like mixed with " + _mixer);
					MENU_PRODUCTS();
					MelonCoroutines.Start(WaitForBool(delegate
					{
						_messageSystem.SendNPCMessage("It's been done, check your recipe tab.");
						NetworkSingleton<ProductManager>.Instance.CreateMixRecipe((NetworkConnection)null, ((ItemDefinition)chosenProduct).ID, _mixer, ((ItemDefinition)product).ID);
					}));
				}));
			}), new MessageResponse("Change Name", delegate
			{
				_messageSystem.SendPlayerMessage("Change name of " + ((ItemDefinition)product).Name);
				MelonCoroutines.Start(ChangeProductStat(product, "name", null, null, delegate(ProductDefinition p, string v)
				{
					((ItemDefinition)p).Name = v;
				}, (ProductDefinition p) => ((ItemDefinition)p).Name));
			}), new MessageResponse("Change Description", delegate
			{
				_messageSystem.SendPlayerMessage("Change description of " + ((ItemDefinition)product).Name);
				MelonCoroutines.Start(ChangeProductStat(product, "description", null, null, delegate(ProductDefinition p, string v)
				{
					((ItemDefinition)p).Description = v;
				}, (ProductDefinition p) => ((ItemDefinition)p).Description));
			}), new MessageResponse("Change Addictiveness", delegate
			{
				_messageSystem.SendPlayerMessage("Change Addictiveness of " + ((ItemDefinition)product).Name);
				MelonCoroutines.Start(ChangeProductStat(product, "addictiveness", delegate(ProductDefinition p, float v)
				{
					p.BaseAddictiveness = v;
				}, (ProductDefinition p) => p.GetAddictiveness()));
			}), new MessageResponse("Change Effect Duration", delegate
			{
				_messageSystem.SendPlayerMessage("Change Effect Duration of " + ((ItemDefinition)product).Name);
				MelonCoroutines.Start(ChangeProductStat(product, "effectsduration", delegate(ProductDefinition p, float v)
				{
					p.EffectsDuration = (int)v;
				}, (ProductDefinition p) => p.EffectsDuration));
			}), new MessageResponse("Back", MENU_PRODUCTS));
		}
	}
	public class CDXXMessageSystem
	{
		[CompilerGenerated]
		private sealed class <DelayedShowResponses>d__5 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public float delay;

			public MessageResponse[] responses;

			public CDXXMessageSystem <>4__this;

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

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

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

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

			private bool MoveNext()
			{
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(delay);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>4__this.ShowResponses(responses);
					return false;
				}
			}

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

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

		private readonly NPC _npc;

		public MSGConversation _conversation;

		public CDXXMessageSystem(NPC npc)
		{
			_npc = npc;
			Initialize();
		}

		private void Initialize()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			_conversation = new MSGConversation(_npc, _npc.fullName);
			_npc.MSGConversation = _conversation;
			_conversation.messageHistory = new List<Message>();
			_conversation.messageChainHistory = new List<MessageChain>();
			_conversation.bubbles = new List<MessageBubble>();
			_conversation.EntryVisible = true;
			_conversation.Sendables = new List<SendableMessage>();
			_npc.ConversationCategories = new List<EConversationCategory>();
			_npc.ConversationCategories.Add((EConversationCategory)0);
			_conversation.SetCategories(_npc.ConversationCategories);
		}

		public void ShowResponses(params MessageResponse[] responses)
		{
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Expected O, but got Unknown
			if (_conversation == null)
			{
				return;
			}
			_conversation.ClearResponses(false);
			List<Response> val = new List<Response>();
			foreach (MessageResponse response in responses)
			{
				Action action = delegate
				{
					response.Action?.Invoke();
					if (response.NextResponses != null)
					{
						MelonCoroutines.Start(DelayedShowResponses(0.5f, response.NextResponses));
					}
				};
				val.Add(new Response(response.Text, response.Text, Action.op_Implicit(action), true));
			}
			_conversation.ShowResponses(val, 0.5f, false);
		}

		[IteratorStateMachine(typeof(<DelayedShowResponses>d__5))]
		private IEnumerator DelayedShowResponses(float delay, params MessageResponse[] responses)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <DelayedShowResponses>d__5(0)
			{
				<>4__this = this,
				delay = delay,
				responses = responses
			};
		}

		public void SendNPCMessage(string text)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			_conversation.SendMessage(new Message(text, (ESenderType)1, true, -1), true, false);
		}

		public void SendPlayerMessage(string text)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			_conversation.SendMessage(new Message(text, (ESenderType)0, true, -1), true, false);
		}
	}
	public class MessageResponse
	{
		public string Text { get; }

		public Action Action { get; }

		public MessageResponse[] NextResponses { get; set; }

		public MessageResponse(string text, Action action)
		{
			Text = text;
			Action = action;
		}
	}
	public static class Enums
	{
		public enum BankType
		{
			Deposit,
			Withdraw
		}

		public enum MenuType
		{
			Main,
			Player,
			NPC,
			Quest,
			Bank,
			Building,
			Misc
		}
	}
	public class RangedWeaponPatch
	{
		[HarmonyPatch(typeof(Equippable_RangedWeapon), "Update")]
		public static class Patch
		{
			[HarmonyPostfix]
			public static void Postfix(Equippable_RangedWeapon __instance)
			{
				Singleton<HUD>.Instance.SetCrosshairVisible(true);
				PlayerSingleton<PlayerMovement>.Instance.RemoveSprintBlocker("Aiming");
			}
		}
	}
	public class ShopPatch
	{
		[HarmonyPatch(typeof(ShopInterface), "Exit")]
		public static class _ShopPatch
		{
			[HarmonyPostfix]
			public static void Postfix()
			{
				if (PlayerSingleton<Phone>.Instance.IsOpen)
				{
					PlayerSingleton<PlayerCamera>.Instance.FreeMouse();
				}
			}
		}

		[HarmonyPatch(typeof(ClothingShopInterface), "Exit")]
		public static class ClothingShopPatch
		{
			[HarmonyPostfix]
			public static void Postfix()
			{
				if (PlayerSingleton<Phone>.Instance.IsOpen)
				{
					PlayerSingleton<PlayerCamera>.Instance.FreeMouse();
				}
			}
		}
	}
	public class StorageTweak
	{
		[HarmonyPatch(typeof(Dealer), "TradeItemsDone")]
		public static class DealerUI
		{
			[HarmonyPostfix]
			public static void Postfix()
			{
				((Component)Singleton<GameplayMenu>.Instance).gameObject.SetActive(true);
				PlayerSingleton<PlayerCamera>.Instance.FreeMouse();
			}
		}

		[HarmonyPatch(typeof(StorageEntity), "Close")]
		public static class StorageEntityUI
		{
			[HarmonyPrefix]
			public static void Prefix()
			{
				((Component)Singleton<GameplayMenu>.Instance).gameObject.SetActive(true);
				PlayerSingleton<PlayerCamera>.Instance.FreeMouse();
			}
		}
	}
}

ModManager_.dll

Decompiled 5 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppTMPro;
using MelonLoader;
using MelonLoader.Preferences;
using Microsoft.CodeAnalysis;
using ModManager_;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(Core), "ModManager+", "1.0.0", "rbawe", null)]
[assembly: MelonGame("TVGS", "Schedule I")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("ModManager_")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ModManager_")]
[assembly: AssemblyTitle("ModManager_")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace ModManager_
{
	public class Core : MelonMod
	{
		private bool isGuiVisible = false;

		private Rect windowRect = new Rect((float)(Screen.width / 2 - 400), (float)(Screen.height / 2 - 300), 800f, 600f);

		private Vector2 scrollPosition;

		private readonly string modsPath = Path.Combine(Directory.GetCurrentDirectory(), "Mods");

		private List<(string path, bool isEnabled)> modFiles = new List<(string, bool)>();

		private GUIStyle buttonStyle;

		private GUIStyle categoryStyle;

		private GUIStyle headerStyle;

		private GUIStyle optionStyle;

		private GUIStyle windowStyle;

		private bool stylesInitialized = false;

		private Dictionary<string, bool> categoryFoldouts = new Dictionary<string, bool>();

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

		private string selectedTab = "Mods";

		private GameObject settingsButton;

		private GameObject modSettingsButton;

		private bool restartRequired = false;

		private Vector2 modListScrollPosition;

		private Vector2 prefsScrollPosition;

		private string selectedMod = "";

		private GUIStyle modListStyle;

		private GUIStyle modListButtonStyle;

		private GUIStyle categoryBoxStyle;

		private GUIStyle selectedModStyle;

		private bool isCapturingKey = false;

		private MelonPreferences_Entry currentCapturingEntry = null;

		private float dragStartValue = 0f;

		private bool isDragging = false;

		private Vector2 dragStartMousePos;

		private bool buttonInitialized = false;

		private void ToggleGui()
		{
			isGuiVisible = !isGuiVisible;
		}

		public override void OnSceneWasLoaded(int buildIndex, string sceneName)
		{
			if (sceneName == "Main")
			{
				settingsButton = null;
				modSettingsButton = null;
				buttonInitialized = false;
			}
			else if (sceneName == "Menu" && !buttonInitialized)
			{
				MelonCoroutines.Start(MenuDelayedInit());
			}
		}

		private IEnumerator MenuDelayedInit()
		{
			yield return (object)new WaitForSeconds(3f);
			int num;
			if (!buttonInitialized)
			{
				Scene activeScene = SceneManager.GetActiveScene();
				num = ((((Scene)(ref activeScene)).name == "Menu") ? 1 : 0);
			}
			else
			{
				num = 0;
			}
			if (num != 0)
			{
				FindSettingsButton();
			}
		}

		private void FindSettingsButton()
		{
			if ((Object)(object)modSettingsButton != (Object)null)
			{
				Object.Destroy((Object)(object)modSettingsButton);
				modSettingsButton = null;
			}
			Button[] array = Il2CppArrayBase<Button>.op_Implicit(Object.FindObjectsOfType<Button>());
			Button[] array2 = array;
			foreach (Button val in array2)
			{
				TextMeshProUGUI componentInChildren = ((Component)val).GetComponentInChildren<TextMeshProUGUI>();
				if ((Object)(object)componentInChildren != (Object)null && ((TMP_Text)componentInChildren).text.ToLower().Contains("settings"))
				{
					settingsButton = ((Component)val).gameObject;
					CreateModSettingsButton();
					buttonInitialized = true;
					return;
				}
				Text componentInChildren2 = ((Component)val).GetComponentInChildren<Text>();
				if ((Object)(object)componentInChildren2 != (Object)null && componentInChildren2.text.ToLower().Contains("settings"))
				{
					settingsButton = ((Component)val).gameObject;
					CreateModSettingsButton();
					buttonInitialized = true;
					return;
				}
			}
			((MelonBase)this).LoggerInstance.Msg("Could not find settings button, will use floating button instead.");
			CreateFloatingModSettingsButton();
			buttonInitialized = true;
		}

		private void CreateFloatingModSettingsButton()
		{
		}

		private void CreateModSettingsButton()
		{
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02db: Unknown result type (might be due to invalid IL or missing references)
			//IL_038e: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_048a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0494: Expected O, but got Unknown
			//IL_0434: Unknown result type (might be due to invalid IL or missing references)
			//IL_0443: Unknown result type (might be due to invalid IL or missing references)
			//IL_0461: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)settingsButton == (Object)null)
			{
				return;
			}
			modSettingsButton = Object.Instantiate<GameObject>(settingsButton, settingsButton.transform.parent);
			((Object)modSettingsButton).name = "ModSettings";
			RectTransform component = settingsButton.GetComponent<RectTransform>();
			RectTransform component2 = modSettingsButton.GetComponent<RectTransform>();
			if (!((Object)(object)component != (Object)null) || !((Object)(object)component2 != (Object)null))
			{
				return;
			}
			component2.anchorMin = component.anchorMin;
			component2.anchorMax = component.anchorMax;
			component2.pivot = component.pivot;
			component2.sizeDelta = component.sizeDelta;
			Vector2 anchoredPosition = component.anchoredPosition;
			anchoredPosition.x = component.sizeDelta.x + 100f;
			component2.anchoredPosition = anchoredPosition;
			Vector3 localPosition = modSettingsButton.transform.localPosition;
			localPosition.z = settingsButton.transform.localPosition.z;
			modSettingsButton.transform.localPosition = localPosition;
			LayoutElement val = modSettingsButton.AddComponent<LayoutElement>();
			val.ignoreLayout = true;
			Button component3 = modSettingsButton.GetComponent<Button>();
			if ((Object)(object)component3 != (Object)null)
			{
				Button component4 = settingsButton.GetComponent<Button>();
				if ((Object)(object)component4 != (Object)null)
				{
					((Selectable)component3).colors = ((Selectable)component4).colors;
				}
				Image[] array = Il2CppArrayBase<Image>.op_Implicit(settingsButton.GetComponents<Image>());
				Image[] array2 = Il2CppArrayBase<Image>.op_Implicit(modSettingsButton.GetComponents<Image>());
				for (int i = 0; i < array.Length && i < array2.Length; i++)
				{
					if ((Object)(object)array[i] != (Object)null && (Object)(object)array2[i] != (Object)null)
					{
						array2[i].sprite = array[i].sprite;
						array2[i].type = array[i].type;
						((Graphic)array2[i]).color = ((Graphic)array[i]).color;
						((Graphic)array2[i]).material = ((Graphic)array[i]).material;
						((Graphic)array2[i]).raycastTarget = ((Graphic)array[i]).raycastTarget;
					}
				}
				Image[] array3 = Il2CppArrayBase<Image>.op_Implicit(settingsButton.GetComponentsInChildren<Image>(true));
				Image[] array4 = Il2CppArrayBase<Image>.op_Implicit(modSettingsButton.GetComponentsInChildren<Image>(true));
				for (int j = 0; j < array3.Length && j < array4.Length; j++)
				{
					if ((Object)(object)array3[j] != (Object)null && (Object)(object)array4[j] != (Object)null)
					{
						array4[j].sprite = array3[j].sprite;
						array4[j].type = array3[j].type;
						((Graphic)array4[j]).color = ((Graphic)array3[j]).color;
						((Graphic)array4[j]).material = ((Graphic)array3[j]).material;
						((Graphic)array4[j]).raycastTarget = ((Graphic)array3[j]).raycastTarget;
					}
				}
				TextMeshProUGUI componentInChildren = settingsButton.GetComponentInChildren<TextMeshProUGUI>(true);
				TextMeshProUGUI componentInChildren2 = modSettingsButton.GetComponentInChildren<TextMeshProUGUI>(true);
				if ((Object)(object)componentInChildren != (Object)null && (Object)(object)componentInChildren2 != (Object)null)
				{
					((TMP_Text)componentInChildren2).font = ((TMP_Text)componentInChildren).font;
					((TMP_Text)componentInChildren2).fontSize = ((TMP_Text)componentInChildren).fontSize;
					((TMP_Text)componentInChildren2).fontStyle = ((TMP_Text)componentInChildren).fontStyle;
					((Graphic)componentInChildren2).color = ((Graphic)componentInChildren).color;
					((Graphic)componentInChildren2).material = ((Graphic)componentInChildren).material;
					((TMP_Text)componentInChildren2).alignment = ((TMP_Text)componentInChildren).alignment;
					((TMP_Text)componentInChildren2).text = "Mod Settings";
				}
				else
				{
					Text componentInChildren3 = settingsButton.GetComponentInChildren<Text>(true);
					Text componentInChildren4 = modSettingsButton.GetComponentInChildren<Text>(true);
					if ((Object)(object)componentInChildren3 != (Object)null && (Object)(object)componentInChildren4 != (Object)null)
					{
						componentInChildren4.font = componentInChildren3.font;
						componentInChildren4.fontSize = componentInChildren3.fontSize;
						componentInChildren4.fontStyle = componentInChildren3.fontStyle;
						((Graphic)componentInChildren4).color = ((Graphic)componentInChildren3).color;
						((Graphic)componentInChildren4).material = ((Graphic)componentInChildren3).material;
						componentInChildren4.alignment = componentInChildren3.alignment;
						componentInChildren4.text = "Mod Settings";
					}
				}
				modSettingsButton.SetActive(true);
				component3.onClick = new ButtonClickedEvent();
				((UnityEvent)component3.onClick).AddListener(UnityAction.op_Implicit((Action)delegate
				{
					ToggleGui();
					if ((Object)(object)EventSystem.current != (Object)null)
					{
						EventSystem.current.SetSelectedGameObject((GameObject)null);
					}
				}));
			}
			CanvasGroup component5 = settingsButton.GetComponent<CanvasGroup>();
			CanvasGroup val2 = modSettingsButton.GetComponent<CanvasGroup>();
			if ((Object)(object)component5 != (Object)null)
			{
				if ((Object)(object)val2 == (Object)null)
				{
					val2 = modSettingsButton.AddComponent<CanvasGroup>();
				}
				val2.alpha = component5.alpha;
				val2.blocksRaycasts = component5.blocksRaycasts;
				val2.interactable = component5.interactable;
				val2.ignoreParentGroups = component5.ignoreParentGroups;
			}
		}

		private void InitializeStyles()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Expected O, but got Unknown
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Expected O, but got Unknown
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Expected O, but got Unknown
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Expected O, but got Unknown
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: Expected O, but got Unknown
			//IL_0235: Expected O, but got Unknown
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Expected O, but got Unknown
			//IL_0285: Expected O, but got Unknown
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_0295: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a8: Expected O, but got Unknown
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_0316: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0327: Unknown result type (might be due to invalid IL or missing references)
			//IL_032c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Expected O, but got Unknown
			//IL_0337: Unknown result type (might be due to invalid IL or missing references)
			//IL_0345: Expected O, but got Unknown
			//IL_0350: Unknown result type (might be due to invalid IL or missing references)
			//IL_0355: Unknown result type (might be due to invalid IL or missing references)
			//IL_035a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0364: Expected O, but got Unknown
			//IL_0365: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0375: Expected O, but got Unknown
			//IL_0376: Unknown result type (might be due to invalid IL or missing references)
			//IL_0393: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ba: Expected O, but got Unknown
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03db: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ec: Expected O, but got Unknown
			//IL_03ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fc: Expected O, but got Unknown
			//IL_03fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0409: Unknown result type (might be due to invalid IL or missing references)
			//IL_0426: Unknown result type (might be due to invalid IL or missing references)
			//IL_0437: Unknown result type (might be due to invalid IL or missing references)
			//IL_044c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0457: Unknown result type (might be due to invalid IL or missing references)
			//IL_0474: Unknown result type (might be due to invalid IL or missing references)
			//IL_0485: Unknown result type (might be due to invalid IL or missing references)
			//IL_048b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0496: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_04da: Expected O, but got Unknown
			//IL_04e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0503: Unknown result type (might be due to invalid IL or missing references)
			//IL_0514: Unknown result type (might be due to invalid IL or missing references)
			//IL_051a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0525: Unknown result type (might be due to invalid IL or missing references)
			//IL_0542: Unknown result type (might be due to invalid IL or missing references)
			//IL_0553: Unknown result type (might be due to invalid IL or missing references)
			//IL_0559: Unknown result type (might be due to invalid IL or missing references)
			//IL_0569: Expected O, but got Unknown
			//IL_0574: Unknown result type (might be due to invalid IL or missing references)
			//IL_0579: Unknown result type (might be due to invalid IL or missing references)
			//IL_0582: Unknown result type (might be due to invalid IL or missing references)
			//IL_058c: Expected O, but got Unknown
			//IL_058d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0593: Unknown result type (might be due to invalid IL or missing references)
			//IL_059d: Expected O, but got Unknown
			//IL_059e: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_05cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e2: Expected O, but got Unknown
			//IL_05f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0602: Unknown result type (might be due to invalid IL or missing references)
			//IL_061f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0635: Expected O, but got Unknown
			//IL_0645: Unknown result type (might be due to invalid IL or missing references)
			//IL_064a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0656: Unknown result type (might be due to invalid IL or missing references)
			//IL_0662: Unknown result type (might be due to invalid IL or missing references)
			//IL_067f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0690: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_06be: Unknown result type (might be due to invalid IL or missing references)
			//IL_06db: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f1: Expected O, but got Unknown
			if (!stylesInitialized)
			{
				GUIStyle val = new GUIStyle(GUI.skin.button)
				{
					fontSize = 14,
					fontStyle = (FontStyle)1,
					alignment = (TextAnchor)4,
					padding = new RectOffset(12, 12, 8, 8),
					margin = new RectOffset(4, 4, 4, 4)
				};
				val.normal.background = CreateRoundedRectTexture(2, 2, new Color(0.2f, 0.2f, 0.2f, 0.9f), 3);
				val.normal.textColor = new Color(0.9f, 0.9f, 0.9f);
				val.hover.background = CreateRoundedRectTexture(2, 2, new Color(0.25f, 0.25f, 0.25f, 0.95f), 3);
				val.hover.textColor = Color.white;
				val.active.background = CreateRoundedRectTexture(2, 2, new Color(0.15f, 0.15f, 0.15f, 1f), 3);
				val.active.textColor = new Color(0.8f, 0.8f, 0.8f);
				buttonStyle = val;
				GUIStyle val2 = new GUIStyle(GUI.skin.label)
				{
					fontSize = 16,
					fontStyle = (FontStyle)1,
					alignment = (TextAnchor)3,
					padding = new RectOffset(5, 5, 8, 8),
					margin = new RectOffset(0, 0, 0, 10)
				};
				val2.normal.textColor = new Color(0.9f, 0.9f, 1f);
				val2.normal.background = CreateRoundedRectTexture(2, 2, new Color(0.2f, 0.2f, 0.25f, 0.7f), 3);
				val2.fixedHeight = 35f;
				categoryStyle = val2;
				GUIStyle val3 = new GUIStyle(GUI.skin.label)
				{
					fontSize = 24,
					fontStyle = (FontStyle)1,
					alignment = (TextAnchor)1
				};
				val3.normal.textColor = Color.white;
				val3.padding = new RectOffset(0, 0, 15, 15);
				headerStyle = val3;
				GUIStyle val4 = new GUIStyle(GUI.skin.label)
				{
					fontSize = 14
				};
				val4.normal.textColor = new Color(0.9f, 0.9f, 0.9f);
				val4.padding = new RectOffset(10, 10, 5, 5);
				optionStyle = val4;
				GUIStyle val5 = new GUIStyle(GUI.skin.window)
				{
					padding = new RectOffset(15, 15, 15, 15)
				};
				val5.normal.background = CreateRoundedRectTexture(2, 2, new Color(0.1f, 0.1f, 0.1f, 0.97f), 5);
				val5.normal.textColor = Color.white;
				val5.onNormal.background = CreateRoundedRectTexture(2, 2, new Color(0.1f, 0.1f, 0.1f, 0.97f), 5);
				val5.onNormal.textColor = Color.white;
				val5.border = new RectOffset(8, 8, 8, 8);
				val5.fontSize = 16;
				windowStyle = val5;
				GUIStyle val6 = new GUIStyle(GUI.skin.box)
				{
					padding = new RectOffset(8, 8, 8, 8),
					margin = new RectOffset(0, 10, 0, 0)
				};
				val6.normal.background = CreateRoundedRectTexture(2, 2, new Color(0.12f, 0.12f, 0.12f, 0.95f), 3);
				val6.normal.textColor = Color.white;
				modListStyle = val6;
				GUIStyle val7 = new GUIStyle(GUI.skin.button)
				{
					fontSize = 13,
					alignment = (TextAnchor)3,
					padding = new RectOffset(12, 12, 8, 8),
					margin = new RectOffset(0, 0, 2, 2),
					fixedHeight = 35f
				};
				val7.normal.background = CreateRoundedRectTexture(2, 2, new Color(0.18f, 0.18f, 0.18f, 0.4f), 3);
				val7.normal.textColor = new Color(0.8f, 0.8f, 0.8f);
				val7.hover.background = CreateRoundedRectTexture(2, 2, new Color(0.22f, 0.22f, 0.22f, 0.9f), 3);
				val7.hover.textColor = Color.white;
				val7.active.background = CreateRoundedRectTexture(2, 2, new Color(0.25f, 0.25f, 0.25f, 1f), 3);
				val7.active.textColor = Color.white;
				modListButtonStyle = val7;
				GUIStyle val8 = new GUIStyle(modListButtonStyle);
				val8.normal.background = CreateRoundedRectTexture(2, 2, new Color(0.25f, 0.25f, 0.35f, 0.95f), 3);
				val8.normal.textColor = Color.white;
				val8.hover.background = CreateRoundedRectTexture(2, 2, new Color(0.27f, 0.27f, 0.37f, 1f), 3);
				val8.hover.textColor = Color.white;
				selectedModStyle = val8;
				GUIStyle val9 = new GUIStyle(GUI.skin.box)
				{
					padding = new RectOffset(15, 15, 12, 12),
					margin = new RectOffset(0, 0, 0, 10)
				};
				val9.normal.background = CreateRoundedRectTexture(2, 2, new Color(0.15f, 0.15f, 0.15f, 0.95f), 5);
				val9.normal.textColor = Color.white;
				categoryBoxStyle = val9;
				GUISkin skin = GUI.skin;
				GUIStyle val10 = new GUIStyle(GUI.skin.horizontalSlider)
				{
					fixedHeight = 20f
				};
				val10.normal.background = CreateRoundedRectTexture(2, 2, new Color(0.2f, 0.2f, 0.2f, 0.9f), 3);
				skin.horizontalSlider = val10;
				GUISkin skin2 = GUI.skin;
				GUIStyle val11 = new GUIStyle(GUI.skin.horizontalSliderThumb)
				{
					fixedHeight = 20f,
					fixedWidth = 20f
				};
				val11.normal.background = CreateRoundedRectTexture(2, 2, new Color(0.3f, 0.3f, 0.3f, 1f), 3);
				val11.hover.background = CreateRoundedRectTexture(2, 2, new Color(0.35f, 0.35f, 0.35f, 1f), 3);
				val11.active.background = CreateRoundedRectTexture(2, 2, new Color(0.4f, 0.4f, 0.4f, 1f), 3);
				skin2.horizontalSliderThumb = val11;
				stylesInitialized = true;
			}
		}

		private Texture2D CreateRoundedRectTexture(int width, int height, Color color, int radius)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Expected O, but got Unknown
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			width = Mathf.Max(width, radius * 2);
			height = Mathf.Max(height, radius * 2);
			Texture2D val = new Texture2D(width, height, (TextureFormat)4, false);
			Color[] array = (Color[])(object)new Color[width * height];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = color;
			}
			for (int j = 0; j < radius; j++)
			{
				for (int k = 0; k < radius; k++)
				{
					float num = Mathf.Sqrt((float)(j * j + k * k));
					float num2 = ((num <= (float)radius) ? 1f : 0f);
					array[k * width + j] = new Color(color.r, color.g, color.b, color.a * num2);
					array[k * width + (width - 1 - j)] = new Color(color.r, color.g, color.b, color.a * num2);
					array[(height - 1 - k) * width + j] = new Color(color.r, color.g, color.b, color.a * num2);
					array[(height - 1 - k) * width + (width - 1 - j)] = new Color(color.r, color.g, color.b, color.a * num2);
				}
			}
			val.SetPixels(Il2CppStructArray<Color>.op_Implicit(array));
			val.Apply();
			return val;
		}

		private Texture2D MakeTex(int width, int height, Color col)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			return CreateRoundedRectTexture(width, height, col, 3);
		}

		public override void OnGUI()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Invalid comparison between Unknown and I4
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			if (!isGuiVisible)
			{
				return;
			}
			if (isCapturingKey && Event.current.isKey && (int)Event.current.type == 4)
			{
				KeyCode keyCode = Event.current.keyCode;
				if ((int)keyCode != 0 && currentCapturingEntry != null)
				{
					currentCapturingEntry.BoxedValue = keyCode;
					MelonPreferences.Save();
					isCapturingKey = false;
					currentCapturingEntry = null;
					Event.current.Use();
				}
			}
			if ((Object)(object)modSettingsButton == (Object)null)
			{
				InitializeStyles();
				float num = 120f;
				float num2 = 30f;
				float num3 = 16f;
				float num4 = 10f;
				Rect val = default(Rect);
				((Rect)(ref val))..ctor((float)Screen.width - num - num4, (float)Screen.height - num2 - num3, num, num2);
				if (GUI.Button(val, "Mod Settings", buttonStyle))
				{
					isGuiVisible = !isGuiVisible;
				}
			}
			if (isGuiVisible)
			{
				InitializeStyles();
				GUI.color = new Color(0f, 0f, 0f, 0.85f);
				GUI.DrawTexture(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), (Texture)(object)Texture2D.whiteTexture);
				GUI.color = Color.white;
				windowRect = GUI.Window(0, windowRect, WindowFunction.op_Implicit((Action<int>)delegate(int id)
				{
					DrawWindow(id);
				}), "", windowStyle);
			}
		}

		private void DrawWindow(int windowID)
		{
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			GUILayout.Space(10f);
			GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
			if (GUILayout.Toggle(selectedTab == "Mods", "Mods", buttonStyle, (Il2CppReferenceArray<GUILayoutOption>)null))
			{
				selectedTab = "Mods";
			}
			if (GUILayout.Toggle(selectedTab == "Config", "Config", buttonStyle, (Il2CppReferenceArray<GUILayoutOption>)null))
			{
				selectedTab = "Config";
			}
			GUILayout.EndHorizontal();
			GUILayout.Space(20f);
			GUI.color = new Color(0f, 0f, 0f, 0.5f);
			GUILayout.BeginVertical(GUI.skin.box, (Il2CppReferenceArray<GUILayoutOption>)null);
			GUI.color = Color.white;
			scrollPosition = GUILayout.BeginScrollView(scrollPosition, (Il2CppReferenceArray<GUILayoutOption>)null);
			if (selectedTab == "Mods")
			{
				DrawModsSection();
			}
			else
			{
				DrawPrefsSection();
			}
			GUILayout.EndScrollView();
			GUILayout.EndVertical();
			GUILayout.Space(10f);
			if (GUILayout.Button("Close", buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(40f) }))
			{
				isGuiVisible = false;
			}
			if (restartRequired)
			{
				GUILayout.Space(5f);
				if (GUILayout.Button("Restart Game", buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(40f) }))
				{
					Application.Quit();
				}
			}
			GUI.DragWindow(new Rect(0f, 0f, 10000f, 40f));
		}

		private void DrawModsSection()
		{
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			foreach (var modFile in modFiles)
			{
				string? path;
				if (!modFile.path.EndsWith(".disabled"))
				{
					(path, _) = modFile;
				}
				else
				{
					path = Path.GetFileNameWithoutExtension(modFile.path);
				}
				string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(path);
				bool flag = !modFile.path.EndsWith(".disabled");
				GUILayout.BeginHorizontal(GUI.skin.box, (Il2CppReferenceArray<GUILayoutOption>)null);
				GUILayout.Label(fileNameWithoutExtension, optionStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(300f) });
				GUI.color = (flag ? Color.green : Color.red);
				if (GUILayout.Button(flag ? "Enabled" : "Disabled", buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }))
				{
					try
					{
						if (flag)
						{
							File.Move(modFile.path, modFile.path + ".disabled");
						}
						else
						{
							File.Move(modFile.path, modFile.path.Replace(".disabled", ""));
						}
						restartRequired = true;
						RefreshModList();
						((MelonBase)this).LoggerInstance.Msg($"Mod {fileNameWithoutExtension} {(flag ? "disabled" : "enabled")}. Restart required.");
					}
					catch (Exception ex)
					{
						((MelonBase)this).LoggerInstance.Error($"Failed to {(flag ? "disable" : "enable")} {fileNameWithoutExtension}: {ex.Message}");
					}
				}
				GUI.color = Color.white;
				GUILayout.EndHorizontal();
				GUILayout.Space(5f);
			}
			if (restartRequired)
			{
				GUILayout.Space(20f);
				GUI.color = Color.yellow;
				GUILayout.Label("Game restart required for changes to take effect!", headerStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
				GUI.color = Color.white;
			}
		}

		private void DrawPrefsSection()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
				GUILayout.BeginVertical(modListStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) });
				modListScrollPosition = GUILayout.BeginScrollView(modListScrollPosition, (Il2CppReferenceArray<GUILayoutOption>)null);
				List<string> list = (from name in MelonPreferences.Categories.Select((MelonPreferences_Category c) => c.Identifier.Split('.')[0]).Distinct()
					orderby name
					select name).ToList();
				foreach (string item in list)
				{
					GUIStyle val = ((selectedMod == item) ? selectedModStyle : modListButtonStyle);
					if (GUILayout.Button(item, val, Array.Empty<GUILayoutOption>()))
					{
						selectedMod = item;
					}
				}
				GUILayout.EndScrollView();
				GUILayout.EndVertical();
				GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) });
				prefsScrollPosition = GUILayout.BeginScrollView(prefsScrollPosition, (Il2CppReferenceArray<GUILayoutOption>)null);
				if (!string.IsNullOrEmpty(selectedMod))
				{
					List<MelonPreferences_Category> list2 = (from c in MelonPreferences.Categories
						where c.Identifier.StartsWith(selectedMod)
						orderby c.Identifier
						select c).ToList();
					foreach (MelonPreferences_Category item2 in list2)
					{
						GUILayout.BeginVertical(categoryBoxStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
						GUILayout.Label(item2.DisplayName, categoryStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
						GUILayout.Space(5f);
						foreach (MelonPreferences_Entry entry in item2.Entries)
						{
							DrawPreferenceEntry(entry);
							GUILayout.Space(5f);
						}
						GUILayout.EndVertical();
						GUILayout.Space(10f);
					}
				}
				else
				{
					GUILayout.Label("Select a mod from the list to view its settings", optionStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
				}
				GUILayout.EndScrollView();
				GUILayout.EndVertical();
				GUILayout.EndHorizontal();
			}
			catch (Exception value)
			{
				((MelonBase)this).LoggerInstance.Error($"Error in DrawPrefsSection: {value}");
			}
		}

		private void DrawPreferenceEntry(MelonPreferences_Entry entry)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				GUILayout.BeginVertical(GUI.skin.box, (Il2CppReferenceArray<GUILayoutOption>)null);
				GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
				GUILayout.Label(new GUIContent(entry.DisplayName, (Texture)null, entry.Description), optionStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
				GUILayout.FlexibleSpace();
				GUILayout.EndHorizontal();
				GUILayout.Space(5f);
				GUILayout.BeginHorizontal((Il2CppReferenceArray<GUILayoutOption>)null);
				GUILayout.Space(20f);
				if (entry.BoxedValue is bool flag)
				{
					bool flag2 = GUILayout.Toggle(flag, flag ? "Enabled" : "Disabled", buttonStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
					if (flag2 != flag)
					{
						entry.BoxedValue = flag2;
						MelonPreferences.Save();
					}
				}
				else if (entry.BoxedValue is KeyCode val)
				{
					if (isCapturingKey && currentCapturingEntry == entry)
					{
						GUI.color = Color.yellow;
						GUILayout.Label("Press any key...", buttonStyle, (Il2CppReferenceArray<GUILayoutOption>)null);
						GUI.color = Color.white;
					}
					else if (GUILayout.Button(((object)(KeyCode)(ref val)).ToString(), buttonStyle, Array.Empty<GUILayoutOption>()))
					{
						isCapturingKey = true;
						currentCapturingEntry = entry;
					}
				}
				else if (entry.BoxedValue is float || entry.BoxedValue is int || entry.BoxedValue is double)
				{
					float num = float.MinValue;
					float num2 = float.MaxValue;
					bool flag3 = false;
					bool flag4 = entry.BoxedValue is float;
					bool flag5 = entry.BoxedValue is int;
					float num3 = (flag5 ? 1f : 0.1f);
					if (entry.Validator != null && ((object)entry.Validator).GetType().IsGenericType && ((object)entry.Validator).GetType().GetGenericTypeDefinition() == typeof(ValueRange<>))
					{
						Type type = ((object)entry.Validator).GetType();
						PropertyInfo property = type.GetProperty("Min");
						PropertyInfo property2 = type.GetProperty("Max");
						if (property != null && property2 != null)
						{
							num = Convert.ToSingle(property.GetValue(entry.Validator));
							num2 = Convert.ToSingle(property2.GetValue(entry.Validator));
							flag3 = true;
							float num4 = num2 - num;
							num3 = ((num4 <= 1f) ? (flag4 ? 0.1f : (flag5 ? 1f : 0.1f)) : ((num4 <= 10f) ? (flag4 ? 0.5f : (flag5 ? 1f : 0.5f)) : ((num4 <= 100f) ? (flag4 ? 1f : (flag5 ? 1f : 1f)) : ((num4 <= 1000f) ? (flag4 ? 5f : (flag5 ? 10f : 5f)) : ((!(num4 <= 10000f)) ? (flag5 ? 100f : (num4 / 100f)) : (flag4 ? 50f : (flag5 ? 50f : 50f)))))));
							if (flag5)
							{
								num3 = Mathf.Max(1f, Mathf.Floor(num3));
							}
						}
					}
					float num5 = Convert.ToSingle(entry.BoxedValue);
					string text = ((!flag5 && num3 < 1f) ? "F2" : "F0");
					GUILayout.Label(num5.ToString(text), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) });
					if (GUILayout.Button("-", buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(30f) }))
					{
						if (entry.BoxedValue is double)
						{
							double num6 = Math.Max(Convert.ToDouble(num), Convert.ToDouble(num5) - Convert.ToDouble(num3));
							if (flag5)
							{
								num6 = Math.Floor(num6);
							}
							SetEntryValue(entry, num6);
						}
						else
						{
							float num7 = Mathf.Max(num, num5 - num3);
							if (flag5)
							{
								num7 = Mathf.Floor(num7);
							}
							SetEntryValue(entry, flag5 ? ((float)(int)num7) : num7);
						}
					}
					if (GUILayout.Button("+", buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(30f) }))
					{
						if (entry.BoxedValue is double)
						{
							double num8 = Math.Min(Convert.ToDouble(num2), Convert.ToDouble(num5) + Convert.ToDouble(num3));
							if (flag5)
							{
								num8 = Math.Floor(num8);
							}
							SetEntryValue(entry, num8);
						}
						else
						{
							float num9 = Mathf.Min(num2, num5 + num3);
							if (flag5)
							{
								num9 = Mathf.Floor(num9);
							}
							SetEntryValue(entry, flag5 ? ((float)(int)num9) : num9);
						}
					}
					if (flag3)
					{
						string text2 = ((!flag5 && num3 < 1f) ? "F2" : "F0");
						GUILayout.Label($"[{num.ToString(text2)} - {num2.ToString(text2)}]", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) });
					}
					GUILayout.Label("Step: " + num3.ToString(text), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) });
				}
				GUILayout.EndHorizontal();
				GUILayout.EndVertical();
			}
			catch (Exception value)
			{
				((MelonBase)this).LoggerInstance.Error($"Error in DrawPreferenceEntry: {value}");
			}
		}

		private void SetEntryValue(MelonPreferences_Entry entry, dynamic newValue)
		{
			try
			{
				if (entry.BoxedValue is double)
				{
					entry.BoxedValue = (object)Convert.ToDouble(newValue);
				}
				else if (entry.BoxedValue is float)
				{
					entry.BoxedValue = (object)Convert.ToSingle(newValue);
				}
				else if (entry.BoxedValue is int)
				{
					entry.BoxedValue = (object)Convert.ToInt32(newValue);
				}
				else
				{
					entry.BoxedValue = (object)newValue;
				}
				MelonPreferences.Save();
			}
			catch (Exception value)
			{
				((MelonBase)this).LoggerInstance.Error($"Error setting value: {value}");
			}
		}

		public override void OnInitializeMelon()
		{
			if (Directory.Exists(modsPath))
			{
				IEnumerable<(string, bool)> first = from path in Directory.GetFiles(modsPath, "*.dll")
					where !path.EndsWith(".disabled")
					select (path, true);
				IEnumerable<(string, bool)> second = from path in Directory.GetFiles(modsPath, "*.dll.disabled")
					select (path, false);
				modFiles = (from x in first.Concat(second)
					orderby Path.GetFileName(x.path)
					select x).ToList();
			}
		}

		private void RefreshModList()
		{
			if (Directory.Exists(modsPath))
			{
				IEnumerable<(string, bool)> first = from path in Directory.GetFiles(modsPath, "*.dll")
					where !path.EndsWith(".disabled")
					select (path, true);
				IEnumerable<(string, bool)> second = from path in Directory.GetFiles(modsPath, "*.dll.disabled")
					select (path, false);
				modFiles = (from x in first.Concat(second)
					orderby Path.GetFileName(x.path)
					select x).ToList();
			}
		}

		public override void OnApplicationQuit()
		{
			if ((Object)(object)modSettingsButton != (Object)null)
			{
				Object.Destroy((Object)(object)modSettingsButton);
				modSettingsButton = null;
			}
			buttonInitialized = false;
		}
	}
}

MoreMix.dll

Decompiled 5 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppScheduleOne.ObjectScripts;
using Il2CppSteamworks;
using MelonLoader;
using MelonLoader.Preferences;
using Microsoft.CodeAnalysis;
using MoreMix;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(Core), "MoreMix", "1.0.0", "rbawe", null)]
[assembly: MelonGame("TVGS", "Schedule I")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("MoreMix")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MoreMix")]
[assembly: AssemblyTitle("MoreMix")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace MoreMix
{
	public class Core : MelonMod
	{
		private const string CATEGORY_GENERAL = "MoreMix";

		private const string SETTING_MAX_QUANTITY = "MaxMixQuantity";

		private const string SETTING_SYNC_CONFIG = "SyncConfig";

		private static bool isHost;

		private static bool configSynced;

		private static bool isInitialized;

		private static CSteamID localSteamID;

		private const string CONFIG_MESSAGE_PREFIX = "MOREMIX_CONFIG:";

		private const int CONFIG_SYNC_INTERVAL = 10;

		private static float lastConfigSyncTime;

		private static int localMaxQuantity = 60;

		private static int activeMaxQuantity = 60;

		private static readonly HashSet<int> processedInstances = new HashSet<int>();

		public override void OnInitializeMelon()
		{
			((MelonBase)this).LoggerInstance.Msg("MoreMix Starting...");
			MelonPreferences_Category val = MelonPreferences.CreateCategory("MoreMix", "More Mix Settings");
			val.CreateEntry<int>("MaxMixQuantity", 60, "Max Mix Quantity", "Maximum quantity that can be mixed in mixing stations", false, false, (ValueValidator)null, (string)null);
			val.CreateEntry<bool>("SyncConfig", true, "Sync Config (Host Only)", "When enabled, host's settings will be synced to all clients", false, false, (ValueValidator)null, (string)null);
			localMaxQuantity = MelonPreferences.GetEntryValue<int>("MoreMix", "MaxMixQuantity");
			activeMaxQuantity = localMaxQuantity;
			((MelonBase)this).LoggerInstance.Msg($"Initialized with Max Mix Quantity: {localMaxQuantity}");
		}

		public override void OnSceneWasInitialized(int buildIndex, string sceneName)
		{
			if (!(sceneName != "Main"))
			{
				isInitialized = false;
				configSynced = false;
				MelonCoroutines.Start(DelayedInit());
			}
		}

		private static IEnumerator DelayedInit()
		{
			yield return (object)new WaitForSeconds(1f);
			try
			{
				localSteamID = SteamUser.GetSteamID();
				DetermineIfHost();
				ApplyPatches();
				isInitialized = true;
				MelonLogger.Msg($"MoreMix initialized with max quantity: {(isHost ? localMaxQuantity : activeMaxQuantity)}");
				bool syncEnabled = MelonPreferences.GetEntryValue<bool>("MoreMix", "SyncConfig");
				if (isHost && syncEnabled)
				{
					MelonLogger.Msg("Config will be automatically synced to clients");
				}
			}
			catch (Exception ex)
			{
				MelonLogger.Error("Error in DelayedInit: " + ex.Message);
			}
		}

		private static void ApplyPatches()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			Harmony val = new Harmony("com.rbawe.moremix");
			val.Patch((MethodBase)typeof(MixingStation).GetMethod("Awake", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic), (HarmonyMethod)null, new HarmonyMethod(typeof(Core).GetMethod("MixingStation_Awake_Postfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			val.Patch((MethodBase)typeof(MixingStationMk2).GetMethod("Awake", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic), (HarmonyMethod)null, new HarmonyMethod(typeof(Core).GetMethod("MixingStationMk2_Awake_Postfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			MelonLogger.Msg("Patches applied successfully");
		}

		private static void MixingStation_Awake_Postfix(MixingStation __instance)
		{
			if (!isInitialized || (Object)(object)__instance == (Object)null)
			{
				return;
			}
			int instanceID = ((Object)__instance).GetInstanceID();
			if (!processedInstances.Add(instanceID))
			{
				return;
			}
			try
			{
				__instance.MaxMixQuantity = activeMaxQuantity;
				MelonLogger.Msg($"Set MixingStation MaxMixQuantity to {activeMaxQuantity} on awake");
			}
			catch (Exception ex)
			{
				MelonLogger.Error("Error updating MixingStation on awake: " + ex.Message);
			}
		}

		private static void MixingStationMk2_Awake_Postfix(MixingStationMk2 __instance)
		{
			if (!isInitialized || (Object)(object)__instance == (Object)null)
			{
				return;
			}
			int instanceID = ((Object)__instance).GetInstanceID();
			if (!processedInstances.Add(instanceID))
			{
				return;
			}
			try
			{
				((MixingStation)__instance).MaxMixQuantity = activeMaxQuantity;
				MelonLogger.Msg($"Set MixingStationMk2 MaxMixQuantity to {activeMaxQuantity} on awake");
			}
			catch (Exception ex)
			{
				MelonLogger.Error("Error updating MixingStationMk2 on awake: " + ex.Message);
			}
		}

		private static void DetermineIfHost()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				bool flag = false;
				try
				{
					CSteamID lobbyByIndex = SteamMatchmaking.GetLobbyByIndex(0);
					int numLobbyMembers = SteamMatchmaking.GetNumLobbyMembers(lobbyByIndex);
					flag = numLobbyMembers > 0;
				}
				catch
				{
					flag = false;
				}
				if (!flag)
				{
					isHost = true;
					configSynced = true;
					MelonLogger.Msg("Singleplayer mode detected");
				}
				else
				{
					localSteamID = SteamUser.GetSteamID();
					CSteamID lobbyOwner = SteamMatchmaking.GetLobbyOwner(SteamMatchmaking.GetLobbyByIndex(0));
					isHost = lobbyOwner.m_SteamID == localSteamID.m_SteamID;
					MelonLogger.Msg("Multiplayer mode - You are " + (isHost ? "host" : "client"));
				}
			}
			catch (Exception ex)
			{
				MelonLogger.Error("Failed to determine host status: " + ex.Message);
				isHost = true;
				configSynced = true;
			}
		}

		public override void OnUpdate()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (!isInitialized)
			{
				return;
			}
			Scene activeScene = SceneManager.GetActiveScene();
			if (!(((Scene)(ref activeScene)).name != "Main"))
			{
				bool entryValue = MelonPreferences.GetEntryValue<bool>("MoreMix", "SyncConfig");
				if (isHost && entryValue && !configSynced && Time.time - lastConfigSyncTime > 10f)
				{
					SyncConfigToClients();
					lastConfigSyncTime = Time.time;
				}
				HandleNetworking();
			}
		}

		private void SyncConfigToClients()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				string text = $"{"MOREMIX_CONFIG:"}{localMaxQuantity}";
				CSteamID lobbyByIndex = SteamMatchmaking.GetLobbyByIndex(0);
				int numLobbyMembers = SteamMatchmaking.GetNumLobbyMembers(lobbyByIndex);
				for (int i = 0; i < numLobbyMembers; i++)
				{
					CSteamID lobbyMemberByIndex = SteamMatchmaking.GetLobbyMemberByIndex(lobbyByIndex, i);
					if (lobbyMemberByIndex.m_SteamID != localSteamID.m_SteamID)
					{
						SteamNetworking.SendP2PPacket(lobbyMemberByIndex, Il2CppStructArray<byte>.op_Implicit(Encoding.UTF8.GetBytes(text)), (uint)text.Length, (EP2PSend)2, 0);
					}
				}
				configSynced = true;
				((MelonBase)this).LoggerInstance.Msg("Mix quantity synced to all clients");
			}
			catch (Exception ex)
			{
				((MelonBase)this).LoggerInstance.Error("Error syncing config: " + ex.Message);
			}
		}

		private void HandleNetworking()
		{
			uint num = default(uint);
			uint num2 = default(uint);
			CSteamID val = default(CSteamID);
			while (SteamNetworking.IsP2PPacketAvailable(ref num, 0))
			{
				byte[] array = new byte[num];
				if (SteamNetworking.ReadP2PPacket(Il2CppStructArray<byte>.op_Implicit(array), num, ref num2, ref val, 0))
				{
					string @string = Encoding.UTF8.GetString(array);
					ProcessReceivedConfigMessage(@string);
				}
			}
		}

		private void ProcessReceivedConfigMessage(string message)
		{
			if (!message.StartsWith("MOREMIX_CONFIG:"))
			{
				return;
			}
			try
			{
				string s = message.Substring("MOREMIX_CONFIG:".Length);
				if (int.TryParse(s, out var result))
				{
					if (result <= 0)
					{
						((MelonBase)this).LoggerInstance.Error("Invalid quantity value received - keeping current value");
						return;
					}
					activeMaxQuantity = result;
					((MelonBase)this).LoggerInstance.Msg($"Received host gameplay value: maxQuantity={activeMaxQuantity}");
					configSynced = true;
				}
				else
				{
					((MelonBase)this).LoggerInstance.Error("Invalid quantity value format received - keeping current value");
				}
			}
			catch (Exception ex)
			{
				((MelonBase)this).LoggerInstance.Error("Failed to process quantity value: " + ex.Message);
				activeMaxQuantity = MelonPreferences.GetEntryValue<int>("MoreMix", "MaxMixQuantity");
			}
		}

		public override void OnPreferencesSaved()
		{
			int entryValue = MelonPreferences.GetEntryValue<int>("MoreMix", "MaxMixQuantity");
			if (entryValue != localMaxQuantity)
			{
				localMaxQuantity = entryValue;
				if (isHost)
				{
					activeMaxQuantity = localMaxQuantity;
					configSynced = false;
				}
				((MelonBase)this).LoggerInstance.Msg($"Settings updated - Max Mix Quantity: {localMaxQuantity}");
			}
		}

		public override void OnApplicationQuit()
		{
		}
	}
}

Schedule1_ShowXP.dll

Decompiled 5 days ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppScheduleOne.Levelling;
using MelonLoader;
using Schedule1_ShowXP;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(MainClass), "valgar1_ShowXP", "1.0.0", "valgar1", null)]
[assembly: MelonGame("", "")]
[assembly: AssemblyTitle("Schedule1_ShowXP")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Schedule1_ShowXP")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e302773a-3fd4-4045-abaa-ac3dfbb9d771")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Schedule1_ShowXP;

public static class Globals
{
	public static LevelManager levelManager = null;

	public static float timeSinceLastSearch = 0f;

	public static float searchInterval = 1f;

	public static bool FirstLoad = true;

	public static GUIStyle LabelStyleYellow;

	public static GUIStyle LabelStylePurple;

	public static string[] Ranks = new string[11]
	{
		"Street Rat", "Hoodlum", "Peddler", "Hustler", "Bagman", "Enforcer", "Shot Caller", "Block Boss", "Underlord", "Baron",
		"Kingpin"
	};

	public static int MenuPosition = 1;

	public static Rect Menu0 = new Rect(0f, 0f, 200f, 300f);

	public static Rect Menu1 = new Rect((float)Screen.width - 200f, 0f, 200f, 300f);

	public static Rect Menu2 = new Rect((float)Screen.width - 200f, (float)Screen.height - 300f, 200f, 300f);

	public static Rect Menu3 = new Rect(0f, (float)Screen.height - 300f, 200f, 300f);

	public static Rect CurrentMenu = Menu2;

	public static string[] options = new string[4] { "Top left", "Top right", "Bottom right", "Bottom left" };
}
public class MainClass : MelonMod
{
	public override void OnUpdate()
	{
		float deltaTime = Time.deltaTime;
		Globals.timeSinceLastSearch += deltaTime;
		if (Globals.timeSinceLastSearch >= Globals.searchInterval)
		{
			Globals.levelManager = Object.FindObjectOfType<LevelManager>();
			Globals.timeSinceLastSearch = 0f;
		}
	}

	public override void OnGUI()
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Expected O, but got Unknown
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Expected O, but got Unknown
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_012f: Unknown result type (might be due to invalid IL or missing references)
		//IL_018a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0173: Unknown result type (might be due to invalid IL or missing references)
		//IL_0179: Unknown result type (might be due to invalid IL or missing references)
		if (Globals.FirstLoad)
		{
			Globals.FirstLoad = false;
			GUIStyle val = new GUIStyle(GUI.skin.label)
			{
				fontSize = 15
			};
			val.normal.textColor = Color.yellow;
			Globals.LabelStyleYellow = val;
			GUIStyle val2 = new GUIStyle(GUI.skin.label)
			{
				fontSize = 15
			};
			val2.normal.textColor = Color.magenta;
			Globals.LabelStylePurple = val2;
		}
		if (!((Object)(object)Globals.levelManager == (Object)null))
		{
			switch (Globals.MenuPosition)
			{
			case 0:
				Globals.CurrentMenu = Globals.Menu0;
				break;
			case 1:
				Globals.CurrentMenu = Globals.Menu1;
				break;
			case 2:
				Globals.CurrentMenu = Globals.Menu2;
				break;
			case 3:
				Globals.CurrentMenu = Globals.Menu3;
				break;
			}
			GUI.Box(Globals.CurrentMenu, "");
			GUILayout.BeginArea(Globals.CurrentMenu);
			GUILayout.Label($"Total XP: {Globals.levelManager.TotalXP}", Globals.LabelStyleYellow, (Il2CppReferenceArray<GUILayoutOption>)null);
			GUILayout.Label($"Current Level XP: {Globals.levelManager.XP}", Globals.LabelStyleYellow, (Il2CppReferenceArray<GUILayoutOption>)null);
			GUILayout.Label($"Current Level: {Globals.Ranks[Globals.levelManager.Rank]} {Globals.levelManager.Tier}", Globals.LabelStyleYellow, (Il2CppReferenceArray<GUILayoutOption>)null);
			string text = "";
			int num = 0;
			if (Globals.levelManager.Tier == 5)
			{
				text = Globals.Ranks[Globals.levelManager.Rank + 1];
				num = 1;
			}
			else
			{
				text = Globals.Ranks[Globals.levelManager.Rank];
				num = Globals.levelManager.Tier + 1;
			}
			GUILayout.Label($"Next Level: {text} {num}", Globals.LabelStylePurple, (Il2CppReferenceArray<GUILayoutOption>)null);
			GUILayout.Label($"XP Next Level: {Globals.levelManager.XPToNextTier}", Globals.LabelStylePurple, (Il2CppReferenceArray<GUILayoutOption>)null);
			GUILayout.Label($"XP To Next Level: {Globals.levelManager.XPToNextTier - (float)Globals.levelManager.XP}", Globals.LabelStylePurple, (Il2CppReferenceArray<GUILayoutOption>)null);
			GUILayout.BeginVertical(GUIStyle.op_Implicit("Menu Position"), (Il2CppReferenceArray<GUILayoutOption>)null);
			GUILayout.Label("Menu Position", (Il2CppReferenceArray<GUILayoutOption>)null);
			Globals.MenuPosition = GUILayout.SelectionGrid(Globals.MenuPosition, Il2CppStringArray.op_Implicit(Globals.options), 1, (Il2CppReferenceArray<GUILayoutOption>)null);
			GUILayout.EndVertical();
			GUILayout.EndArea();
		}
	}
}

TrashGrabberPLUS.dll

Decompiled 5 days ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using HarmonyLib;
using Il2CppScheduleOne.Equipping;
using MelonLoader;
using TrashGrabberPLUSModNamespace;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(TrashGrabberPLUSMod), "TrashGrabber PLUS", "1.0.0", "Elio", null)]
[assembly: MelonGame("TVGS", "Schedule I")]
[assembly: AssemblyTitle("TrashGrabberPLUS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TrashGrabberPLUS")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3157aede-a870-47dd-8979-9a0bcf342d3d")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace TrashGrabberPLUSModNamespace;

public class TrashGrabberPLUSMod : MelonMod
{
	[HarmonyPatch(typeof(Equippable_TrashGrabber), "GetCapacity")]
	public class Patch_GetCapacity
	{
		private static bool Prefix(ref int __result)
		{
			__result = int.MaxValue;
			return false;
		}
	}

	[HarmonyPatch(typeof(Equippable_TrashGrabber), "RefreshVisuals")]
	public class Patch_RefreshVisuals
	{
		private static void Postfix(Equippable_TrashGrabber __instance)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)__instance.TrashContent != (Object)null && (Object)(object)__instance.TrashContent_Min != (Object)null)
			{
				__instance.TrashContent.localScale = __instance.TrashContent_Min.localScale;
			}
		}
	}

	public override void OnInitializeMelon()
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		MelonLogger.Msg("TrashGrabber PLUS mod loaded!");
		new Harmony("com.Elio.trashgrabberplus").PatchAll();
	}
}