Decompiled source of DevTools v1.0.0

DevTools.dll

Decompiled a day ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using BepInEx.Unity.IL2CPP.UnityEngine;
using HarmonyLib;
using Il2CppSystem.Collections.Generic;
using SOD.Common;
using SOD.Common.Extensions;
using UnityEngine;
using UnityEngine.UI;
using UnityStandardAssets.Characters.FirstPerson;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("DevTools")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+fd18034234b1bc5b3744e48ee190066c38503ea8")]
[assembly: AssemblyProduct("DevTools")]
[assembly: AssemblyTitle("DevTools")]
[assembly: AssemblyVersion("1.0.0.0")]
[HarmonyPatch(typeof(SessionData))]
[HarmonyPatch("PauseGame")]
public class PauseGameManager
{
	public static void Prefix(ref bool showPauseText, ref bool delayOverride, ref bool openDesktopMode)
	{
		GameStateVars.isPaused = true;
	}
}
[HarmonyPatch(typeof(SessionData))]
[HarmonyPatch("ResumeGame")]
public class ResumeGameManager
{
	public static void Prefix()
	{
		GameStateVars.isPaused = false;
	}
}
public class GameStateVars
{
	public static bool isPaused;
}
[HarmonyPatch(typeof(MurderController))]
[HarmonyPatch("SpawnItem")]
public class SpawnItemManager
{
	public static void Prefix(ref Murder murder, ref InteractablePreset spawnItem, ref LeadSpawnWhere spawnWhere, ref LeadCitizen spawnBelongsTo, ref LeadCitizen spawnWriter, ref LeadCitizen spawnReceiver, ref int security, ref OwnedPlacementRule ownedRule, ref int priority, ref JobTag itemTag)
	{
	}
}
public class PlayerInfoProvider
{
	private FirstPersonController playerObject = Object.FindObjectOfType<FirstPersonController>();

	public Vector3Int GetPlayerLocation()
	{
		//IL_004f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: 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_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)playerObject != (Object)null)
		{
			Vector3 position = ((Component)playerObject).transform.position;
			return new Vector3Int(Mathf.RoundToInt(position.x), Mathf.RoundToInt(position.y), Mathf.RoundToInt(position.z));
		}
		return new Vector3Int(0, 0, 0);
	}

	public void SetPlayerLocation(Vector3 loc)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		((Component)playerObject).transform.position = loc;
	}

	public void SetPlayerNode(Vector3Int loc)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		Player instance = Player.Instance;
		((Actor)instance).currentNodeCoord = loc;
	}

	public NewNode GetPlayerNode()
	{
		Player instance = Player.Instance;
		return ((Actor)instance).currentNode;
	}

	public Vector3 GetPlayerNodeCoord()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		Player instance = Player.Instance;
		return Vector3Int.op_Implicit(((Actor)instance).currentNodeCoord);
	}

	public bool GetIsRunning()
	{
		Player instance = Player.Instance;
		return ((Actor)instance).isRunning;
	}

	public void SetIsRunning(bool isRunning)
	{
		Player instance = Player.Instance;
		((Actor)instance).isRunning = isRunning;
	}

	public bool GetHasJumped()
	{
		FirstPersonController val = Object.FindObjectOfType<FirstPersonController>();
		return val.m_Jump;
	}

	public bool GetIsJumping()
	{
		FirstPersonController val = Object.FindObjectOfType<FirstPersonController>();
		return val.m_Jumping;
	}

	public void SetIsJumping(bool jump)
	{
		FirstPersonController val = Object.FindObjectOfType<FirstPersonController>();
		val.m_Jumping = jump;
	}

	public bool GetIsGrounded()
	{
		Player instance = Player.Instance;
		return instance.isGrounded;
	}

	public void SetIsGrounded(bool grounded)
	{
		Player instance = Player.Instance;
		instance.isGrounded = grounded;
	}

	public void AddPoisoned(float amount, Human who)
	{
		Player instance = Player.Instance;
		((Human)instance).AddPoisoned(amount, (Human)(object)instance);
	}

	public float GetMovementRunSpeed()
	{
		GameplayControls instance = GameplayControls.Instance;
		return instance.playerRunSpeed;
	}

	public void SetMovementRunSpeed(float setMovementRunSpeed)
	{
		GameplayControls instance = GameplayControls.Instance;
		instance.playerRunSpeed = setMovementRunSpeed;
	}

	public float GetMovementWalkSpeed()
	{
		GameplayControls instance = GameplayControls.Instance;
		return instance.playerWalkSpeed;
	}

	public void SetMovementWalkSpeed(float setMovementWalkSpeed)
	{
		GameplayControls instance = GameplayControls.Instance;
		instance.playerWalkSpeed = setMovementWalkSpeed;
	}

	public float GetCurrentHealth()
	{
		Player instance = Player.Instance;
		return ((Actor)instance).currentHealth;
	}

	public void SetCurrentHealth(float health)
	{
		Player instance = Player.Instance;
		((Actor)instance).currentHealth = health;
	}

	public string GetPassword()
	{
		Player instance = Player.Instance;
		List<int> digits = ((Human)instance).passcode.digits;
		StringBuilder stringBuilder = new StringBuilder();
		for (int i = 0; i < digits.Count; i++)
		{
			stringBuilder.Append(digits[i].ToString());
		}
		return stringBuilder.ToString();
	}

	public void SetPassword(string passcode)
	{
		Player instance = Player.Instance;
		((Human)instance).passcode.digits.Clear();
		for (int i = 0; i < passcode.Length; i++)
		{
			char c = passcode[i];
			if (char.IsDigit(c))
			{
				((Human)instance).passcode.digits.Add(int.Parse(c.ToString()));
				continue;
			}
			break;
		}
	}

	public bool IsOnDuty()
	{
		Player instance = Player.Instance;
		return ((Actor)instance).isOnDuty;
	}

	public bool IsCurrentlyInAutoTravel()
	{
		Player instance = Player.Instance;
		return instance.autoTravelActive;
	}

	public float GetBlackEye()
	{
		Player instance = Player.Instance;
		return ((Human)instance).blackEye;
	}

	public void SetBlackEye(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).blackEye = amount;
	}

	public float GetBlackedOut()
	{
		Player instance = Player.Instance;
		return ((Human)instance).blackedOut;
	}

	public void SetBlackedOut(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).blackedOut = amount;
	}

	public float GetBleeding()
	{
		Player instance = Player.Instance;
		return ((Human)instance).bleeding;
	}

	public void SetBleeding(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).bleeding = amount;
	}

	public void AddBleeding(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddBleeding(amount);
	}

	public void AddDrunk(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddDrunk(amount);
	}

	public void AddBruised(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddBruised(amount);
	}

	public Telephone GetAnsweringPhone()
	{
		Player instance = Player.Instance;
		return instance.answeringPhone;
	}

	public List<NewAddress> ApartmentsOwned()
	{
		Player instance = Player.Instance;
		return instance.apartmentsOwned;
	}

	public float GetDrunk()
	{
		Player instance = Player.Instance;
		return ((Human)instance).drunk;
	}

	public void SetDrunk(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).drunk = amount;
	}

	public float GetBruised()
	{
		Player instance = Player.Instance;
		return ((Human)instance).bruised;
	}

	public void SetBruised(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).bruised = amount;
	}

	public float GetPoisoned()
	{
		Player instance = Player.Instance;
		return ((Human)instance).poisoned;
	}

	public void SetPoisoned(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).poisoned = amount;
	}

	public bool GetIsDead()
	{
		Player instance = Player.Instance;
		return ((Actor)instance).isDead;
	}

	public void AddHealth(float amount)
	{
		Player instance = Player.Instance;
		((Actor)instance).AddHealth(amount, true, false);
	}

	public void EndAutoTravel()
	{
		Player instance = Player.Instance;
		instance.EndAutoTravel();
	}

	public void AddSick(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddSick(amount);
	}

	public void AddHeadache(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddHeadache(amount);
	}

	public void AddWet(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddWet(amount);
	}

	public void AddBrokenLeg(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddBrokenLeg(amount);
	}

	public void AddNumb(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddNumb(amount);
	}

	public void KillPlayer()
	{
		Player instance = Player.Instance;
		instance.KillPlayer();
	}

	public void Trip(float damage, bool forwards = false, bool playSound = true)
	{
		Player instance = Player.Instance;
		instance.Trip(damage, forwards, playSound);
	}

	public void SetMaxSpeed(float walkSpeed, float runSpeed)
	{
		Player instance = Player.Instance;
		instance.SetMaxSpeed(walkSpeed, runSpeed);
	}

	public void EnablePlayerMovement(bool val, bool updateCulling = true)
	{
		Player instance = Player.Instance;
		instance.EnablePlayerMovement(val, updateCulling);
	}

	public void EnablePlayerMouseLook(bool val, bool forceHideMouseOnDisable = false)
	{
		Player instance = Player.Instance;
		instance.EnablePlayerMouseLook(val, forceHideMouseOnDisable);
	}

	public void EnableCharacterController(bool val)
	{
		Player instance = Player.Instance;
		instance.EnableCharacterController(val);
	}

	public void SetLockpickingState(bool val)
	{
		Player instance = Player.Instance;
		instance.SetLockpickingState(val);
	}

	public void AddNourishment(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddNourishment(amount);
	}

	public void AddHydration(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddHydration(amount);
	}

	public void AddEnergy(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddEnergy(amount);
	}

	public void AddHygiene(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddHygiene(amount);
	}

	public void AddHeat(float amount)
	{
		Player instance = Player.Instance;
		((Human)instance).AddHeat(amount);
	}

	public float GetPlayerHeightNormal()
	{
		Player instance = Player.Instance;
		return instance.GetPlayerHeightNormal();
	}

	public float GetPlayerHeightCrouched()
	{
		Player instance = Player.Instance;
		return instance.GetPlayerHeightCrouched();
	}

	public void SetPlayerHeight(float height, bool stayOnFloorPlane = true)
	{
		Player instance = Player.Instance;
		instance.SetPlayerHeight(height, stayOnFloorPlane);
	}

	public void SetCameraHeight(float height)
	{
		Player instance = Player.Instance;
		instance.SetCameraHeight(height);
	}

	public float GetNourishment()
	{
		Player instance = Player.Instance;
		return ((Human)instance).nourishment;
	}

	public float GetHydration()
	{
		Player instance = Player.Instance;
		return ((Human)instance).hydration;
	}

	public float GetEnergy()
	{
		Player instance = Player.Instance;
		return ((Human)instance).energy;
	}

	public float GetAlertness()
	{
		Player instance = Player.Instance;
		return ((Human)instance).alertness;
	}

	public float GetHygiene()
	{
		Player instance = Player.Instance;
		return ((Human)instance).hygiene;
	}

	public float GetHeat()
	{
		Player instance = Player.Instance;
		return ((Human)instance).heat;
	}

	public float GetHeadache()
	{
		Player instance = Player.Instance;
		return ((Human)instance).headache;
	}

	public float GetWet()
	{
		Player instance = Player.Instance;
		return ((Human)instance).wet;
	}

	public float GetBrokenLeg()
	{
		Player instance = Player.Instance;
		return ((Human)instance).brokenLeg;
	}

	public float GetNumb()
	{
		Player instance = Player.Instance;
		return ((Human)instance).numb;
	}

	public float GetSick()
	{
		Player instance = Player.Instance;
		return ((Human)instance).sick;
	}

	public bool GetIsLockpicking()
	{
		Player instance = Player.Instance;
		return instance.isLockpicking;
	}

	public bool GetIsHiding()
	{
		Player instance = Player.Instance;
		return ((Actor)instance).isHiding;
	}

	public bool GetIsCrouched()
	{
		Player instance = Player.Instance;
		return ((Actor)instance).isCrouched;
	}
}
namespace DevTools;

