Decompiled source of FineTuneObjectsPlugin v2.3.0

FineTuneObjectPlugin.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using ModdingTales;
using Newtonsoft.Json;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("FineTuneObjectPlugin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FineTuneObjectPlugin")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("FineTuneObjectPlugin")]
[assembly: ComVisible(false)]
[assembly: Guid("c303405d-e66c-4316-9cdb-4e3ca15c6360")]
[assembly: AssemblyFileVersion("2.3.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("2.3.0.0")]
namespace LordAshes;

[BepInPlugin("org.lordashes.plugins.finetuneobjects", "Fine Tune Object Plug-In", "2.3.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class FineTuneObjectPlugin : BaseUnityPlugin
{
	public static class Utility
	{
		public static float ParseFloat(string value)
		{
			return float.Parse(value, CultureInfo.InvariantCulture);
		}

		public static GameObject FindInHierarchy(GameObject start, string seekName)
		{
			List<GameObject> results = new List<GameObject>();
			bool done = false;
			Traverse(start.transform, seekName, null, single: true, ref results, ref done);
			return (results.Count > 0) ? results.ElementAt(0) : null;
		}

		public static GameObject FindInHierarchyViaPartialName(GameObject start, string seekName)
		{
			List<GameObject> results = new List<GameObject>();
			bool done = false;
			Traverse(start.transform, seekName, null, single: true, ref results, ref done, partial: true);
			return (results.Count > 0) ? results.ElementAt(0) : null;
		}

		public static GameObject[] FindAllInHierarchy(GameObject start, string seekName)
		{
			List<GameObject> results = new List<GameObject>();
			bool done = false;
			Traverse(start.transform, seekName, null, single: false, ref results, ref done);
			return results.ToArray();
		}

		public static GameObject[] FindAllInHierarchyViaPartialName(GameObject start, string seekName)
		{
			List<GameObject> results = new List<GameObject>();
			bool done = false;
			Traverse(start.transform, seekName, null, single: false, ref results, ref done, partial: true);
			return results.ToArray();
		}

		public static GameObject FindWithComponentInHierarchy(GameObject start, string seekType)
		{
			List<GameObject> results = new List<GameObject>();
			bool done = false;
			Traverse(start.transform, null, seekType, single: true, ref results, ref done);
			return (results.Count > 0) ? results.ElementAt(0) : null;
		}

		public static GameObject[] FindAllWithComponentInHierarchy<T>(GameObject start, string seekType)
		{
			List<GameObject> results = new List<GameObject>();
			bool done = false;
			Traverse(start.transform, null, seekType, single: false, ref results, ref done);
			return results.ToArray();
		}

		public static void Traverse(Transform root, string seekName, string seekType, bool single, ref List<GameObject> results, ref bool done, bool partial = false)
		{
			try
			{
				if ((seekName == null || seekName == ((Object)((Component)root).gameObject).name || (partial && ((Object)((Component)root).gameObject).name.Contains(seekName))) && (seekType == null || (Object)(object)((Component)root).GetComponent(seekType) != (Object)null))
				{
					LoggingPlugin.LogTrace("Matched '" + ((Object)((Component)root).gameObject).name + "'");
					results.Add(((Component)root).gameObject);
					if (single)
					{
						done = true;
						return;
					}
				}
				for (int i = 0; i < root.childCount; i++)
				{
					if (!done)
					{
						Traverse(root.GetChild(i), seekName, seekType, single, ref results, ref done, partial);
					}
				}
			}
			catch
			{
			}
		}

		public static object LookUp(in Dictionary<string, object> dictionary, string key)
		{
			foreach (KeyValuePair<string, object> item in dictionary)
			{
				if (item.Key.ToUpper() == key.ToUpper())
				{
					return item.Value;
				}
			}
			return null;
		}
	}

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

		private object <>2__current;

		public string source;

		public string key;

		public string data;

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

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

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

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

		private bool MoveNext()
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				LoggingPlugin.LogDebug("Requesting " + source + " To " + data);
				<>2__current = (object)new WaitForSeconds(1f);
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				AssetDataPlugin.SetInfo(source, key, data, false);
				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 List<DatumChange> queue = new List<DatumChange>();

	public const string Name = "Fine Tune Object Plug-In";

	public const string Guid = "org.lordashes.plugins.finetuneobjects";

	public const string Version = "2.3.0.0";

	private static string[] seekTypes = new string[3] { "CREATURE", "AURA", "EFFECT" };

	private int affectedComponent = 0;

	private static Type _CreaturePresenter = Reflection.Type("CreaturePresenter", (string[])null, (string[])null, 0);

	private static Type _CreatureBoardAsset = Reflection.Type("CreatureBoardAsset", (string[])null, (string[])null, 0);

	private static Type _InternedContentAddress = Reflection.Type("InternedContentAddress", (string[])null, (string[])null, 0);

	private static Type _CreatureDataV4 = Reflection.Type("CreatureDataV4", (string[])null, (string[])null, 0);

	private static Type _LocalClient = Reflection.Type("LocalClient", (string[])null, (string[])null, 0);

	private static Type _SystemMessage = Reflection.Type("SystemMessage", (string[])null, (string[])null, 0);

	private const int VK_CAPITAL = 20;

	public static FineTuneObjectPlugin _self = null;

	public static Dictionary<string, string> fixes = null;

	private ConfigEntry<KeyboardShortcut>[] triggerKeys { get; set; }

	private void GetHandleRequest(DatumChange change)
	{
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Invalid comparison between Unknown and I4
		//IL_0298: 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_02f2: Unknown result type (might be due to invalid IL or missing references)
		if (change == null)
		{
			return;
		}
		LoggingPlugin.LogDebug("Request: " + JsonConvert.SerializeObject((object)change));
		if ((int)change.action == 1)
		{
			return;
		}
		LoggingPlugin.LogDebug("Obtaining CreatureGuid");
		object obj = null;
		try
		{
			obj = Reflection.New(Reflection.Type("CreatureGuid", (string[])null, (string[])null, 0), new object[1] { change.source });
		}
		catch
		{
		}
		if (obj == null)
		{
			return;
		}
		LoggingPlugin.LogDebug("Obtaining CreatureBoardAsset");
		object[] array = new object[2] { obj, null };
		Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array, 0);
		object obj3 = array[1];
		if (obj3 != null)
		{
			string text = change.key.Substring(change.key.LastIndexOf(".") + 1);
			LoggingPlugin.LogDebug("Applying " + obj?.ToString() + " => " + text + " => " + change.value);
			string[] array2 = change.value.ToString().Split(new char[1] { ',' });
			GameObject val = null;
			try
			{
				val = GetObject(text, obj3);
			}
			catch
			{
			}
			if ((Object)(object)val != (Object)null)
			{
				LoggingPlugin.LogDebug("GO Transform: " + ((Object)val).name + " (" + ((Object)val.transform).name + ")");
				LoggingPlugin.LogDebug("Applying Position " + array2[0] + "," + array2[1] + "," + array2[2]);
				LoggingPlugin.LogDebug("Applying Rotation " + array2[3] + "," + array2[4] + "," + array2[5]);
				LoggingPlugin.LogDebug("Applying Scale " + array2[6] + "," + array2[6] + "," + array2[6]);
				val.transform.localPosition = new Vector3(float.Parse(array2[0]), float.Parse(array2[1]), float.Parse(array2[2]));
				val.transform.localEulerAngles = new Vector3(float.Parse(array2[3]), float.Parse(array2[4]), float.Parse(array2[5]));
				val.transform.localScale = new Vector3(float.Parse(array2[6]), float.Parse(array2[6]), float.Parse(array2[6]));
			}
		}
		else if (obj3 != null)
		{
			LoggingPlugin.LogDebug("CreautureLoader or LoadedAsset was not ready");
		}
	}

	[DllImport("user32.dll")]
	private static extern short GetKeyState(int keyCode);

	private void Awake()
	{
		//IL_001e: 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_003e: 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_00ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_011c: Unknown result type (might be due to invalid IL or missing references)
		//IL_014a: 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_01ac: 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_020e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0240: Unknown result type (might be due to invalid IL or missing references)
		//IL_026f: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d3: 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_0337: Unknown result type (might be due to invalid IL or missing references)
		//IL_0369: Unknown result type (might be due to invalid IL or missing references)
		//IL_0398: Unknown result type (might be due to invalid IL or missing references)
		_self = this;
		LoggingPlugin.SetLogLevel(((BaseUnityPlugin)this).Config.Bind<DiagnosticLevel>("Settings", "Diagnostic Level", (DiagnosticLevel)3, (ConfigDescription)null).Value);
		string? assemblyQualifiedName = ((object)this).GetType().AssemblyQualifiedName;
		DiagnosticLevel logLevel = LoggingPlugin.GetLogLevel();
		LoggingPlugin.LogInfo(assemblyQualifiedName + ": Active. (Diagnostic Mode = " + ((object)(DiagnosticLevel)(ref logLevel)).ToString() + ")");
		triggerKeys = new ConfigEntry<KeyboardShortcut>[17]
		{
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Turn Up", new KeyboardShortcut((KeyCode)280, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Turn Down", new KeyboardShortcut((KeyCode)281, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Turn Left", new KeyboardShortcut((KeyCode)277, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Turn Right", new KeyboardShortcut((KeyCode)278, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Turn CCW", new KeyboardShortcut((KeyCode)127, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Turn CW", new KeyboardShortcut((KeyCode)279, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Shift Up", new KeyboardShortcut((KeyCode)280, (KeyCode[])(object)new KeyCode[1] { (KeyCode)303 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Shift Down", new KeyboardShortcut((KeyCode)281, (KeyCode[])(object)new KeyCode[1] { (KeyCode)303 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Shift Left", new KeyboardShortcut((KeyCode)277, (KeyCode[])(object)new KeyCode[1] { (KeyCode)303 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Shift Right", new KeyboardShortcut((KeyCode)278, (KeyCode[])(object)new KeyCode[1] { (KeyCode)303 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Shift Forward", new KeyboardShortcut((KeyCode)127, (KeyCode[])(object)new KeyCode[1] { (KeyCode)303 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Shift Back", new KeyboardShortcut((KeyCode)279, (KeyCode[])(object)new KeyCode[1] { (KeyCode)303 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Size Up", new KeyboardShortcut((KeyCode)280, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Size Down", new KeyboardShortcut((KeyCode)281, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Manual Re-Tune Objects", new KeyboardShortcut((KeyCode)278, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Cycle Component", new KeyboardShortcut((KeyCode)277, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null),
			((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Save Adjustment", new KeyboardShortcut((KeyCode)127, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null)
		};
		AssetDataPlugin.Subscribe("org.lordashes.plugins.finetuneobjects.*", (Action<DatumChange>)GetHandleRequest, (Func<DatumChange, bool>)Checker.CheckSourceAsCreature);
		LoadFixes();
		ModdingUtils.AddPluginToMenuList((BaseUnityPlugin)(object)this, "Lord Ashes'");
	}

	private void Update()
	{
		//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_01ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00df: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ff: 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_0124: 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_0149: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		//IL_0175: Unknown result type (might be due to invalid IL or missing references)
		//IL_0197: 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_01be: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0597: Unknown result type (might be due to invalid IL or missing references)
		//IL_059c: Unknown result type (might be due to invalid IL or missing references)
		//IL_02af: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_031e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0345: Unknown result type (might be due to invalid IL or missing references)
		//IL_034a: Unknown result type (might be due to invalid IL or missing references)
		//IL_036c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0371: 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_0398: Unknown result type (might be due to invalid IL or missing references)
		//IL_076c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0771: Unknown result type (might be due to invalid IL or missing references)
		//IL_0484: Unknown result type (might be due to invalid IL or missing references)
		//IL_0489: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_04f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0518: Unknown result type (might be due to invalid IL or missing references)
		//IL_051d: Unknown result type (might be due to invalid IL or missing references)
		//IL_053f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0568: Unknown result type (might be due to invalid IL or missing references)
		//IL_056d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0941: Unknown result type (might be due to invalid IL or missing references)
		//IL_0946: Unknown result type (might be due to invalid IL or missing references)
		//IL_0659: Unknown result type (might be due to invalid IL or missing references)
		//IL_065e: Unknown result type (might be due to invalid IL or missing references)
		//IL_067e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0683: Unknown result type (might be due to invalid IL or missing references)
		//IL_06a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_06a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_06cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_06ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_06f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0714: Unknown result type (might be due to invalid IL or missing references)
		//IL_073d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0742: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b16: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b1b: Unknown result type (might be due to invalid IL or missing references)
		//IL_082e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0833: Unknown result type (might be due to invalid IL or missing references)
		//IL_0853: Unknown result type (might be due to invalid IL or missing references)
		//IL_0858: Unknown result type (might be due to invalid IL or missing references)
		//IL_0878: Unknown result type (might be due to invalid IL or missing references)
		//IL_087d: Unknown result type (might be due to invalid IL or missing references)
		//IL_089d: Unknown result type (might be due to invalid IL or missing references)
		//IL_08a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_08c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_08eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_08f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0912: Unknown result type (might be due to invalid IL or missing references)
		//IL_0917: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cf1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cf6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a03: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a08: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a28: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a2d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a4d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a52: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a72: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a77: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a97: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ac0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ac5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ae7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0aec: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ecc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ed1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bd8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bdd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bfd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c2a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c2f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c4f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c54: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c74: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c79: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c9b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ca0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cc2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cc7: Unknown result type (might be due to invalid IL or missing references)
		//IL_10a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_10ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_0db3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0db8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0dd8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e05: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e0a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e2a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e2f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e4f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e54: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e76: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e7b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e9d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ea2: Unknown result type (might be due to invalid IL or missing references)
		//IL_1284: Unknown result type (might be due to invalid IL or missing references)
		//IL_1289: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f8e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fbb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fc0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fe0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fe5: Unknown result type (might be due to invalid IL or missing references)
		//IL_1005: Unknown result type (might be due to invalid IL or missing references)
		//IL_100a: Unknown result type (might be due to invalid IL or missing references)
		//IL_102a: Unknown result type (might be due to invalid IL or missing references)
		//IL_102f: Unknown result type (might be due to invalid IL or missing references)
		//IL_1051: Unknown result type (might be due to invalid IL or missing references)
		//IL_1056: Unknown result type (might be due to invalid IL or missing references)
		//IL_1078: Unknown result type (might be due to invalid IL or missing references)
		//IL_107d: Unknown result type (might be due to invalid IL or missing references)
		//IL_1460: Unknown result type (might be due to invalid IL or missing references)
		//IL_1465: Unknown result type (might be due to invalid IL or missing references)
		//IL_116a: Unknown result type (might be due to invalid IL or missing references)
		//IL_1197: Unknown result type (might be due to invalid IL or missing references)
		//IL_119c: Unknown result type (might be due to invalid IL or missing references)
		//IL_11bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_11c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_11e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_11e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_1206: Unknown result type (might be due to invalid IL or missing references)
		//IL_120b: Unknown result type (might be due to invalid IL or missing references)
		//IL_122d: Unknown result type (might be due to invalid IL or missing references)
		//IL_1232: Unknown result type (might be due to invalid IL or missing references)
		//IL_1254: Unknown result type (might be due to invalid IL or missing references)
		//IL_1259: Unknown result type (might be due to invalid IL or missing references)
		//IL_163c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1641: Unknown result type (might be due to invalid IL or missing references)
		//IL_1346: Unknown result type (might be due to invalid IL or missing references)
		//IL_134b: Unknown result type (might be due to invalid IL or missing references)
		//IL_136b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1370: Unknown result type (might be due to invalid IL or missing references)
		//IL_1390: Unknown result type (might be due to invalid IL or missing references)
		//IL_13bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_13c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_13e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_13e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_1409: Unknown result type (might be due to invalid IL or missing references)
		//IL_140e: Unknown result type (might be due to invalid IL or missing references)
		//IL_1430: Unknown result type (might be due to invalid IL or missing references)
		//IL_1435: Unknown result type (might be due to invalid IL or missing references)
		//IL_1818: Unknown result type (might be due to invalid IL or missing references)
		//IL_181d: Unknown result type (might be due to invalid IL or missing references)
		//IL_1522: Unknown result type (might be due to invalid IL or missing references)
		//IL_1527: Unknown result type (might be due to invalid IL or missing references)
		//IL_1547: Unknown result type (might be due to invalid IL or missing references)
		//IL_154c: Unknown result type (might be due to invalid IL or missing references)
		//IL_156c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1599: Unknown result type (might be due to invalid IL or missing references)
		//IL_159e: Unknown result type (might be due to invalid IL or missing references)
		//IL_15be: Unknown result type (might be due to invalid IL or missing references)
		//IL_15c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_15e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_15ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_160c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1611: Unknown result type (might be due to invalid IL or missing references)
		//IL_19f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_19f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_16fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_1703: Unknown result type (might be due to invalid IL or missing references)
		//IL_1723: Unknown result type (might be due to invalid IL or missing references)
		//IL_1728: Unknown result type (might be due to invalid IL or missing references)
		//IL_1748: Unknown result type (might be due to invalid IL or missing references)
		//IL_174d: Unknown result type (might be due to invalid IL or missing references)
		//IL_176d: Unknown result type (might be due to invalid IL or missing references)
		//IL_1772: Unknown result type (might be due to invalid IL or missing references)
		//IL_1792: Unknown result type (might be due to invalid IL or missing references)
		//IL_1797: Unknown result type (might be due to invalid IL or missing references)
		//IL_17b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_17be: Unknown result type (might be due to invalid IL or missing references)
		//IL_17e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_1bf7: Unknown result type (might be due to invalid IL or missing references)
		//IL_1bfc: Unknown result type (might be due to invalid IL or missing references)
		//IL_18da: Unknown result type (might be due to invalid IL or missing references)
		//IL_18df: Unknown result type (might be due to invalid IL or missing references)
		//IL_18ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_1904: Unknown result type (might be due to invalid IL or missing references)
		//IL_1924: Unknown result type (might be due to invalid IL or missing references)
		//IL_1929: Unknown result type (might be due to invalid IL or missing references)
		//IL_1949: Unknown result type (might be due to invalid IL or missing references)
		//IL_194e: Unknown result type (might be due to invalid IL or missing references)
		//IL_196e: Unknown result type (might be due to invalid IL or missing references)
		//IL_1973: Unknown result type (might be due to invalid IL or missing references)
		//IL_1995: Unknown result type (might be due to invalid IL or missing references)
		//IL_199a: Unknown result type (might be due to invalid IL or missing references)
		//IL_19bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_1c8b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1c90: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ddf: Unknown result type (might be due to invalid IL or missing references)
		//IL_1de4: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e07: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e0c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e2f: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e34: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e57: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e5c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e7f: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e84: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ea7: Unknown result type (might be due to invalid IL or missing references)
		//IL_1eac: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ecf: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ed4: Unknown result type (might be due to invalid IL or missing references)
		//IL_1b3f: Unknown result type (might be due to invalid IL or missing references)
		//IL_1b46: Expected O, but got Unknown
		float num = (IsCapsLockOn() ? 1f : 5f);
		KeyboardShortcut value = triggerKeys[0].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array, 0);
			object obj = array[1];
			if (obj != null)
			{
				object value2 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj);
				GameObject @object = GetObject(seekTypes[affectedComponent], obj);
				AssetDataPlugin.SetInfo(value2.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], @object.transform.localPosition.x + "," + @object.transform.localPosition.y + "," + @object.transform.localPosition.z + "," + (@object.transform.localEulerAngles.x + num) + "," + @object.transform.localEulerAngles.y + "," + @object.transform.localEulerAngles.z + "," + @object.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[1].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array2 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array2, 0);
			object obj2 = array2[1];
			if (obj2 != null)
			{
				object value3 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj2);
				GameObject object2 = GetObject(seekTypes[affectedComponent], obj2);
				AssetDataPlugin.SetInfo(value3.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object2.transform.localPosition.x + "," + object2.transform.localPosition.y + "," + object2.transform.localPosition.z + "," + (object2.transform.localEulerAngles.x - num) + "," + object2.transform.localEulerAngles.y + "," + object2.transform.localEulerAngles.z + "," + object2.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[2].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array3 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array3, 0);
			object obj3 = array3[1];
			if (obj3 != null)
			{
				object value4 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj3);
				GameObject object3 = GetObject(seekTypes[affectedComponent], obj3);
				AssetDataPlugin.SetInfo(value4.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object3.transform.localPosition.x + "," + object3.transform.localPosition.y + "," + object3.transform.localPosition.z + "," + object3.transform.localEulerAngles.x + "," + object3.transform.localEulerAngles.y + "," + (object3.transform.localEulerAngles.z + num) + "," + object3.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[3].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array4 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array4, 0);
			object obj4 = array4[1];
			if (obj4 != null)
			{
				object value5 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj4);
				GameObject object4 = GetObject(seekTypes[affectedComponent], obj4);
				AssetDataPlugin.SetInfo(value5.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object4.transform.localPosition.x + "," + object4.transform.localPosition.y + "," + object4.transform.localPosition.z + "," + object4.transform.localEulerAngles.x + "," + object4.transform.localEulerAngles.y + "," + (object4.transform.localEulerAngles.z - num) + "," + object4.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[4].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array5 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array5, 0);
			object obj5 = array5[1];
			if (obj5 != null)
			{
				object value6 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj5);
				GameObject object5 = GetObject(seekTypes[affectedComponent], obj5);
				AssetDataPlugin.SetInfo(value6.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object5.transform.localPosition.x + "," + object5.transform.localPosition.y + "," + object5.transform.localPosition.z + "," + object5.transform.localEulerAngles.x + "," + (object5.transform.localEulerAngles.y + num) + "," + object5.transform.localEulerAngles.z + "," + object5.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[5].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array6 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array6, 0);
			object obj6 = array6[1];
			if (obj6 != null)
			{
				object value7 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj6);
				GameObject object6 = GetObject(seekTypes[affectedComponent], obj6);
				AssetDataPlugin.SetInfo(value7.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object6.transform.localPosition.x + "," + object6.transform.localPosition.y + "," + object6.transform.localPosition.z + "," + object6.transform.localEulerAngles.x + "," + (object6.transform.localEulerAngles.y - num) + "," + object6.transform.localEulerAngles.z + "," + object6.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[6].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array7 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array7, 0);
			object obj7 = array7[1];
			if (obj7 != null)
			{
				object value8 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj7);
				GameObject object7 = GetObject(seekTypes[affectedComponent], obj7);
				AssetDataPlugin.SetInfo(value8.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object7.transform.localPosition.x + "," + (object7.transform.localPosition.y + num / 50f) + "," + object7.transform.localPosition.z + "," + object7.transform.localEulerAngles.x + "," + object7.transform.localEulerAngles.y + "," + object7.transform.localEulerAngles.z + "," + object7.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[7].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array8 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array8, 0);
			object obj8 = array8[1];
			if (obj8 != null)
			{
				object value9 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj8);
				GameObject object8 = GetObject(seekTypes[affectedComponent], obj8);
				AssetDataPlugin.SetInfo(value9.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object8.transform.localPosition.x + "," + (object8.transform.localPosition.y - num / 50f) + "," + object8.transform.localPosition.z + "," + object8.transform.localEulerAngles.x + "," + object8.transform.localEulerAngles.y + "," + object8.transform.localEulerAngles.z + "," + object8.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[8].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array9 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array9, 0);
			object obj9 = array9[1];
			if (obj9 != null)
			{
				object value10 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj9);
				GameObject object9 = GetObject(seekTypes[affectedComponent], obj9);
				AssetDataPlugin.SetInfo(value10.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object9.transform.localPosition.x + num / 50f + "," + object9.transform.localPosition.y + "," + object9.transform.localPosition.z + "," + object9.transform.localEulerAngles.x + "," + object9.transform.localEulerAngles.y + "," + object9.transform.localEulerAngles.z + "," + object9.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[9].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array10 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array10, 0);
			object obj10 = array10[1];
			if (obj10 != null)
			{
				object value11 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj10);
				GameObject object10 = GetObject(seekTypes[affectedComponent], obj10);
				AssetDataPlugin.SetInfo(value11.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object10.transform.localPosition.x - num / 50f + "," + object10.transform.localPosition.y + "," + object10.transform.localPosition.z + "," + object10.transform.localEulerAngles.x + "," + object10.transform.localEulerAngles.y + "," + object10.transform.localEulerAngles.z + "," + object10.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[10].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array11 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array11, 0);
			object obj11 = array11[1];
			if (obj11 != null)
			{
				object value12 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj11);
				GameObject object11 = GetObject(seekTypes[affectedComponent], obj11);
				AssetDataPlugin.SetInfo(value12.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object11.transform.localPosition.x + "," + object11.transform.localPosition.y + "," + (object11.transform.localPosition.z + num / 50f) + "," + object11.transform.localEulerAngles.x + "," + object11.transform.localEulerAngles.y + "," + object11.transform.localEulerAngles.z + "," + object11.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[11].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array12 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array12, 0);
			object obj12 = array12[1];
			if (obj12 != null)
			{
				object value13 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj12);
				GameObject object12 = GetObject(seekTypes[affectedComponent], obj12);
				AssetDataPlugin.SetInfo(value13.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object12.transform.localPosition.x + "," + object12.transform.localPosition.y + "," + (object12.transform.localPosition.z - num / 50f) + "," + object12.transform.localEulerAngles.x + "," + object12.transform.localEulerAngles.y + "," + object12.transform.localEulerAngles.z + "," + object12.transform.localScale.x, false);
			}
			return;
		}
		value = triggerKeys[12].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array13 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array13, 0);
			object obj13 = array13[1];
			if (obj13 != null)
			{
				object value14 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj13);
				GameObject object13 = GetObject(seekTypes[affectedComponent], obj13);
				AssetDataPlugin.SetInfo(value14.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object13.transform.localPosition.x + "," + object13.transform.localPosition.y + "," + object13.transform.localPosition.z + "," + object13.transform.localEulerAngles.x + "," + object13.transform.localEulerAngles.y + "," + object13.transform.localEulerAngles.z + "," + (object13.transform.localScale.x + num / 50f), false);
			}
			return;
		}
		value = triggerKeys[13].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			object[] array14 = new object[2]
			{
				Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
				null
			};
			Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array14, 0);
			object obj14 = array14[1];
			if (obj14 != null)
			{
				object value15 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(obj14);
				GameObject object14 = GetObject(seekTypes[affectedComponent], obj14);
				AssetDataPlugin.SetInfo(value15.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[affectedComponent], object14.transform.localPosition.x + "," + object14.transform.localPosition.y + "," + object14.transform.localPosition.z + "," + object14.transform.localEulerAngles.x + "," + object14.transform.localEulerAngles.y + "," + object14.transform.localEulerAngles.z + "," + (object14.transform.localScale.x - 0.1f), false);
			}
			return;
		}
		value = triggerKeys[14].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			LoggingPlugin.LogDebug("Reaplying Fine Tube adjustments");
			{
				foreach (KeyValuePair<string, string> fix in fixes)
				{
					LoggingPlugin.LogDebug("Found " + fix.Key + " => " + fix.Value);
					LoggingPlugin.LogDebug("Getting All Assets");
					object obj15 = Reflection.Execute(Reflection.Method(_CreaturePresenter, "GetTempReadOnlyViewOfAllCreatureAssets", (string[])null), (object)null, new object[0], 0);
					if (!(obj15 is IEnumerable enumerable))
					{
						continue;
					}
					foreach (object item in enumerable)
					{
						object value16 = Reflection.Property(_CreatureBoardAsset, "ActiveMorphAddress", (string)null).GetValue(item);
						object obj16 = Reflection.Execute(Reflection.Method(_InternedContentAddress, "ToString", (string[])null), value16, new object[0], 0);
						if (fix.Key.StartsWith(obj16.ToString()))
						{
							LoggingPlugin.LogDebug("Found matching asset. Requesting application");
							object value17 = Reflection.Property(_CreatureBoardAsset, "CreatureId", (string)null).GetValue(item);
							GameObject val = (GameObject)Reflection.Property(_CreatureBoardAsset, "gameObject", (string)null).GetValue(item);
							GameObject val2 = SearchForObject(fix.Key.Substring(fix.Key.LastIndexOf(".") + 1), val.transform);
							((MonoBehaviour)_self).StartCoroutine(AttachAdjustment(value17.ToString(), "org.lordashes.plugins.finetuneobjects." + seekTypes[1], fix.Value));
						}
					}
				}
				return;
			}
		}
		value = triggerKeys[15].Value;
		if (((KeyboardShortcut)(ref value)).IsUp())
		{
			affectedComponent++;
			if (affectedComponent >= seekTypes.Length)
			{
				affectedComponent = 0;
			}
			LoggingPlugin.LogDebug("Switching to affecting " + seekTypes[affectedComponent]);
			DisplayMessage("Fine Tune Plugin Operating On " + seekTypes[affectedComponent]);
			return;
		}
		value = triggerKeys[16].Value;
		if (!((KeyboardShortcut)(ref value)).IsUp())
		{
			return;
		}
		LoggingPlugin.LogDebug("Saving Aura Position On This Creature");
		object[] array15 = new object[2]
		{
			Reflection.Property(_LocalClient, "SelectedCreatureId", (string)null).GetValue(null),
			null
		};
		object obj17 = Reflection.Execute(Reflection.Method(_CreaturePresenter, "TryGetAsset", (string[])null), (object)null, array15, 2);
		GameObject[] aurasOnAsset = GetAurasOnAsset(obj17);
		LoggingPlugin.LogDebug("Found " + aurasOnAsset.Length + " Auras On This Creature");
		GameObject[] array16 = aurasOnAsset;
		foreach (GameObject val3 in array16)
		{
			object value18 = Reflection.Property(_CreatureBoardAsset, "ActiveMorphAddress", (string)null).GetValue(obj17);
			object obj18 = Reflection.Execute(Reflection.Method(_InternedContentAddress, "ToString", (string[])null), value18, new object[0], 0);
			LoggingPlugin.LogDebug("Saving Aura '" + ((Object)val3).name.Substring(((Object)val3).name.LastIndexOf(".") + 1) + "' Position On This Creature");
			string key = obj18?.ToString() + "." + ((Object)val3).name.Substring(((Object)val3).name.LastIndexOf(".") + 1);
			string text = "";
			text = text + val3.transform.localPosition.x + ",";
			text = text + val3.transform.localPosition.y + ",";
			text = text + val3.transform.localPosition.z + ",";
			text = text + val3.transform.localEulerAngles.x + ",";
			text = text + val3.transform.localEulerAngles.y + ",";
			text = text + val3.transform.localEulerAngles.z + ",";
			text += val3.transform.localScale.x;
			LoggingPlugin.LogDebug("Aura '" + ((Object)val3).name.Substring(((Object)val3).name.LastIndexOf(".") + 1) + "' Save = " + text);
			if (fixes.ContainsKey(key))
			{
				fixes[key] = text;
			}
			else
			{
				fixes.Add(key, text);
			}
			DisplayMessage("Save Aura '" + ((Object)val3).name.Substring(((Object)val3).name.LastIndexOf(".") + 1) + "' On Selected Creature");
		}
		SaveFixes();
	}

	public static GameObject[] GetAurasOnAsset(object asset)
	{
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Expected O, but got Unknown
		List<GameObject> list = new List<GameObject>();
		object value = Reflection.Property(_CreatureBoardAsset, "Link", (string)null).GetValue(asset);
		LoggingPlugin.LogDebug("Link = " + ((value != null) ? value.ToString() : "{Null}"));
		string text = "";
		if (value != null)
		{
			text = (from t in value.ToString().Split(new string[3] { "=", ";", "&" }, StringSplitOptions.None)
				where t.StartsWith(seekTypes[1])
				select t).FirstOrDefault();
			if (text != null && text != "")
			{
				LoggingPlugin.LogDebug("Trying to locate object for aura '" + text.Substring(text.IndexOf("@") + 1) + "'");
				GameObject val = (GameObject)Reflection.Property(_CreatureBoardAsset, "gameObject", (string)null).GetValue(asset);
				GameObject val2 = SearchForObject(text.Substring(text.IndexOf("@") + 1), val.transform);
				if ((Object)(object)val2 != (Object)null)
				{
					list.Add(val2);
				}
			}
		}
		return list.ToArray();
	}

	public static GameObject GetObject(string typeName, object asset)
	{
		//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d2: Expected O, but got Unknown
		//IL_0113: Unknown result type (might be due to invalid IL or missing references)
		//IL_011a: Expected O, but got Unknown
		object value = Reflection.Property(_CreatureBoardAsset, "Link", (string)null).GetValue(asset);
		LoggingPlugin.LogDebug("Link = " + ((value != null) ? value.ToString() : "{Null}"));
		string text = "";
		if (value != null)
		{
			text = (from t in value.ToString().Split(new string[3] { "=", ";", "&" }, StringSplitOptions.None)
				where t.StartsWith(typeName)
				select t).FirstOrDefault();
			if (text != null && text != "")
			{
				text = text.Substring(text.IndexOf("@") + 1);
				LoggingPlugin.LogDebug("Asset had " + typeName + " '" + text + "'");
				GameObject val = (GameObject)Reflection.Property(_CreatureBoardAsset, "gameObject", (string)null).GetValue(asset);
				GameObject val2 = SearchForObject("." + text, val.transform);
				LoggingPlugin.LogDebug("Found GameObject Named " + ((Object)val2).name);
				return val2;
			}
			if (typeName != seekTypes[0])
			{
				LoggingPlugin.LogDebug("Asset has no type '" + typeName + "'");
				return null;
			}
		}
		if (typeName == seekTypes[0])
		{
			LoggingPlugin.LogDebug("Core creature seeking AssetLoader");
			GameObject val3 = (GameObject)Reflection.Property(_CreatureBoardAsset, "gameObject", (string)null).GetValue(asset);
			GameObject val4 = SearchForObject("AssetLoader", val3.transform);
			val4 = ((Component)val4.transform.GetChild(0)).gameObject;
			LoggingPlugin.LogDebug("Found GameObject Named " + ((Object)val4).name);
			return val4;
		}
		return null;
	}

	public static GameObject SearchForObject(string seekName, Transform level, int depth = 0)
	{
		LoggingPlugin.LogDebug("Searching For " + seekName + ": Level " + depth + ": " + ((Object)level).name);
		if (((Object)level).name.EndsWith(seekName))
		{
			LoggingPlugin.LogDebug("Found " + ((Object)level).name);
			return ((Component)level).gameObject;
		}
		for (int i = 0; i < level.childCount; i++)
		{
			GameObject val = SearchForObject(seekName, level.GetChild(i), depth + 1);
			if ((Object)(object)val != (Object)null)
			{
				return val;
			}
		}
		return null;
	}

	public static void DisplayMessage(string text, float displayTime = 2.5f, float posOffset = 0f)
	{
		LoggingPlugin.LogDebug("Invoking The Method");
		Reflection.Execute(Reflection.Method(Reflection.Type("SystemMessage", (string[])null, (string[])null, 0), "DisplayInfoText", new string[4] { "System.String", "System.Single", "System.Single", "System.Action" }), (object)null, new object[4] { text, displayTime, posOffset, null }, 0);
	}

	public static bool IsCapsLockOn()
	{
		return (GetKeyState(20) & 1) != 0;
	}

	public static void LoadFixes()
	{
		string text = File.Find("org.lordashes.plugins.finetuneobjects.Fixes.json", (CacheType)999).FirstOrDefault();
		if (text != null && text != "")
		{
			string text2 = File.ReadAllText(text, (CacheType)999);
			fixes = JsonConvert.DeserializeObject<Dictionary<string, string>>(text2);
		}
		else
		{
			fixes = new Dictionary<string, string>();
		}
	}

	public static void SaveFixes()
	{
		LoggingPlugin.LogDebug("Getting save location");
		string text = File.Find("org.lordashes.plugins.finetuneobjects.Fixes.json", (CacheType)999).FirstOrDefault();
		if (text == null || text == "")
		{
			LoggingPlugin.LogDebug("Fixes file does not exists. Making a new one");
			text = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\CustomData\\config\\org.lordashes.plugins.finetuneobjects.Fixes.json";
			if (!Directory.Exists(Path.GetDirectoryName(text)))
			{
				Directory.CreateDirectory(Path.GetDirectoryName(text));
			}
		}
		LoggingPlugin.LogDebug("Saving fixes to " + text);
		string text2 = JsonConvert.SerializeObject((object)fixes, (Formatting)1);
		File.WriteAllText(text, text2, (CacheType)999);
	}

	[IteratorStateMachine(typeof(<AttachAdjustment>d__31))]
	public static IEnumerator AttachAdjustment(string source, string key, string data)
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <AttachAdjustment>d__31(0)
		{
			source = source,
			key = key,
			data = data
		};
	}
}