Decompiled source of DeGhostify v1.0.0

BepInEx/plugins/DeGhostify.dll

Decompiled 11 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 DeGhostify.Patches;
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("DeGhostify")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DeGhostify")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("f1f39db8-2ec9-44f8-95d5-05003e44dcc3")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace DeGhostify
{
	[BepInPlugin("me.poka.deghostify", "DeGhostify", "1.0.0")]
	public class DeGhostifyBase : BaseUnityPlugin
	{
		private const string modGUID = "me.poka.deghostify";

		private const string modName = "DeGhostify";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("me.poka.deghostify");

		private static DeGhostifyBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if (Object.op_Implicit((Object)(object)(Instance = null)))
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("me.poka.deghostify");
			mls.LogInfo((object)" »»»» DeGhostify has been loaded! «« \n »» created by 'p.o.k.a' on discord, '@p.o.k.a' on youtube :) «« ");
			harmony.PatchAll(typeof(DeGhostifyBase));
			harmony.PatchAll(typeof(DeGhostifyPatch));
		}
	}
}
namespace DeGhostify.Patches
{
	[HarmonyPatch(typeof(EnemyAI))]
	internal class DeGhostifyPatch
	{
		[HarmonyPatch("EnableEnemyMesh")]
		[HarmonyPrefix]
		private static void DeGhostifyPrefix(ref bool enable)
		{
			enable = true;
		}
	}
}