[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public class CommandAttribute : Attribute
{
	public string CommandName { get; }

	public CommandAttribute(string commandName)
	{
		CommandName = commandName;
	}
}
public static class CommandManager
{
	private static Dictionary<string, Action<string[]>> commands;

	private static Dictionary<string, Vector3> teleportPoints;

	private static bool godmode;

	private static bool noclip;

	public static Human storedHuman;

	public static Interactable storedItem;

	public static MurderController murderController;

	public static Player player;

	public static PlayerInfoProvider playerInfoProvider;

	public static VictimInfoHelper victimInfoHelper;

	public static MurdererInfoProvider murdererInfoProvider;

	public static StoredHumanInfoProvider storedHumanInfoProvider;

	public static PurpInfoProvider purpInfoProvider;

	public static PosterInfoProvider posterInfoProvider;

	public static GameplayController controller;

	public static SideJob sideJob;

	static CommandManager()
	{
		commands = new Dictionary<string, Action<string[]>>();
		teleportPoints = new Dictionary<string, Vector3>();
		godmode = false;
		noclip = false;
		Initialize();
	}

	public static void Initialize()
	{
		IEnumerable<MethodInfo> enumerable = from m in typeof(CommandManager).GetMethods(BindingFlags.Static | BindingFlags.NonPublic)
			where m.GetCustomAttribute<CommandAttribute>() != null
			select m;
		foreach (MethodInfo item in enumerable)
		{
			CommandAttribute customAttribute = item.GetCustomAttribute<CommandAttribute>();
			RegisterCommands(customAttribute.CommandName, (Action<string[]>)Delegate.CreateDelegate(typeof(Action<string[]>), item));
		}
	}

	public static void RegisterCommands(string commandName, Action<string[]> commandAction)
	{
		commands[commandName.ToLower()] = commandAction;
	}

	public static void ExecuteCommand(string command)
	{
		playerInfoProvider = new PlayerInfoProvider();
		victimInfoHelper = new VictimInfoHelper();
		purpInfoProvider = new PurpInfoProvider();
		posterInfoProvider = new PosterInfoProvider();
		murdererInfoProvider = new MurdererInfoProvider();
		storedHumanInfoProvider = new StoredHumanInfoProvider();
		player = Player.Instance;
		murderController = MurderController.Instance;
		if (command.StartsWith("/"))
		{
			string[] array = command.Split(new char[1] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
			if (array.Length != 0)
			{
				string text = array[0].ToLower();
				string[] obj = array.Skip(1).ToArray();
				if (commands.TryGetValue(text, out var value))
				{
					value(obj);
				}
				else
				{
					Lib.GameMessage.ShowPlayerSpeech("Unknown command: " + text, 2f, true);
				}
			}
		}
		else
		{
			SendChatMessage(command);
		}
	}

	private static void SendChatMessage(string message)
	{
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Expected O, but got Unknown
		Lib.GameMessage.ShowPlayerSpeech(message, 5f, true);
		ManualLogSource logger = DevTools.Logger;
		bool flag = default(bool);
		BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(19, 1, ref flag);
		if (flag)
		{
			((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Chat Message Sent: ");
			((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(message);
		}
		logger.LogInfo(val);
		ExtModLog.LogInfo("Chat Message Sent: " + message);
	}

	[Command("/say")]
	private static void SayCommand(string[] args)
	{
		//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c8: Expected O, but got Unknown
		if (args.Length < 3)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /say <string> <float> <bool>", 2f, true);
			return;
		}
		string text = string.Join(" ", args.Take(args.Length - 2));
		string s = args[^2];
		string value = args[^1];
		if (!float.TryParse(s, out var result))
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid float value. Please provide a valid number.", 2f, true);
			return;
		}
		if (!bool.TryParse(value, out var result2))
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid boolean value. Please provide 'true' or 'false'.", 2f, true);
			return;
		}
		Lib.GameMessage.ShowPlayerSpeech(text, result, result2);
		ManualLogSource logger = DevTools.Logger;
		bool flag = default(bool);
		BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(35, 3, ref flag);
		if (flag)
		{
			((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Command Executed: ");
			((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(text);
			((BepInExLogInterpolatedStringHandler)val).AppendLiteral(", Float: ");
			((BepInExLogInterpolatedStringHandler)val).AppendFormatted<float>(result);
			((BepInExLogInterpolatedStringHandler)val).AppendLiteral(", Bool: ");
			((BepInExLogInterpolatedStringHandler)val).AppendFormatted<bool>(result2);
		}
		logger.LogInfo(val);
	}

	[Command("/cloneMe")]
	private static void CloneMeCommand(string[] args)
	{
		//IL_0028: 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)
		FirstPersonController val = Object.FindObjectOfType<FirstPersonController>();
		if ((Object)(object)val != (Object)null)
		{
			GameObject val2 = Object.Instantiate<GameObject>(((Component)val).gameObject, new Vector3(1f, 1f, 1f), ((Component)val).transform.rotation);
			((Object)val2).name = ((Object)val).name + "player_clone";
			Lib.GameMessage.ShowPlayerSpeech("Cloning the player...", 2f, true);
		}
		else
		{
			Lib.GameMessage.ShowPlayerSpeech("Player not found!", 2f, true);
		}
	}

	[Command("/tp")]
	private static void TeleportCommand(string[] args)
	{
		//IL_007f: 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)
		if (args.Length < 3)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /tp <x> <y> <z>", 2f, true);
			return;
		}
		if (!float.TryParse(args[0], out var result) || !float.TryParse(args[1], out var result2) || !float.TryParse(args[2], out var result3))
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid coordinates. Please provide valid numbers.", 2f, true);
			return;
		}
		Vector3 val = default(Vector3);
		((Vector3)(ref val))..ctor(result, result2, result3);
		playerInfoProvider.SetPlayerLocation(val);
		Lib.GameMessage.ShowPlayerSpeech($"Teleported to {val}", 2f, true);
	}

	[Command("/tpe")]
	private static void TeleportEntityCommand(string[] args)
	{
		//IL_00a4: 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_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: 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_00d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: 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_00fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: Unknown result type (might be due to invalid IL or missing references)
		//IL_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_0321: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0298: 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)
		//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_036e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0346: Unknown result type (might be due to invalid IL or missing references)
		if (args.Length != 2)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /tpe <source> <destination>", 5f, true);
			return;
		}
		string text = args[0].ToLower();
		Vector3 val;
		switch (args[1].ToLower())
		{
		case "player":
			val = Vector3Int.op_Implicit(playerInfoProvider.GetPlayerLocation());
			break;
		case "murderer":
			val = Vector3Int.op_Implicit(murdererInfoProvider.GetMurdererLocation());
			break;
		case "victim":
			val = Vector3Int.op_Implicit(victimInfoHelper.GetVictimLocation());
			break;
		case "poster":
			val = ((Component)CasePanelController.Instance.activeCase.job.poster).transform.position;
			break;
		case "purp":
			val = ((Component)CasePanelController.Instance.activeCase.job.purp).transform.position;
			break;
		case "stored":
			if ((Object)(object)storedHuman != (Object)null)
			{
				val = ((Component)storedHuman).transform.position;
				break;
			}
			Lib.GameMessage.ShowPlayerSpeech("No current stored citizen!", 2f, true);
			return;
		default:
			Lib.GameMessage.ShowPlayerSpeech("Invalid destination. Use 'player', 'murderer', 'victim', 'poster' 'purp', or 'stored'.", 2f, true);
			return;
		}
		switch (text)
		{
		case "player":
			playerInfoProvider.SetPlayerLocation(val);
			Lib.GameMessage.ShowPlayerSpeech("Teleported player to new location.", 2f, true);
			break;
		case "murderer":
			murdererInfoProvider.SetMurdererLocation(val);
			Lib.GameMessage.ShowPlayerSpeech("Teleported murderer to new location.", 2f, true);
			break;
		case "victim":
			victimInfoHelper.SetVictimLocation(val);
			Lib.GameMessage.ShowPlayerSpeech("Teleported victim to new location.", 2f, true);
			break;
		case "poster":
			((Component)CasePanelController.Instance.activeCase.job.poster).transform.position = val;
			break;
		case "purp":
			((Component)CasePanelController.Instance.activeCase.job.purp).transform.position = val;
			break;
		case "stored":
			if ((Object)(object)storedHuman != (Object)null)
			{
				((Component)storedHuman).transform.position = val;
			}
			else
			{
				Lib.GameMessage.ShowPlayerSpeech("No current stored citizen!", 2f, true);
			}
			break;
		case "all":
		{
			Enumerator<Citizen> enumerator = CityData.Instance.citizenDirectory.GetEnumerator();
			while (enumerator.MoveNext())
			{
				Citizen current = enumerator.Current;
				((Component)current).transform.position = val;
			}
			Lib.GameMessage.ShowPlayerSpeech("Teleported all citizens to new location.", 2f, true);
			break;
		}
		default:
			Lib.GameMessage.ShowPlayerSpeech("Invalid source. Use 'player' or 'murderer', 'poster', 'purp', 'all' or 'stored'.", 2f, true);
			break;
		}
	}

	[Command("/poison")]
	private static void PoisonEntityCommand(string[] args)
	{
		if (args.Length != 2)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /poison <entity> <amount>", 2f, true);
			return;
		}
		string text = args[0].ToLower();
		if (!float.TryParse(args[1], out var result))
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /poison <entity> <amount>.", 2f, true);
		}
		switch (text)
		{
		case "player":
			playerInfoProvider.AddPoisoned(result, (Human)(object)Player.Instance);
			break;
		case "murderer":
			murdererInfoProvider.AddPoisoned(result, (Human)(object)Player.Instance);
			break;
		case "victim":
			victimInfoHelper.AddPoisoned(result, (Human)(object)Player.Instance);
			break;
		case "stored":
			if ((Object)(object)storedHuman != (Object)null)
			{
				storedHuman.AddPoisoned(result, (Human)(object)Player.Instance);
			}
			else
			{
				Lib.GameMessage.ShowPlayerSpeech("No current stored citizen!", 2f, true);
			}
			break;
		case "all":
		{
			Enumerator<Citizen> enumerator = CityData.Instance.citizenDirectory.GetEnumerator();
			while (enumerator.MoveNext())
			{
				Citizen current = enumerator.Current;
				((Human)current).AddPoisoned(result, murderController.currentMurderer);
			}
			break;
		}
		default:
			Lib.GameMessage.ShowPlayerSpeech("Invalid entity. Use 'player', 'murderer', 'victim' or 'all'.", 2f, true);
			break;
		}
	}

	[Command("/kill")]
	private static void KillEntityCommand(string[] args)
	{
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f3: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
		//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_0150: Unknown result type (might be due to invalid IL or missing references)
		//IL_0155: 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_01a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
		if (args.Length != 1)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /kill <entity>", 2f, true);
			return;
		}
		switch (args[0].ToLower())
		{
		case "player":
			player.TriggerPlayerKO(Vector3.zero, 0f, false);
			break;
		case "murderer":
			murdererInfoProvider.KillMurderer();
			break;
		case "victim":
			victimInfoHelper.KillVictim();
			break;
		case "poster":
			((Actor)CasePanelController.Instance.activeCase.job.poster).RecieveDamage(99999f, (Actor)(object)murderController.currentMurderer, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, true, true, 1f);
			break;
		case "purp":
			((Actor)CasePanelController.Instance.activeCase.job.purp).RecieveDamage(99999f, (Actor)(object)murderController.currentMurderer, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, true, true, 1f);
			break;
		case "stored":
			if ((Object)(object)storedHuman != (Object)null)
			{
				((Actor)storedHuman).RecieveDamage(99999f, (Actor)(object)Player.Instance, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, false, true, 1f);
				((Actor)storedHuman).isDead = true;
			}
			else
			{
				Lib.GameMessage.ShowPlayerSpeech("No current stored citizen!", 2f, true);
			}
			break;
		default:
			Lib.GameMessage.ShowPlayerSpeech("Invalid entity. Use 'player', 'murderer', 'victim', 'poster or 'purp'.", 2f, true);
			break;
		}
	}

	[Command("/ko")]
	private static void KOEntityCommand(string[] args)
	{
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f3: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
		//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_0150: Unknown result type (might be due to invalid IL or missing references)
		//IL_0155: 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_01a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
		if (args.Length != 1)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /ko <entity>", 2f, true);
			return;
		}
		switch (args[0].ToLower())
		{
		case "player":
			player.TriggerPlayerKO(Vector3.zero, 0f, false);
			break;
		case "murderer":
			murdererInfoProvider.KOMurderer();
			break;
		case "victim":
			victimInfoHelper.KOVictim();
			break;
		case "poster":
			((Actor)CasePanelController.Instance.activeCase.job.poster).RecieveDamage(99999f, (Actor)(object)murderController.currentMurderer, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, false, true, 1f);
			break;
		case "purp":
			((Actor)CasePanelController.Instance.activeCase.job.purp).RecieveDamage(99999f, (Actor)(object)murderController.currentMurderer, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, false, true, 1f);
			break;
		case "stored":
			if ((Object)(object)storedHuman != (Object)null)
			{
				((Actor)storedHuman).RecieveDamage(99999f, (Actor)(object)murderController.currentMurderer, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, false, true, 1f);
			}
			else
			{
				Lib.GameMessage.ShowPlayerSpeech("No current stored citizen!", 2f, true);
			}
			break;
		default:
			Lib.GameMessage.ShowPlayerSpeech("Invalid entity. Use 'player', 'murderer', 'victim', 'poster or 'purp'", 2f, true);
			break;
		}
	}

	[Command("/mName")]
	private static void GetMurdererFullName(string[] args)
	{
		string text = murdererInfoProvider.GetMurdererFullName().ToString();
		Lib.GameMessage.ShowPlayerSpeech("Full name of murderer: " + text, 2f, true);
	}

	[Command("/vName")]
	private static void GetVictimFullName(string[] args)
	{
		string text = victimInfoHelper.GetVictimFullName().ToString();
		Lib.GameMessage.ShowPlayerSpeech("Full name of victim: " + text, 2f, true);
	}

	[Command("/sName")]
	private static void GetStoredFullName(string[] args)
	{
		string text = storedHumanInfoProvider.GetStoredFullName().ToString();
		Lib.GameMessage.ShowPlayerSpeech("Full name of citizen: " + text, 2f, true);
	}

	[Command("/god")]
	private static void GodCommand(string[] args)
	{
		if (!godmode)
		{
			((Actor)player).SetMaxHealth(100000000f, false);
			((Actor)player).SetHealth(100000000f);
			Lib.GameMessage.ShowPlayerSpeech("Godmode enabled.", 2f, true);
			godmode = true;
		}
		else
		{
			((Actor)player).SetMaxHealth(100f, false);
			((Actor)player).SetHealth(100f);
			Lib.GameMessage.ShowPlayerSpeech("Godmode disabled.", 2f, true);
			godmode = false;
		}
	}

	[Command("/resetHealth")]
	private static void ResetHealthCommand(string[] args)
	{
		((Actor)Player.Instance).ResetHealthToMaximum();
		Lib.GameMessage.ShowPlayerSpeech("Health reset.", 2f, true);
	}

	[Command("/giveMoney")]
	private static void GiveMoneyCommand(string[] args)
	{
		if (args.Length != 1)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /givemoney <amount>", 2f, true);
			return;
		}
		if (!int.TryParse(args[0], out var result))
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid amount. Please provide a valid number.", 2f, true);
			return;
		}
		controller = GameplayController.Instance;
		controller.AddMoney(result, true, "Dev Action");
		Lib.GameMessage.ShowPlayerSpeech($"Given {result} crows.", 2f, true);
	}

	[Command("/currentNode")]
	private static void CurrentNodeCommand(string[] args)
	{
		Lib.GameMessage.ShowPlayerSpeech($"Current Node: {playerInfoProvider.GetPlayerNode()}", 2f, true);
	}

	[Command("/currentNodeCoord")]
	private static void CurrentNodeCoordCommand(string[] args)
	{
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		Lib.GameMessage.ShowPlayerSpeech($"Current Node: {playerInfoProvider.GetPlayerNodeCoord()}", 2f, true);
	}

	[Command("/pos")]
	private static void PosCommand(string[] args)
	{
		//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_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		Vector3 value = Vector3Int.op_Implicit(playerInfoProvider.GetPlayerLocation());
		Lib.GameMessage.ShowPlayerSpeech($"Current Position: {value}", 2f, true);
	}

	[Command("/killAll")]
	private static void KillAllCommand(string[] args)
	{
		//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)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		Enumerator<Citizen> enumerator = CityData.Instance.citizenDirectory.GetEnumerator();
		while (enumerator.MoveNext())
		{
			Citizen current = enumerator.Current;
			((Actor)current).RecieveDamage(99999f, (Actor)(object)Player.Instance, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, false, true, 1f);
			((Actor)current).isDead = true;
		}
		Lib.GameMessage.ShowPlayerSpeech("Killed everyone.", 2f, true);
	}

	[Command("/koAll")]
	private static void KOAllCommand(string[] args)
	{
		//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)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		Enumerator<Citizen> enumerator = CityData.Instance.citizenDirectory.GetEnumerator();
		while (enumerator.MoveNext())
		{
			Citizen current = enumerator.Current;
			((Actor)current).RecieveDamage(99999f, (Actor)(object)Player.Instance, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, false, true, 1f);
		}
		Lib.GameMessage.ShowPlayerSpeech("KO'd everyone.", 2f, true);
	}

	[Command("/passcode")]
	private static void GetEntityPasscodeCommand(string[] args)
	{
		if (args.Length != 1)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /passcode <entity>", 2f, true);
			return;
		}
		switch (args[0].ToLower())
		{
		case "player":
			Lib.GameMessage.ShowPlayerSpeech("Your passcode is: " + playerInfoProvider.GetPassword().ToString(), 2f, true);
			break;
		case "murderer":
			Lib.GameMessage.ShowPlayerSpeech("Murderer passcode is: " + murdererInfoProvider.GetPassword().ToString(), 2f, true);
			break;
		case "victim":
			Lib.GameMessage.ShowPlayerSpeech("Victim passcode is: " + victimInfoHelper.GetPassword().ToString(), 2f, true);
			break;
		case "poster":
			Lib.GameMessage.ShowPlayerSpeech("Poster passcode is: " + purpInfoProvider.GetPassword().ToString(), 2f, true);
			break;
		case "purp":
			Lib.GameMessage.ShowPlayerSpeech("Purp passcode is: " + purpInfoProvider.GetPassword().ToString(), 2f, true);
			break;
		case "stored":
			if ((Object)(object)storedHuman != (Object)null)
			{
				Lib.GameMessage.ShowPlayerSpeech("Stored citizen passcode is: " + storedHumanInfoProvider.GetPassword().ToString(), 2f, true);
			}
			else
			{
				Lib.GameMessage.ShowPlayerSpeech("No current stored citizen!", 2f, true);
			}
			break;
		default:
			Lib.GameMessage.ShowPlayerSpeech("Invalid entity. Use 'player', 'murderer', 'victim', 'poster' or 'purp'.", 2f, true);
			break;
		}
	}

	[Command("/setPasscode")]
	private static void SetPasscodeCommand(string[] args)
	{
		if (args.Length != 1 || string.IsNullOrEmpty(args[0]))
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /setpasscode <passcode>", 2f, true);
			return;
		}
		string text = args[0];
		if (!text.All(char.IsDigit))
		{
			Lib.GameMessage.ShowPlayerSpeech("Passcode should only contain digits.", 2f, true);
			return;
		}
		playerInfoProvider.SetPassword(text);
		Lib.GameMessage.ShowPlayerSpeech("Passcode set to " + text + ".", 2f, true);
	}

	[Command("/allowEverywhere")]
	private static void AllowedEverywhereCommand(string[] args)
	{
		CityData instance = CityData.Instance;
		Enumerator<NewGameLocation> enumerator = instance.gameLocationDirectory.GetEnumerator();
		while (enumerator.MoveNext())
		{
			NewGameLocation current = enumerator.Current;
			((Actor)Player.Instance).AddLocationOfAuthorty(current);
		}
		Lib.GameMessage.ShowPlayerSpeech("Authorising player everywhere.", 2f, true);
	}

	[Command("/room")]
	private static void GetCurrentRoomNameAndPreset(string[] args)
	{
		NewRoom currentRoom = ((Actor)Player.Instance).currentRoom;
		string value = ((currentRoom.name != null) ? currentRoom.name : "unnamed");
		string value2 = (((SoCustomComparison)(object)currentRoom.preset != (SoCustomComparison)null) ? ((Object)currentRoom.preset).name : "no preset");
		string text = (((Object)(object)currentRoom.building != (Object)null) ? ((Object)currentRoom.building).name : "unknown building");
		string value3 = (((Object)(object)currentRoom.floor != (Object)null) ? ((Object)currentRoom.floor).name : "unknown floor");
		string text2 = "unknown";
		string text3 = "unknown";
		if ((Object)(object)currentRoom.building != (Object)null)
		{
			Enumerator<NewGameLocation> enumerator = CityData.Instance.gameLocationDirectory.GetEnumerator();
			while (enumerator.MoveNext())
			{
				NewGameLocation current = enumerator.Current;
				if ((Object)(object)current != (Object)null && (Object)(object)current.thisAsAddress != (Object)null && ((NewGameLocation)current.thisAsAddress).building.buildingID == currentRoom.building.buildingID)
				{
					text2 = ((Object)current.thisAsAddress).name;
					text3 = ((Object)current).name;
					break;
				}
			}
		}
		Lib.GameMessage.ShowPlayerSpeech($"Room: {value}\nPreset: {value2}\nFloor: {value3}", 5f, true);
	}

	[Command("/furni")]
	private static void ListFurnitureInRoom(string[] args)
	{
		NewRoom currentRoom = ((Actor)Player.Instance).currentRoom;
		if ((Object)(object)currentRoom == (Object)null)
		{
			Lib.GameMessage.ShowPlayerSpeech("Could not determine current room.", 3f, true);
			return;
		}
		if (currentRoom.individualFurniture == null || currentRoom.individualFurniture.Count == 0)
		{
			Lib.GameMessage.ShowPlayerSpeech("No furniture found in this room.", 3f, true);
			return;
		}
		HashSet<string> hashSet = new HashSet<string>();
		Enumerator<FurnitureLocation> enumerator = currentRoom.individualFurniture.GetEnumerator();
		while (enumerator.MoveNext())
		{
			FurnitureLocation current = enumerator.Current;
			if (current != null && (SoCustomComparison)(object)current.furniture != (SoCustomComparison)null)
			{
				hashSet.Add(((Object)current.furniture).name);
			}
		}
		string text = string.Join("\n", hashSet.OrderBy((string name) => name));
		string text2 = string.Join("\", \"", hashSet.OrderBy((string name) => name));
		text2 = (string.IsNullOrEmpty(text2) ? "[]" : ("[\"" + text2 + "\"]"));
		try
		{
			string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			string text3 = Path.Combine(directoryName, "furniture_list.json");
			File.WriteAllText(text3, text2);
			Lib.GameMessage.ShowPlayerSpeech("Furniture in " + currentRoom.name + " saved to: " + text3, 5f, true);
		}
		catch (Exception ex)
		{
			Lib.GameMessage.ShowPlayerSpeech("Furniture in " + currentRoom.name + " failed to save JSON: " + ex.Message, 5f, true);
		}
	}

	[Command("/allfloors")]
	private static void ListAllFloors(string[] args)
	{
		HashSet<string> hashSet = new HashSet<string>();
		if ((Object)(object)CityData.Instance != (Object)null && CityData.Instance.floorDirectory != null)
		{
			Enumerator<NewFloor> enumerator = CityData.Instance.floorDirectory.GetEnumerator();
			while (enumerator.MoveNext())
			{
				NewFloor current = enumerator.Current;
				if ((Object)(object)current != (Object)null && !string.IsNullOrEmpty(((Object)current).name))
				{
					hashSet.Add(((Object)current).name);
				}
			}
		}
		string text = string.Join("\", \"", hashSet.OrderBy((string name) => name));
		text = (string.IsNullOrEmpty(text) ? "[]" : ("[\"" + text + "\"]"));
		try
		{
			string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			string text2 = Path.Combine(directoryName, "all_floors_list.json");
			File.WriteAllText(text2, text);
			Lib.GameMessage.ShowPlayerSpeech($"All floor presets ({hashSet.Count}) saved to: {text2}", 5f, true);
		}
		catch (Exception ex)
		{
			Lib.GameMessage.ShowPlayerSpeech("Failed to save floor presets to JSON: " + ex.Message, 5f, true);
		}
	}

	[Command("/disableBadEffects")]
	private static void DisableBadEffectsCommand(string[] args)
	{
		PlayerPatch.resetNegativeEffects = true;
		Lib.GameMessage.ShowPlayerSpeech("Negative effects disabled.", 2f, true);
	}

	[Command("/help")]
	private static void HelpCommand(string[] args)
	{
		Application.OpenURL("https://github.com/ShaneeexD/DevTools-SOD/wiki");
	}

	[Command("/noclip")]
	private static void NoClipCommand(string[] args)
	{
		if (!noclip)
		{
			noclip = true;
			Game.Instance.SetFreeCamMode(true);
			Lib.GameMessage.ShowPlayerSpeech("Noclip enabled.", 2f, true);
		}
		else
		{
			noclip = false;
			Game.Instance.SetFreeCamMode(false);
			Lib.GameMessage.ShowPlayerSpeech("Noclip disabled.", 2f, true);
		}
	}

	[Command("/compSideJob")]
	private static void CompleteSideJobCommand(string[] args)
	{
		CasePanelController.Instance.activeCase.job.Complete();
	}

	[Command("/giveSocialCredit")]
	private static void GiveSocialCreditCommand(string[] args)
	{
		if (args.Length != 1)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /giveSocialCredit <type>", 2f, true);
			return;
		}
		string text = args[0].ToLower();
		switch (text)
		{
		case "murdercase":
			GameplayController.Instance.AddSocialCredit(GameplayControls.Instance.socialCreditForMurders, true, "cheat");
			break;
		case "sidejob":
			GameplayController.Instance.AddSocialCredit(GameplayControls.Instance.socialCreditForSideJobs, true, "cheat");
			break;
		case "lostandfound":
			GameplayController.Instance.AddSocialCredit(GameplayControls.Instance.socialCreditForLostAndFound, true, "cheat");
			break;
		default:
			Lib.GameMessage.ShowPlayerSpeech("Unknown social credit type. Use: murdercase, sidejob, lostandfound", 2f, true);
			return;
		}
		Lib.GameMessage.ShowPlayerSpeech("Given social credit for " + text + ".", 2f, true);
	}

	[Command("/sideJobDetails")]
	private static void SideJobDetailsCommand(string[] args)
	{
		if (CasePanelController.Instance.activeCase != null)
		{
			string text = CasePanelController.Instance.activeCase.id.ToString();
			string text2 = ((Object)CasePanelController.Instance.activeCase.job.purp).name.ToString();
			string text3 = ((Object)CasePanelController.Instance.activeCase.job.poster).name.ToString();
			if (text != null)
			{
				Lib.GameMessage.ShowPlayerSpeech("Case ID is: " + text, 2f, true);
			}
			if (text3 != null)
			{
				Lib.GameMessage.ShowPlayerSpeech("Poster is: " + text3, 2f, true);
			}
			if (text2 != null)
			{
				Lib.GameMessage.ShowPlayerSpeech("Purp is: " + text2, 2f, true);
			}
		}
		else
		{
			Lib.GameMessage.ShowPlayerSpeech("No active side job!", 2f, true);
		}
	}

	[Command("/removeAttackers")]
	private static void RemoveAttackers(string[] args)
	{
		Enumerator<Citizen> enumerator = CityData.Instance.citizenDirectory.GetEnumerator();
		while (enumerator.MoveNext())
		{
			Citizen current = enumerator.Current;
			((Actor)current).ai.EndAttack();
			((Actor)current).ai.attackActive = false;
			((Actor)current).ai.CancelCombat();
			((Actor)Player.Instance).RemovePersuedBy((Actor)(object)current);
		}
	}

	[Command("/itemTest")]
	private static void ItemTestCommand(string[] args)
	{
		if (storedItem != null)
		{
			player = Player.Instance;
			storedItem.IsSafeToDelete(true);
			GameObject gameObject = storedItem.furnitureParent.spawnedObject.gameObject;
			GameObject gameObject2 = storedItem.spawnedObject.gameObject;
			SpawnFurnitureAtLookPosition(gameObject);
			SpawnFurnitureAtLookPosition(gameObject2);
		}
		else
		{
			Lib.GameMessage.ShowPlayerSpeech("No item stored!", 2f, true);
		}
	}

	private static void SpawnFurnitureAtLookPosition(GameObject furniturePrefab)
	{
		//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_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		RaycastHit playerCurrentRaycastHit = InteractionController.Instance.playerCurrentRaycastHit;
		if ((Object)(object)((RaycastHit)(ref playerCurrentRaycastHit)).collider != (Object)null)
		{
			Vector3 point = ((RaycastHit)(ref playerCurrentRaycastHit)).point;
			Object.Instantiate<GameObject>(furniturePrefab, point, Quaternion.identity);
		}
		else
		{
			Lib.GameMessage.ShowPlayerSpeech("No valid raycast hit.", 2f, true);
		}
	}

	[Command("/job")]
	private static void GetEntityJobCommand(string[] args)
	{
		if (args.Length != 1)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /job <entity>", 2f, true);
			return;
		}
		switch (args[0].ToLower())
		{
		case "murderer":
			murdererInfoProvider.GetJob();
			Lib.GameMessage.ShowPlayerSpeech(murdererInfoProvider.GetJob(), 2f, true);
			break;
		case "victim":
			victimInfoHelper.GetJob();
			Lib.GameMessage.ShowPlayerSpeech(victimInfoHelper.GetJob(), 2f, true);
			break;
		case "poster":
			posterInfoProvider.GetJob();
			Lib.GameMessage.ShowPlayerSpeech(posterInfoProvider.GetJob(), 2f, true);
			break;
		case "purp":
			purpInfoProvider.GetJob();
			Lib.GameMessage.ShowPlayerSpeech(purpInfoProvider.GetJob(), 2f, true);
			break;
		case "stored":
			if ((Object)(object)storedHuman != (Object)null)
			{
				storedHumanInfoProvider.GetJob();
				Lib.GameMessage.ShowPlayerSpeech(storedHumanInfoProvider.GetJob(), 2f, true);
			}
			else
			{
				Lib.GameMessage.ShowPlayerSpeech("No current stored citizen!", 2f, true);
			}
			break;
		default:
			Lib.GameMessage.ShowPlayerSpeech("Invalid entity. Use 'murderer', 'victim', 'Poster', 'Purp' or 'Stored'.", 2f, true);
			break;
		}
	}

	[Command("/testStoredScale")]
	private static void TestStored(string[] args)
	{
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		if (float.TryParse(args[0], out var result))
		{
			((Component)storedHuman).gameObject.transform.localScale = new Vector3(result, result, result);
		}
	}

	[Command("/testStoredSpawn")]
	private static void TestStoredClone(string[] args)
	{
		//IL_002c: 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)
		if ((Object)(object)storedHuman != (Object)null)
		{
			GameObject gameObject = ((Component)storedHuman).gameObject;
			Object.Instantiate<GameObject>(gameObject, new Vector3(1f, 1f, 1f), Quaternion.identity);
			Lib.GameMessage.ShowPlayerSpeech("Spawned Citizen!", 2f, true);
		}
		else
		{
			Lib.GameMessage.ShowPlayerSpeech("No current stored citizen!", 2f, true);
		}
	}

	[Command("/createTP")]
	private static void SetTeleport(string[] args)
	{
		//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_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00de: 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_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		if (args.Length < 1)
		{
			Lib.GameMessage.ShowPlayerSpeech("Please provide a name for the teleport point.", 2f, true);
			return;
		}
		string text = args[0];
		Vector3 value = Vector3Int.op_Implicit(playerInfoProvider.GetPlayerLocation());
		if (teleportPoints.ContainsKey(text))
		{
			Lib.GameMessage.ShowPlayerSpeech($"Teleport point '{text}' updated to new position: {value}", 2f, true);
			teleportPoints[text] = value;
		}
		else
		{
			Lib.GameMessage.ShowPlayerSpeech($"Teleport point '{text}' created at position: {value}", 2f, true);
			teleportPoints.Add(text, value);
		}
	}

	[Command("/tpc")]
	private static void TeleportToPoint(string[] args)
	{
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		if (args.Length < 1)
		{
			Lib.GameMessage.ShowPlayerSpeech("Please provide the name of the teleport point.", 2f, true);
			return;
		}
		string text = args[0];
		if (teleportPoints.TryGetValue(text, out var value))
		{
			playerInfoProvider.SetPlayerLocation(value);
			Lib.GameMessage.ShowPlayerSpeech($"Teleported to '{text}' at position: {value}", 2f, true);
		}
		else
		{
			Lib.GameMessage.ShowPlayerSpeech("Teleport point '" + text + "' does not exist.", 2f, true);
		}
	}

	[Command("/showTPList")]
	private static void ShowTeleportPoints(string[] args)
	{
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		if (teleportPoints.Count == 0)
		{
			Lib.GameMessage.ShowPlayerSpeech("No teleport points have been set.", 2f, true);
			return;
		}
		StringBuilder stringBuilder = new StringBuilder("Teleport Points:\n");
		foreach (KeyValuePair<string, Vector3> teleportPoint in teleportPoints)
		{
			StringBuilder stringBuilder2 = stringBuilder;
			StringBuilder.AppendInterpolatedStringHandler handler = new StringBuilder.AppendInterpolatedStringHandler(2, 2, stringBuilder2);
			handler.AppendFormatted(teleportPoint.Key);
			handler.AppendLiteral(": ");
			handler.AppendFormatted<Vector3>(teleportPoint.Value);
			stringBuilder2.AppendLine(ref handler);
		}
		Lib.GameMessage.ShowPlayerSpeech(stringBuilder.ToString(), 5f, true);
	}

	[Command("/deleteTP")]
	private static void DeleteTeleportPoint(string[] args)
	{
		if (args.Length < 1)
		{
			Lib.GameMessage.ShowPlayerSpeech("Please provide the name of the teleport point to delete.", 2f, true);
			return;
		}
		string text = args[0];
		if (teleportPoints.Remove(text))
		{
			Lib.GameMessage.ShowPlayerSpeech("Teleport point '" + text + "' has been deleted.", 2f, true);
		}
		else
		{
			Lib.GameMessage.ShowPlayerSpeech("Teleport point '" + text + "' does not exist.", 2f, true);
		}
	}

	[Command("/tpp")]
	private static void TeleportPresetCommand(string[] args)
	{
		if (args.Length < 1)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /tpp <presetname>", 2f, true);
			return;
		}
		NewNode val = null;
		switch (args[0].ToLower())
		{
		case "home":
			if ((Object)(object)((Human)player).home != (Object)null)
			{
				val = ((Human)player).home.GetDestinationNode();
			}
			break;
		case "mwork":
		{
			Human currentMurderer2 = murderController.currentMurderer;
			object obj7;
			if (currentMurderer2 == null)
			{
				obj7 = null;
			}
			else
			{
				Interactable workPosition4 = currentMurderer2.workPosition;
				obj7 = ((workPosition4 != null) ? workPosition4.node : null);
			}
			if (obj7 != null)
			{
				val = murderController.currentMurderer.workPosition.node;
			}
			break;
		}
		case "mhome":
		{
			Human currentMurderer = murderController.currentMurderer;
			if ((Object)(object)((currentMurderer != null) ? currentMurderer.home : null) != (Object)null)
			{
				val = murderController.currentMurderer.home.GetDestinationNode();
			}
			break;
		}
		case "vwork":
		{
			Human currentVictim = murderController.currentVictim;
			object obj3;
			if (currentVictim == null)
			{
				obj3 = null;
			}
			else
			{
				Interactable workPosition = currentVictim.workPosition;
				obj3 = ((workPosition != null) ? workPosition.node : null);
			}
			if (obj3 != null)
			{
				val = murderController.currentVictim.workPosition.node;
			}
			break;
		}
		case "vhome":
		{
			Human currentVictim2 = murderController.currentVictim;
			if ((Object)(object)((currentVictim2 != null) ? currentVictim2.home : null) != (Object)null)
			{
				val = murderController.currentVictim.home.GetDestinationNode();
			}
			break;
		}
		case "posterwork":
		{
			Case activeCase2 = CasePanelController.Instance.activeCase;
			object obj6;
			if (activeCase2 == null)
			{
				obj6 = null;
			}
			else
			{
				SideJob job2 = activeCase2.job;
				if (job2 == null)
				{
					obj6 = null;
				}
				else
				{
					Human poster = job2.poster;
					if (poster == null)
					{
						obj6 = null;
					}
					else
					{
						Interactable workPosition3 = poster.workPosition;
						obj6 = ((workPosition3 != null) ? workPosition3.node : null);
					}
				}
			}
			if (obj6 != null)
			{
				val = CasePanelController.Instance.activeCase.job.poster.workPosition.node;
			}
			break;
		}
		case "posterhome":
		{
			Case activeCase4 = CasePanelController.Instance.activeCase;
			object obj9;
			if (activeCase4 == null)
			{
				obj9 = null;
			}
			else
			{
				SideJob job4 = activeCase4.job;
				if (job4 == null)
				{
					obj9 = null;
				}
				else
				{
					Human poster2 = job4.poster;
					obj9 = ((poster2 != null) ? poster2.home : null);
				}
			}
			if ((Object)obj9 != (Object)null)
			{
				val = CasePanelController.Instance.activeCase.job.poster.home.GetDestinationNode();
			}
			break;
		}
		case "purpwork":
		{
			Case activeCase3 = CasePanelController.Instance.activeCase;
			object obj8;
			if (activeCase3 == null)
			{
				obj8 = null;
			}
			else
			{
				SideJob job3 = activeCase3.job;
				if (job3 == null)
				{
					obj8 = null;
				}
				else
				{
					Human purp2 = job3.purp;
					if (purp2 == null)
					{
						obj8 = null;
					}
					else
					{
						Interactable workPosition5 = purp2.workPosition;
						obj8 = ((workPosition5 != null) ? workPosition5.node : null);
					}
				}
			}
			if (obj8 != null)
			{
				val = CasePanelController.Instance.activeCase.job.purp.workPosition.node;
			}
			break;
		}
		case "purphome":
		{
			Case activeCase = CasePanelController.Instance.activeCase;
			object obj2;
			if (activeCase == null)
			{
				obj2 = null;
			}
			else
			{
				SideJob job = activeCase.job;
				if (job == null)
				{
					obj2 = null;
				}
				else
				{
					Human purp = job.purp;
					obj2 = ((purp != null) ? purp.home : null);
				}
			}
			if ((Object)obj2 != (Object)null)
			{
				val = CasePanelController.Instance.activeCase.job.purp.home.GetDestinationNode();
			}
			break;
		}
		case "swork":
		{
			Human obj4 = storedHuman;
			object obj5;
			if (obj4 == null)
			{
				obj5 = null;
			}
			else
			{
				Interactable workPosition2 = obj4.workPosition;
				obj5 = ((workPosition2 != null) ? workPosition2.node : null);
			}
			if (obj5 != null)
			{
				val = storedHuman.workPosition.node;
			}
			break;
		}
		case "shome":
		{
			Human obj = storedHuman;
			if ((Object)(object)((obj != null) ? obj.home : null) != (Object)null)
			{
				val = storedHuman.home.GetDestinationNode();
			}
			break;
		}
		default:
			Lib.GameMessage.ShowPlayerSpeech("Unknown preset '" + args[0] + "'. Available presets: home, mwork, mhome, vwork, vhome, posterwork, posterhome, purpwork, purphome, swork, shome.", 2f, true);
			return;
		}
		if (val != null)
		{
			((Actor)player).Teleport(val, (UsagePoint)null, true, false, true);
			Lib.GameMessage.ShowPlayerSpeech("Teleported to " + args[0], 2f, true);
		}
		else
		{
			Lib.GameMessage.ShowPlayerSpeech("Failed to teleport. The preset '" + args[0] + "' has no set destination.", 2f, true);
		}
	}

	[Command("/tpn")]
	private static void TeleportNodeCommand(string[] args)
	{
		//IL_007f: 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)
		if (args.Length < 3)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /tpn <x> <y> <z>", 2f, true);
			return;
		}
		if (!int.TryParse(args[0], out var result) || !int.TryParse(args[1], out var result2) || !int.TryParse(args[2], out var result3))
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid coordinates. Please provide valid numbers.", 2f, true);
			return;
		}
		Vector3Int val = default(Vector3Int);
		((Vector3Int)(ref val))..ctor(result, result2, result3);
		playerInfoProvider.SetPlayerNode(val);
		Lib.GameMessage.ShowPlayerSpeech($"Teleported to {val}", 2f, true);
	}

	[Command("/output")]
	private static void ExportCommand(string[] args)
	{
		if (args.Length < 1)
		{
			Lib.GameMessage.ShowPlayerSpeech("Invalid usage. Use: /export <murderer|victim|poster|purp|stored>", 2f, true);
			return;
		}
		string text = args[0].ToLower();
		string text2 = string.Empty;
		switch (text)
		{
		case "murderer":
			if ((Object)(object)murderController.currentMurderer != (Object)null)
			{
				text2 = GetCitizenInfo(murderController.currentMurderer);
			}
			else
			{
				Lib.GameMessage.ShowPlayerSpeech("No murderer data found.", 2f, true);
			}
			break;
		case "victim":
			if ((Object)(object)murderController.currentVictim != (Object)null)
			{
				text2 = GetCitizenInfo(murderController.currentVictim);
			}
			else
			{
				Lib.GameMessage.ShowPlayerSpeech("No victim data found.", 2f, true);
			}
			break;
		case "poster":
		{
			Case activeCase2 = CasePanelController.Instance.activeCase;
			object obj2;
			if (activeCase2 == null)
			{
				obj2 = null;
			}
			else
			{
				SideJob job2 = activeCase2.job;
				obj2 = ((job2 != null) ? job2.poster : null);
			}
			if ((Object)obj2 != (Object)null)
			{
				text2 = GetCitizenInfo(CasePanelController.Instance.activeCase.job.poster);
			}
			else
			{
				Lib.GameMessage.ShowPlayerSpeech("No poster data found.", 2f, true);
			}
			break;
		}
		case "purp":
		{
			Case activeCase = CasePanelController.Instance.activeCase;
			object obj;
			if (activeCase == null)
			{
				obj = null;
			}
			else
			{
				SideJob job = activeCase.job;
				obj = ((job != null) ? job.purp : null);
			}
			if ((Object)obj != (Object)null)
			{
				text2 = GetCitizenInfo(CasePanelController.Instance.activeCase.job.purp);
			}
			else
			{
				Lib.GameMessage.ShowPlayerSpeech("No purp data found.", 2f, true);
			}
			break;
		}
		case "stored":
			if ((Object)(object)storedHuman != (Object)null)
			{
				text2 = GetCitizenInfo(storedHuman);
			}
			else
			{
				Lib.GameMessage.ShowPlayerSpeech("No stored data found.", 2f, true);
			}
			break;
		default:
			Lib.GameMessage.ShowPlayerSpeech("Unknown character type. Use one of: murderer, victim, poster, purp, stored.", 2f, true);
			return;
		}
		if (string.IsNullOrEmpty(text2))
		{
			return;
		}
		string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
		string text3 = Path.Combine(directoryName, text + "_info.txt");
		try
		{
			File.WriteAllText(text3, text2);
			Lib.GameMessage.ShowPlayerSpeech("Exported " + text + " info to " + text3, 2f, true);
		}
		catch (Exception ex)
		{
			Lib.GameMessage.ShowPlayerSpeech("Error exporting " + text + " info: " + ex.Message, 2f, true);
		}
	}

	private static string GetCitizenInfo(Human human)
	{
		string value = ((Object)human).name?.ToString() ?? "null";
		string value2 = human.GetAge().ToString() ?? "null";
		Occupation job = human.job;
		object obj;
		if (job == null)
		{
			obj = null;
		}
		else
		{
			Company employer = job.employer;
			obj = ((employer == null) ? null : employer.name?.ToString());
		}
		if (obj == null)
		{
			obj = "null";
		}
		string value3 = (string)obj;
		Occupation job2 = human.job;
		string value4 = ((job2 == null) ? null : job2.name?.ToString()) ?? "null";
		NewAddress home = human.home;
		object obj2;
		if (home == null)
		{
			obj2 = null;
		}
		else
		{
			NewAddress thisAsAddress = ((NewGameLocation)home).thisAsAddress;
			obj2 = ((thisAsAddress == null) ? null : ((Object)thisAsAddress).name?.ToString());
		}
		if (obj2 == null)
		{
			obj2 = "null";
		}
		string value5 = (string)obj2;
		Passcode passcode = human.passcode;
		string value6 = ((((passcode != null) ? passcode.digits : null) != null) ? string.Join("", EnumerableExtensions.Select<int, string>(human.passcode.digits, (Func<int, string>)((int digit) => digit.ToString() ?? "null"))) : "null");
		string value7 = ((((Actor)human).inventory != null) ? string.Join(", ", EnumerableExtensions.Select<Interactable, string>(((Actor)human).inventory, (Func<Interactable, string>)((Interactable item) => ((item == null) ? null : item.GetName()?.ToString()) ?? "null"))) : "null");
		return $"Name: {value}\nAge: {value2}\nEmployer: {value3}\nOccupation: {value4}\nAddress: {value5}\nPasscode: {value6}\nInventory: {value7}\n";
	}
}
public class CommandUI
{
	public static void OpenDialogInputBox()
	{
		//IL_0016: 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_0060: Expected O, but got Unknown
		//IL_0087: 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_00c8: 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_0113: Unknown result type (might be due to invalid IL or missing references)
		//IL_0129: Unknown result type (might be due to invalid IL or missing references)
		//IL_0139: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Expected O, but got Unknown
		//IL_0173: Unknown result type (might be due to invalid IL or missing references)
		//IL_0189: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_0222: Unknown result type (might be due to invalid IL or missing references)
		//IL_0256: Unknown result type (might be due to invalid IL or missing references)
		//IL_027f: Unknown result type (might be due to invalid IL or missing references)
		if (!PlayerPatch.isUICreated)
		{
			PlayerPatch.canvas = new GameObject("CommandCanvas").AddComponent<Canvas>();
			PlayerPatch.canvas.renderMode = (RenderMode)0;
			((Component)PlayerPatch.canvas).gameObject.AddComponent<CanvasScaler>();
			((Component)PlayerPatch.canvas).gameObject.AddComponent<GraphicRaycaster>();
			PlayerPatch.panelObject = new GameObject("InputPanel");
			RectTransform val = PlayerPatch.panelObject.AddComponent<RectTransform>();
			((Transform)val).SetParent(((Component)PlayerPatch.canvas).transform);
			val.sizeDelta = new Vector2(400f, 40f);
			val.anchoredPosition = new Vector2(-750f, -487f);
			Image val2 = PlayerPatch.panelObject.AddComponent<Image>();
			((Graphic)val2).color = new Color(0f, 0f, 0f, 0.7f);
			((Graphic)val2).color = new Color(1f, 0f, 0f, 0.7f);
			Shadow val3 = PlayerPatch.panelObject.AddComponent<Shadow>();
			val3.effectColor = new Color(0f, 0f, 0f, 0.7f);
			val3.effectDistance = new Vector2(2f, -2f);
			PlayerPatch.inputFieldObject = new GameObject("CommandInputField");
			PlayerPatch.inputFieldObject.transform.SetParent(PlayerPatch.panelObject.transform);
			RectTransform val4 = PlayerPatch.inputFieldObject.AddComponent<RectTransform>();
			val4.sizeDelta = new Vector2(380f, 40f);
			val4.anchoredPosition = new Vector2(0f, 0f);
			PlayerPatch.inputField = PlayerPatch.inputFieldObject.AddComponent<InputField>();
			Text val5 = new GameObject("InputText").AddComponent<Text>();
			val5.font = Resources.GetBuiltinResource<Font>("Arial.ttf");
			((Graphic)val5).color = Color.white;
			val5.alignment = (TextAnchor)3;
			((Graphic)val5).rectTransform.sizeDelta = new Vector2(380f, 40f);
			((Component)val5).transform.SetParent(PlayerPatch.inputFieldObject.transform, false);
			PlayerPatch.inputField.textComponent = val5;
			Text val6 = new GameObject("Placeholder").AddComponent<Text>();
			val6.font = Resources.GetBuiltinResource<Font>("Arial.ttf");
			((Graphic)val6).color = new Color(1f, 1f, 1f, 0.5f);
			val6.text = "Enter command...";
			((Graphic)val6).rectTransform.sizeDelta = new Vector2(380f, 40f);
			val6.alignment = (TextAnchor)3;
			((Component)val6).transform.SetParent(PlayerPatch.inputFieldObject.transform, false);
			PlayerPatch.inputField.placeholder = (Graphic)(object)val6;
			((Selectable)PlayerPatch.inputField).interactable = true;
			PlayerPatch.inputFieldObject.SetActive(true);
			PlayerPatch.inputField.ActivateInputField();
			DevTools.Logger.LogInfo((object)"Command Input Field created.");
			PlayerPatch.isUICreated = true;
		}
	}

