Decompiled source of MoarForest v1.0.5

MoarForest.dll

Decompiled a year ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using Construction;
using HarmonyLib;
using Il2CppInterop.Runtime.Injection;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using Microsoft.CodeAnalysis;
using Sons.Inventory;
using Sons.Items.Core;
using Steamworks;
using TheForest.Utils;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("MoarForest")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("This Mod is a GameBreaker, more, a GameBreaking Changer and Beteigeuze.")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1")]
[assembly: AssemblyProduct("MoarForest")]
[assembly: AssemblyTitle("MoarForest")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace MoarForest
{
	public class Main
	{
		public class MyMonoBehaviour : MonoBehaviour
		{
			private static List<ItemData> itemList;

			private static bool isInitialized = false;

			private Vector2 scrollPosition = Vector2.zero;

			public static Camera _cameraMain;

			public static HashSet<Structure> _dirtyStructures;

			public static Scene _sonsMainScene;

			public static string ItemIDLog1 = "406";

			public static string ItemIDLog2 = "408";

			public static string ItemIDLog3 = "409";

			public static string ItemIDLog4 = "78";

			public static string ItemIDStone = "640";

			public static string AmountTextField = "1";

			public float holdThrow = 500f;

			private float holdTimer;

			private bool thatThingHappened;

			private bool menuVisible = true;

			private int logType;

			private void OnGUI()
			{
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_0068: Unknown result type (might be due to invalid IL or missing references)
				//IL_006d: Unknown result type (might be due to invalid IL or missing references)
				//IL_008d: Unknown result type (might be due to invalid IL or missing references)
				//IL_00be: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
				if (LocalPlayer.IsInWorld && menuVisible)
				{
					UIHelper.Begin("MoarForest Gui", Screen.width - 200, 10f, 190f, 80f, 2f, 20f, 2f);
					UIHelper.DrawLine(new Vector2((float)(Screen.width - 190), 30f), new Vector2((float)(Screen.width - 20), 30f), Color.white, 1f);
					UIHelper.DrawString(new Vector2((float)(Screen.width - 190), 40f), string.Format("{0}{1}", "LogHack: ", LocalPlayer.Inventory.HeldOnlyItemController.InfiniteHack ? "<color=green>ON</color>" : "<color=red>OFF</color>"), Color.white, 12, centered: false);
					UIHelper.DrawString(new Vector2((float)(Screen.width - 190), 60f), "toggle by GuiHotkey", Color.gray, 10, centered: false);
				}
			}

			private void Start()
			{
				holdTimer = holdThrow;
			}

			private void Update()
			{
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				RegisterHandlers();
				if (!((Scene)(ref _sonsMainScene)).isLoaded)
				{
					_sonsMainScene = SceneManager.GetSceneByName("SonsMain");
				}
				if ((Object)(object)_cameraMain == (Object)null)
				{
					_cameraMain = Camera.main ?? null;
				}
				_ = LocalPlayer.IsInWorld;
			}

			private void RegisterHandlers()
			{
				dropItem();
				Keybinds();
			}

			private int setNewLogType(int bType)
			{
				int num = bType;
				num++;
				if (num > 3)
				{
					num = 0;
				}
				return num;
			}

			private void DeleteAll()
			{
				if (!LocalPlayer.Inventory.IsRightHandEmpty())
				{
					if (LocalPlayer.Inventory.HeldOnlyItemController.InfiniteHack)
					{
						LocalPlayer.Inventory.HeldOnlyItemController.InfiniteHack = false;
					}
					for (int i = 0; i < 4; i++)
					{
						LocalPlayer.Inventory.HeldOnlyItemController.PutDown(false, false, true, (GameObject)null, -1, -1f);
					}
				}
			}

			private void DeleteSingle()
			{
				if (!LocalPlayer.Inventory.IsRightHandEmpty())
				{
					if (LocalPlayer.Inventory.HeldOnlyItemController.InfiniteHack)
					{
						LocalPlayer.Inventory.HeldOnlyItemController.InfiniteHack = false;
					}
					LocalPlayer.Inventory.HeldOnlyItemController.PutDown(false, false, true, (GameObject)null, -1, -1f);
				}
			}

			private void dropItem()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
				//IL_010e: Unknown result type (might be due to invalid IL or missing references)
				if (Input.GetKeyUp(Plugin.ItemDrop.Value))
				{
					thatThingHappened = false;
				}
				if (!Input.GetKey((KeyCode)304) || !LocalPlayer.IsInWorld)
				{
					return;
				}
				ItemInstance rightHandItem = LocalPlayer.Inventory.RightHandItem;
				if (rightHandItem == null)
				{
					return;
				}
				string text = ((Object)LocalPlayer.Inventory.RightHandItem.ItemObject).name;
				text.Substring(text.Length - 4);
				string text2 = "Held";
				string text3 = "2Held";
				if (text.Contains(text3))
				{
					text = text.Replace(text3, "");
				}
				if (text.Contains(text2))
				{
					text = text.Replace(text2, "");
				}
				if (thatThingHappened)
				{
					return;
				}
				if (Input.GetKeyDown(Plugin.ItemDrop.Value))
				{
					holdTimer -= Time.deltaTime;
					if (holdTimer < 0f)
					{
						thatThingHappened = true;
					}
					LocalPlayer.Inventory.DropItem(rightHandItem, true);
					LocalPlayer.Inventory.RemoveItem(rightHandItem._itemID, 1, false, true, true, (ItemInstance)null, true);
					SteamUser.GetSteamID();
					SteamFriends.GetPersonaName();
					HudGui.Instance.DisplayGeneralMessage("\" + SteamFriends.GetPersonaName(), dropped: " + text + "\"", 3f, (ItemUiData)null);
					thatThingHappened = true;
				}
				else
				{
					holdTimer = holdThrow;
				}
			}

			private void Keybinds()
			{
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				//IL_0058: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_010e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0135: Unknown result type (might be due to invalid IL or missing references)
				//IL_015c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0287: Unknown result type (might be due to invalid IL or missing references)
				//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
				//IL_035f: Unknown result type (might be due to invalid IL or missing references)
				//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
				//IL_0437: Unknown result type (might be due to invalid IL or missing references)
				if (Input.GetKeyDown(Plugin.GUI.Value))
				{
					if (menuVisible)
					{
						menuVisible = false;
						HudGui.Instance.DisplayGeneralMessage("\"User Interface Off\"", 1.2f, (ItemUiData)null);
					}
					else
					{
						menuVisible = true;
						HudGui.Instance.DisplayGeneralMessage("\"User Interface On\"", 1.2f, (ItemUiData)null);
					}
				}
				else if (Input.GetKeyDown(Plugin.LogHackToggle.Value))
				{
					if (!LocalPlayer.Inventory.IsRightHandEmpty())
					{
						if (LocalPlayer.Inventory.HeldOnlyItemController.InfiniteHack)
						{
							LocalPlayer.Inventory.HeldOnlyItemController.InfiniteHack = false;
							HudGui.Instance.DisplayGeneralMessage("\"LogHack Off\"", 1.2f, (ItemUiData)null);
						}
						else
						{
							LocalPlayer.Inventory.HeldOnlyItemController.InfiniteHack = true;
							HudGui.Instance.DisplayGeneralMessage("\"LogHack On\"", 1.2f, (ItemUiData)null);
						}
					}
				}
				else if (Input.GetKeyDown(Plugin.ThrowShoulder.Value))
				{
					if (!LocalPlayer.Inventory.IsRightHandEmpty())
					{
						LocalPlayer.Inventory.SkipNextAddItemWoosh = true;
						LocalPlayer.Inventory.StashRightHandItem(true, false, false);
					}
				}
				else if (Input.GetKeyDown(Plugin.VoidSingle.Value))
				{
					if (!LocalPlayer.Inventory.IsRightHandEmpty())
					{
						DeleteSingle();
					}
				}
				else if (Input.GetKeyDown(Plugin.VoidShoulder.Value))
				{
					if (!LocalPlayer.Inventory.IsRightHandEmpty())
					{
						DeleteAll();
					}
				}
				else if (Input.GetKeyDown(Plugin.LogToggle.Value))
				{
					LocalPlayer.Inventory.Logs.RemoveLog(false, true);
					if (LocalPlayer.Inventory.Logs.Amount < 2)
					{
						if (logType == 0)
						{
							LocalPlayer.Inventory.AddItem(int.Parse(ItemIDLog1), int.Parse(AmountTextField), false, false, (ItemInstance)null);
						}
						else if (logType == 1)
						{
							LocalPlayer.Inventory.AddItem(int.Parse(ItemIDLog2), int.Parse(AmountTextField), false, false, (ItemInstance)null);
						}
						else if (logType == 2)
						{
							LocalPlayer.Inventory.AddItem(int.Parse(ItemIDLog3), int.Parse(AmountTextField), false, false, (ItemInstance)null);
						}
						else if (logType == 3)
						{
							LocalPlayer.Inventory.AddItem(int.Parse(ItemIDLog4), int.Parse(AmountTextField), false, false, (ItemInstance)null);
						}
						HudGui.Instance.DisplayGeneralMessage("\"Log_" + logType + "\"", 1.2f, (ItemUiData)null);
						logType = setNewLogType(logType);
					}
				}
				else if (Input.GetKeyDown(Plugin.Log4.Value))
				{
					LocalPlayer.Inventory.Logs.RemoveLog(false, false);
					if (LocalPlayer.Inventory.Logs.Amount < 2)
					{
						LocalPlayer.Inventory.AddItem(int.Parse(ItemIDLog4), int.Parse(AmountTextField), false, false, (ItemInstance)null);
					}
					HudGui.Instance.DisplayGeneralMessage("\"Log4\"", 1.2f, (ItemUiData)null);
				}
				else if (Input.GetKeyDown(Plugin.Log3.Value))
				{
					LocalPlayer.Inventory.Logs.RemoveLog(false, false);
					if (LocalPlayer.Inventory.Logs.Amount < 2)
					{
						LocalPlayer.Inventory.AddItem(int.Parse(ItemIDLog3), int.Parse(AmountTextField), false, false, (ItemInstance)null);
					}
					HudGui.Instance.DisplayGeneralMessage("\"Log3\"", 1.2f, (ItemUiData)null);
				}
				else if (Input.GetKeyDown(Plugin.Log2.Value))
				{
					LocalPlayer.Inventory.Logs.RemoveLog(false, false);
					if (LocalPlayer.Inventory.Logs.Amount < 2)
					{
						LocalPlayer.Inventory.AddItem(int.Parse(ItemIDLog2), int.Parse(AmountTextField), false, false, (ItemInstance)null);
					}
					HudGui.Instance.DisplayGeneralMessage("\"Log2\"", 1.2f, (ItemUiData)null);
				}
				else if (Input.GetKeyDown(Plugin.Log1.Value))
				{
					LocalPlayer.Inventory.Logs.RemoveLog(false, false);
					if (LocalPlayer.Inventory.Logs.Amount < 2)
					{
						LocalPlayer.Inventory.AddItem(int.Parse(ItemIDLog1), int.Parse(AmountTextField), false, false, (ItemInstance)null);
					}
					HudGui.Instance.DisplayGeneralMessage("\"Log1\"", 1.2f, (ItemUiData)null);
				}
				else if (Input.GetKeyDown(Plugin.Stone.Value))
				{
					if (LocalPlayer.Inventory.Logs.HasLogs)
					{
						LocalPlayer.Inventory.Logs.RemoveLog(false, false);
						LocalPlayer.Inventory.DropRightHandItem(false);
					}
					LocalPlayer.Inventory.AddItem(int.Parse(ItemIDStone), int.Parse(AmountTextField), false, false, (ItemInstance)null);
					HudGui.Instance.DisplayGeneralMessage("\"Stone\"", 1.2f, (ItemUiData)null);
				}
			}
		}
	}
	[BepInPlugin("helgenius_MoarForest", "MoarForest", "1.0.5")]
	public class Plugin : BasePlugin
	{
		public const string MODNAME = "MoarForest";

		public const string AUTHOR = "helgenius";

		public const string GUID = "helgenius_MoarForest";

		public const string VERSION = "1.0.5";

		public static ConfigFile ConfigFile = new ConfigFile(Path.Combine(Paths.ConfigPath, "MoarForest.cfg"), true);

		public static ConfigEntry<KeyCode> GUI = ConfigFile.Bind<KeyCode>("Hotkeys", "GUI", (KeyCode)264, "Toggle User Interface");

		public static ConfigEntry<KeyCode> LogHackToggle = ConfigFile.Bind<KeyCode>("Hotkeys", "LogHack", (KeyCode)256, "Toggle infinite Build Logs/Stones");

		public static ConfigEntry<KeyCode> ThrowShoulder = ConfigFile.Bind<KeyCode>("Hotkeys", "ThrowShoulder", (KeyCode)258, "Throw all from Shoulders instead one by one");

		public static ConfigEntry<KeyCode> VoidSingle = ConfigFile.Bind<KeyCode>("Hotkeys", "VoidSingle", (KeyCode)260, "Void/Delete one by one");

		public static ConfigEntry<KeyCode> VoidShoulder = ConfigFile.Bind<KeyCode>("Hotkeys", "VoidShoulder", (KeyCode)262, "Void/Delete all from Shoulders");

		public static ConfigEntry<KeyCode> ItemDrop = ConfigFile.Bind<KeyCode>("Hotkeys", "ItemDrop", (KeyCode)103, "Drop Item from Hand with LeftShift +/and this Hotkey");

		public static ConfigEntry<KeyCode> LogToggle = ConfigFile.Bind<KeyCode>("Hotkeys", "LogToggle", (KeyCode)261, "Toggle between all LogTypes");

		public static ConfigEntry<KeyCode> Log1 = ConfigFile.Bind<KeyCode>("Hotkeys", "Log1", (KeyCode)276, "Switch Log to Length 1");

		public static ConfigEntry<KeyCode> Log2 = ConfigFile.Bind<KeyCode>("Hotkeys", "Log2", (KeyCode)274, "Switch Log to Length 2");

		public static ConfigEntry<KeyCode> Log3 = ConfigFile.Bind<KeyCode>("Hotkeys", "Log3", (KeyCode)275, "Switch Log to Length 3");

		public static ConfigEntry<KeyCode> Log4 = ConfigFile.Bind<KeyCode>("Hotkeys", "Log4", (KeyCode)273, "Switch Log to Length 4");

		public static ConfigEntry<KeyCode> Stone = ConfigFile.Bind<KeyCode>("Hotkeys", "Stone", (KeyCode)281, "Switch to Stones/Rocks");

		public static ManualLogSource log;

		public Plugin()
		{
			log = ((BasePlugin)this).Log;
		}

		public override void Load()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Expected O, but got Unknown
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			bool flag = default(bool);
			try
			{
				ClassInjector.RegisterTypeInIl2Cpp<Main.MyMonoBehaviour>();
				GameObject val = new GameObject("CoolObject");
				val.AddComponent<Main.MyMonoBehaviour>();
				((Object)val).hideFlags = (HideFlags)61;
				Object.DontDestroyOnLoad((Object)val);
			}
			catch
			{
				ManualLogSource obj = log;
				BepInExErrorLogInterpolatedStringHandler val2 = new BepInExErrorLogInterpolatedStringHandler(48, 0, ref flag);
				if (flag)
				{
					((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("FAILED to Register Il2Cpp Type: MyMonoBehaviour!");
				}
				obj.LogError(val2);
			}
			try
			{
				Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null);
			}
			catch
			{
				ManualLogSource obj3 = log;
				BepInExErrorLogInterpolatedStringHandler val2 = new BepInExErrorLogInterpolatedStringHandler(27, 0, ref flag);
				if (flag)
				{
					((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("FAILED to register patches!");
				}
				obj3.LogError(val2);
			}
		}
	}
	public static class UIHelper
	{
		private static float x;

		private static float y;

		private static float width;

		private static float height;

		private static float margin;

		private static float controlHeight;

		private static float controlDist;

		private static float nextControlY;

		public static GUIStyle StringStyle { get; set; } = new GUIStyle(GUI.skin.label);


		public static void Begin(string text, float _x, float _y, float _width, float _height, float _margin, float _controlHeight, float _controlDist)
		{
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			x = _x;
			y = _y;
			width = _width;
			height = _height;
			margin = _margin;
			controlHeight = _controlHeight;
			controlDist = _controlDist;
			nextControlY = 20f;
			GUI.Box(new Rect(x, y, width, height), text);
		}

		private static Rect NextControlRect()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			Rect result = new Rect(x + margin, nextControlY + y, width - margin * 2f, controlHeight);
			nextControlY += controlHeight + controlDist;
			return result;
		}

		public static string MakeEnable(string text, bool state)
		{
			return string.Format("{0}{1}", text, state ? "<color=green>ON</color>" : "<color=red>OFF</color>");
		}

		public static bool Button(string text, bool state)
		{
			return Button(MakeEnable(text, state)) != state;
		}

		public static bool Button(string text)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return GUI.Button(NextControlRect(), text);
		}

		public static void Label(string text, float value, int decimals = 2)
		{
			Label($"{text}{Math.Round((double)value, 2).ToString()}");
		}

		public static void Label(string text)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			GUI.Label(NextControlRect(), text);
		}

		public static float Slider(float val, float min, float max)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return GUI.HorizontalSlider(NextControlRect(), val, min, max);
		}

		public static bool DrawString(Vector2 position, string label, Color color, int fontSize, bool centered = true)
		{
			//IL_0000: 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_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_002e: 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_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			GUI.color = color;
			StringStyle.fontSize = fontSize;
			StringStyle.normal.textColor = color;
			GUIContent val = new GUIContent(label);
			Vector2 val2 = StringStyle.CalcSize(val);
			GUI.Label(new Rect(centered ? (position - val2 / 2f) : position, val2), val, StringStyle);
			return true;
		}

		public static void DrawLine(Vector2 start, Vector2 end, Color color, float width)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: 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_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			GUI.depth = 0;
			Vector2 val = end - start;
			float num = 57.29578f * Mathf.Atan(val.y / val.x);
			if (val.x < 0f)
			{
				num += 180f;
			}
			int num2 = (int)Mathf.Ceil(width / 2f);
			GUIUtility.RotateAroundPivot(num, start);
			GUI.color = color;
			GUI.DrawTexture(new Rect(start.x, start.y - (float)num2, ((Vector2)(ref val)).magnitude, width), (Texture)(object)Texture2D.whiteTexture, (ScaleMode)0);
			GUIUtility.RotateAroundPivot(0f - num, start);
		}

		public static void DrawBox(Vector2 position, Vector2 size, Color color, bool centered = true)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (centered)
			{
				position -= size / 2f;
			}
			GUI.color = color;
			GUI.DrawTexture(new Rect(position, size), (Texture)(object)Texture2D.whiteTexture, (ScaleMode)0);
		}

		public static void DrawBoxOutline(Vector2 Point, float width, float height, Color color)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: 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_0026: 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_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_0046: 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_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			DrawLine(Point, new Vector2(Point.x + width, Point.y), color, 2f);
			DrawLine(Point, new Vector2(Point.x, Point.y + height), color, 2f);
			DrawLine(new Vector2(Point.x + width, Point.y + height), new Vector2(Point.x + width, Point.y), color, 2f);
			DrawLine(new Vector2(Point.x + width, Point.y + height), new Vector2(Point.x, Point.y + height), color, 2f);
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "MoarForest";

		public const string PLUGIN_NAME = "MoarForest";

		public const string PLUGIN_VERSION = "1.0.1";
	}
}