Decompiled source of LethalHitmarker v1.0.0

LethalHitmarker.dll

Decompiled 10 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
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("LethalHitmarker")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LethalHitmarker")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e2505aef-fc33-43a1-82b0-c9fcf3c330ed")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LethalHitmarker
{
	[BepInPlugin("Ccode.Rectile", "LethalHitmarker", "1.0")]
	public class Plugin : BaseUnityPlugin
	{
		private const string MyGuid = "Ccode.Rectile";

		private const string PluginName = "LethalHitmarker";

		private const string VersionString = "1.0";

		private static readonly Harmony Harmony = new Harmony("Ccode.Rectile");

		public static ManualLogSource Log;

		public static GameObject newUI;

		public void Awake()
		{
			string location = ((BaseUnityPlugin)this).Info.Location;
			string text = "LethalHitmarker.dll";
			string text2 = location.TrimEnd(text.ToCharArray());
			string text3 = text2 + "rectile";
			AssetBundle val = AssetBundle.LoadFromFile(text3);
			newUI = val.LoadAsset<GameObject>("Rectile Container");
			Harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"LethalHitmarker 1.0 loaded.");
			Log = ((BaseUnityPlugin)this).Logger;
		}
	}
}
namespace LethalHitmarker.Patches
{
	[HarmonyPatch(typeof(HUDManager), "OnEnable")]
	internal class HUDManagerPatch
	{
		public static void Postfix()
		{
			Object.Instantiate<GameObject>(Plugin.newUI);
		}
	}
}