	public static Text CreateTextComponent(string name, Color color)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Expected O, but got Unknown
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = new GameObject(name);
		Text val2 = val.AddComponent<Text>();
		val2.font = Resources.GetBuiltinResource<Font>("Arial.ttf");
		((Graphic)val2).color = color;
		RectTransform component = val.GetComponent<RectTransform>();
		if ((Object)(object)component == (Object)null)
		{
			component = val.AddComponent<RectTransform>();
		}
		return val2;
	}

	public static void OnSubmitCommand()
	{
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Expected O, but got Unknown
		string text = PlayerPatch.inputField.text.Trim();
		if (!string.IsNullOrEmpty(text))
		{
			CommandManager.ExecuteCommand(text);
			ManualLogSource logger = DevTools.Logger;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(18, 1, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Command Executed: ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(text);
			}
			logger.LogInfo(val);
		}
		CloseDialogInputBox();
	}

	public static void CloseDialogInputBox()
	{
		if ((Object)(object)PlayerPatch.panelObject != (Object)null)
		{
			Player.Instance.EnableCharacterController(true);
			Player.Instance.EnablePlayerMouseLook(true, true);
			Object.Destroy((Object)(object)PlayerPatch.panelObject);
			PlayerPatch.sessionData.ResumeGame();
			DevTools.Logger.LogInfo((object)"Command Input Field destroyed.");
		}
		PlayerPatch.isUICreated = false;
		PlayerPatch.isInputActive = false;
	}
}
[HarmonyPatch(typeof(Game), "SetFreeCamMode")]
public class FreecamPatch
{
	[HarmonyPrefix]
	public static void Prefix_Awake(ref bool val)
	{
	}
}
public class GameInfoProvider
{
}
public class MurdererInfoProvider
{
	private MurderController murderController = MurderController.Instance;

