Decompiled source of It Bedriuw v1.0.0

It Bedriuw.dll

Decompiled 9 months ago
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using ItBedriuw.Properties;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyCompany("It Bedriuw")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("It Bedriuw")]
[assembly: AssemblyTitle("It Bedriuw")]
[assembly: AssemblyCopyright("Stroom")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace ItBedriuw
{
	[BepInPlugin("Stroom.ItBedriuw", "It Bedriuw", "1.0.0")]
	public class Main : BaseUnityPlugin
	{
		private const string ModId = "Stroom.ItBedriuw";

		private const string ModName = "It Bedriuw";

		private const string Version = "1.0.0";

		public static AssetBundle itBedriuwAssets;

		public static Texture2D titleFontAsset;

		private void Awake()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			itBedriuwAssets = AssetBundle.LoadFromMemory(Resources.ItBedriuwassets);
			itBedriuwAssets.LoadAllAssets();
			titleFontAsset = itBedriuwAssets.LoadAsset<Texture2D>("filsonfontasset");
			new Harmony("Stroom.ItBedriuw").PatchAll();
		}
	}
	[HarmonyPatch(typeof(MenuManager))]
	public class TitleText_MenuManagerPatch
	{
		public static string[] LethalSyn = new string[1] { "It" };

		public static string[] CompanySyn = new string[1] { "Bedriuw" };

		public static GameObject TitleObj;

		public static TextMeshProUGUI TitleObjText;

		[HarmonyPatch("Start")]
		[HarmonyPrefix]
		private static void Start()
		{
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			TitleObj = Object.Instantiate<GameObject>(GameObject.Find("Canvas/MenuContainer/MainButtons/HostButton"));
			((Object)TitleObj.transform).name = "TitleObj";
			TitleObj.transform.SetParent(GameObject.Find("Canvas/MenuContainer").transform);
			TitleObj.transform.rotation = new Quaternion(0f, 0f, 0f, 0f);
			TitleObj.transform.localScale = new Vector3(1f, 1f, 1f);
			TitleObj.transform.localPosition = new Vector3(0f, 140f, 0f);
			Object.Destroy((Object)(object)TitleObj.GetComponent(typeof(Image)));
			Object.Destroy((Object)(object)TitleObj.GetComponent(typeof(Button)));
			Object.Destroy((Object)(object)TitleObj.GetComponent(typeof(Animator)));
			Object.Destroy((Object)(object)TitleObj.transform.GetChild(0));
			Component component = GameObject.Find("Canvas/MenuContainer/TitleObj/Text (TMP)").GetComponent(typeof(TextMeshProUGUI));
			TitleObjText = (TextMeshProUGUI)(object)((component is TextMeshProUGUI) ? component : null);
			((TMP_Text)TitleObjText).text = LethalSyn[0].ToUpper() + "\n" + CompanySyn[0].ToUpper();
			((TMP_Text)TitleObjText).faceColor = Color32.op_Implicit(new Color(1f, 0f, 0f));
			((TMP_Text)TitleObjText).fontSize = 110f;
			Component component2 = ((Component)TitleObjText).GetComponent(typeof(RectTransform));
			((RectTransform)((component2 is RectTransform) ? component2 : null)).sizeDelta = new Vector2(1000f, 100f);
			((TMP_Text)TitleObjText).alignment = (TextAlignmentOptions)4098;
			((TMP_Text)TitleObjText).verticalAlignment = (VerticalAlignmentOptions)256;
			((TMP_Text)TitleObjText).lineSpacing = -52f;
			((TMP_Text)TitleObjText).characterSpacing = -12f;
			GameObject.Find("Canvas/MenuContainer/MainButtons/HeaderImage").SetActive(false);
		}

		[HarmonyPatch("Update")]
		[HarmonyPrefix]
		private static void Update()
		{
			TitleObj.SetActive(GameObject.Find("Canvas/MenuContainer/MainButtons").activeSelf);
		}
	}
}
namespace ItBedriuw.Properties
{
	[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
	[DebuggerNonUserCode]
	[CompilerGenerated]
	internal class Resources
	{
		private static ResourceManager resourceMan;

		private static CultureInfo resourceCulture;

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static ResourceManager ResourceManager
		{
			get
			{
				if (resourceMan == null)
				{
					resourceMan = new ResourceManager("ItBedriuw.Properties.Resources", typeof(Resources).Assembly);
				}
				return resourceMan;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static CultureInfo Culture
		{
			get
			{
				return resourceCulture;
			}
			set
			{
				resourceCulture = value;
			}
		}

		internal static byte[] ItBedriuwassets => (byte[])ResourceManager.GetObject("ItBedriuwassets", resourceCulture);

		internal Resources()
		{
		}
	}
}