	private Citizen citizen = new Citizen();

	public Vector3Int GetMurdererLocation()
	{
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: 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)
		if ((Object)(object)murderController != (Object)null)
		{
			Vector3 position = ((Component)murderController.currentMurderer).transform.position;
			return new Vector3Int(Mathf.RoundToInt(position.x), Mathf.RoundToInt(position.y), Mathf.RoundToInt(position.z));
		}
		return new Vector3Int(0, 0, 0);
	}

	public void SetMurdererLocation(Vector3 loc)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		((Component)murderController.currentMurderer).transform.position = loc;
	}

	public string GetMurdererFullName()
	{
		if ((Object)(object)murderController != (Object)null)
		{
			string text = murderController.currentMurderer.firstName.ToString();
			string text2 = murderController.currentMurderer.surName.ToString();
			return text + " " + text2;
		}
		return "murderController is null!";
	}

	public void AddPoisoned(float amount, Human who)
	{
		Player instance = Player.Instance;
		murderController.currentMurderer.AddPoisoned(amount, (Human)(object)instance);
	}

	public void KillMurderer()
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//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_0025: Unknown result type (might be due to invalid IL or missing references)
		((Actor)murderController.currentMurderer).RecieveDamage(99999f, (Actor)(object)Player.Instance, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, true, true, 1f);
	}

	public void KOMurderer()
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//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_0025: Unknown result type (might be due to invalid IL or missing references)
		((Actor)murderController.currentMurderer).RecieveDamage(99999f, (Actor)(object)Player.Instance, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, false, true, 1f);
	}

	public string GetPassword()
	{
		MurderController instance = MurderController.Instance;
		List<int> digits = instance.currentMurderer.passcode.digits;
		StringBuilder stringBuilder = new StringBuilder();
		for (int i = 0; i < digits.Count; i++)
		{
			stringBuilder.Append(digits[i].ToString());
		}
		return stringBuilder.ToString();
	}

	public string GetJob()
	{
		string result = "Citizen is jobless.";
		if (murderController.currentMurderer.job.employer != null)
		{
			string text = murderController.currentMurderer.job.employer.name.ToString();
			string text2 = murderController.currentMurderer.job.name.ToString();
			string text3 = murderController.currentMurderer.job.salaryString.ToString();
			return "Employer: " + text + Environment.NewLine + "Job: " + text2 + Environment.NewLine + "Salary: " + text3;
		}
		return result;
	}
}
public class NewGameHandler : MonoBehaviour
{
	public static Murder murder;

	public static Toolbox toolbox;

	private GameObject cube;

	public NewGameHandler()
	{
		Lib.SaveGame.OnAfterLoad += HandleGameLoaded;
		Lib.SaveGame.OnAfterNewGame += HandleNewGameStarted;
	}

	private void HandleNewGameStarted(object sender, EventArgs e)
	{
	}

	private void HandleGameLoaded(object sender, EventArgs e)
	{
	}
}
[BepInPlugin("DevTools", "DevTools", "1.0.0")]
public class DevTools : BasePlugin
{
	public static ManualLogSource Logger;

	private Harmony harmony;

	public static ConfigEntry<float> walkSpeedMultiplier;

	public static ConfigEntry<float> runSpeedMultiplier;

	public override void Load()
	{
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Expected O, but got Unknown
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Expected O, but got Unknown
		Logger = ((BasePlugin)this).Log;
		NewGameHandler newGameHandler = new NewGameHandler();
		Logger.LogInfo((object)"Loading DevTools...");
		CommandManager.Initialize();
		try
		{
			harmony = new Harmony("DevTools");
			harmony.PatchAll();
			Logger.LogInfo((object)"All patches applied.");
		}
		catch (Exception ex)
		{
			ManualLogSource logger = Logger;
			bool flag = default(bool);
			BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(19, 1, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Error during Load: ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<Exception>(ex);
			}
			logger.LogError(val);
		}
	}
}
[HarmonyPatch(typeof(Player), "Update")]
public class PlayerPatch
{
	public static bool isUICreated = false;

	public static bool isInputActive = false;

	public static bool resetNegativeEffects = false;

	public static GameObject inputFieldObject;

	public static InputField inputField;

	public static GameObject panelObject;

	public static Canvas canvas;

	public static SessionData sessionData;

	public static InputController inputController;

	public static Game game = new Game();

	public static Player player = Player.Instance;

	[HarmonyPrefix]
	public static void Prefix(Player __instance)
	{
		if (Input.GetKeyInt((KeyCode)47) && !isInputActive && !MainMenuController.Instance.mainMenuActive && !((Actor)__instance).isInBed)
		{
			CommandUI.OpenDialogInputBox();
			isInputActive = true;
		}
		if (Input.GetKeyInt((KeyCode)326) && (Object)(object)InteractionController.Instance.currentLookingAtInteractable != (Object)null)
		{
			Actor isActor = InteractionController.Instance.currentLookingAtInteractable.interactable.isActor;
			if (Object.op_Implicit((Object)(object)((isActor is Human) ? isActor : null)))
			{
				Actor isActor2 = InteractionController.Instance.currentLookingAtInteractable.interactable.isActor;
				CommandManager.storedHuman = (Human)(object)((isActor2 is Human) ? isActor2 : null);
				if ((Object)(object)CommandManager.storedHuman != (Object)null)
				{
					Lib.GameMessage.ShowPlayerSpeech("Stored citizen: " + CommandManager.storedHuman.GetCitizenName().ToString(), 2f, true);
					StoredHumanInfoProvider.human = CommandManager.storedHuman;
				}
			}
			else
			{
				CommandManager.storedItem = InteractionController.Instance.currentLookingAtInteractable.interactable;
				Lib.GameMessage.ShowPlayerSpeech("Stored item: " + InteractionController.Instance.currentLookingAtInteractable.interactable.name.ToString(), 2f, true);
			}
		}
		if (MainMenuController.Instance.mainMenuActive && isInputActive)
		{
			CommandUI.CloseDialogInputBox();
		}
		if (isInputActive)
		{
			Player.Instance.EnablePlayerMouseLook(false, false);
			Player.Instance.EnableCharacterController(false);
			sessionData = SessionData.Instance;
			sessionData.PauseGame(false, false, false);
			if (Input.GetKeyInt((KeyCode)13))
			{
				CommandUI.OnSubmitCommand();
			}
			if (Input.GetKeyInt((KeyCode)27))
			{
				CommandUI.CloseDialogInputBox();
			}
		}
		if (resetNegativeEffects)
		{
			Player.Instance.ResetNegativeStatuses(10f);
		}
	}
}
public class PosterInfoProvider
{
	public string GetPassword()
	{
		CasePanelController instance = CasePanelController.Instance;
		List<int> digits = instance.activeCase.job.poster.passcode.digits;
		StringBuilder stringBuilder = new StringBuilder();
		for (int i = 0; i < digits.Count; i++)
		{
			stringBuilder.Append(digits[i].ToString());
		}
		return stringBuilder.ToString();
	}

	public string GetJob()
	{
		string result = "Citizen is jobless.";
		if (CasePanelController.Instance.activeCase.job.poster.job.employer != null)
		{
			string text = CasePanelController.Instance.activeCase.job.poster.job.employer.name.ToString();
			string text2 = CasePanelController.Instance.activeCase.job.poster.job.name.ToString();
			string text3 = CasePanelController.Instance.activeCase.job.poster.job.salaryString.ToString();
			return "Employer: " + text + Environment.NewLine + "Job: " + text2 + Environment.NewLine + "Salary: " + text3;
		}
		return result;
	}
}
public class PurpInfoProvider
{
	public string GetPassword()
	{
		CasePanelController instance = CasePanelController.Instance;
		List<int> digits = instance.activeCase.job.purp.passcode.digits;
		StringBuilder stringBuilder = new StringBuilder();
		for (int i = 0; i < digits.Count; i++)
		{
			stringBuilder.Append(digits[i].ToString());
		}
		return stringBuilder.ToString();
	}

	public string GetJob()
	{
		string result = "Citizen is jobless.";
		if (CasePanelController.Instance.activeCase.job.purp.job.employer != null)
		{
			string text = CasePanelController.Instance.activeCase.job.purp.job.employer.name.ToString();
			string text2 = CasePanelController.Instance.activeCase.job.purp.job.name.ToString();
			string text3 = CasePanelController.Instance.activeCase.job.purp.job.salaryString.ToString();
			return "Employer: " + text + Environment.NewLine + "Job: " + text2 + Environment.NewLine + "Salary: " + text3;
		}
		return result;
	}
}
public class StoredHumanInfoProvider
{
	public static Human human;

	public string GetPassword()
	{
		List<int> digits = human.passcode.digits;
		StringBuilder stringBuilder = new StringBuilder();
		for (int i = 0; i < digits.Count; i++)
		{
			stringBuilder.Append(digits[i].ToString());
		}
		return stringBuilder.ToString();
	}

	public string GetStoredFullName()
	{
		if ((Object)(object)human != (Object)null)
		{
			string text = human.firstName.ToString();
			string text2 = human.surName.ToString();
			return text + " " + text2;
		}
		return "human is null!";
	}

	public float GetBleeding()
	{
		return human.bleeding;
	}

	public void SetBleeding(float amount)
	{
		human.bleeding = amount;
	}

	public void SetTrespassing(bool trespassing)
	{
		((Actor)human).isTrespassing = trespassing;
	}

	public string GetJob()
	{
		string result = "Citizen is jobless.";
		if (human.job.employer != null)
		{
			string text = human.job.employer.name.ToString();
			string text2 = human.job.name.ToString();
			string text3 = human.job.salaryString.ToString();
			return "Employer: " + text + Environment.NewLine + "Job: " + text2 + Environment.NewLine + "Salary: " + text3;
		}
		return result;
	}
}
public class VictimInfoHelper
{
	private MurderController murderController = MurderController.Instance;

	public Vector3Int GetVictimLocation()
	{
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: 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)
		if ((Object)(object)murderController != (Object)null)
		{
			Vector3 position = ((Component)murderController.currentVictim).transform.position;
			return new Vector3Int(Mathf.RoundToInt(position.x), Mathf.RoundToInt(position.y), Mathf.RoundToInt(position.z));
		}
		return new Vector3Int(0, 0, 0);
	}

	public void SetVictimLocation(Vector3 loc)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		((Component)murderController.currentVictim).transform.position = loc;
	}

	public string GetVictimFullName()
	{
		if ((Object)(object)murderController != (Object)null)
		{
			string text = murderController.currentVictim.firstName.ToString();
			string text2 = murderController.currentVictim.surName.ToString();
			return text + " " + text2;
		}
		return "murderController is null!";
	}

	public void AddPoisoned(float amount, Human who)
	{
		Player instance = Player.Instance;
		murderController.currentVictim.AddPoisoned(amount, (Human)(object)instance);
	}

	public void KillVictim()
	{
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//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)
		((Actor)murderController.currentVictim).RecieveDamage(99999f, (Actor)(object)murderController.currentMurderer, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, true, true, 1f);
	}

	public void KOVictim()
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//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_0025: Unknown result type (might be due to invalid IL or missing references)
		((Actor)murderController.currentVictim).RecieveDamage(99999f, (Actor)(object)Player.Instance, Vector2.op_Implicit(Vector2.zero), Vector2.op_Implicit(Vector2.zero), (SpatterPatternPreset)null, (SpatterPatternPreset)null, (EraseMode)3, true, false, 0f, 1f, false, true, 1f);
	}

	public string GetPassword()
	{
		MurderController instance = MurderController.Instance;
		List<int> digits = instance.currentVictim.passcode.digits;
		StringBuilder stringBuilder = new StringBuilder();
		for (int i = 0; i < digits.Count; i++)
		{
			stringBuilder.Append(digits[i].ToString());
		}
		return stringBuilder.ToString();
	}

	public string GetJob()
	{
		string result = "Citizen is jobless.";
		if (murderController.currentVictim.job.employer != null)
		{
			string text = murderController.currentVictim.job.employer.name.ToString();
			string text2 = murderController.currentVictim.job.name.ToString();
			string text3 = murderController.currentVictim.job.salaryString.ToString();
			return "Employer: " + text + Environment.NewLine + "Job: " + text2 + Environment.NewLine + "Salary: " + text3;
		}
		return result;
	}
}