Decompiled source of demon mode v0.0.4

demon_mode.dll

Decompiled 2 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using UI.HUD;
using UnityEngine;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]
[assembly: AssemblyCompany("demon_mode")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+25c341c37171117e9aca7ff5b2bc8480162c5c1b")]
[assembly: AssemblyProduct("demon_mode")]
[assembly: AssemblyTitle("demon_mode")]
[assembly: SecurityPermission(8, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace demon_mode;

public class DemonMode_Component : MonoBehaviour
{
	private void Awake()
	{
		Harmony.CreateAndPatchAll(typeof(DemonMode_Component), (string)null);
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(EntityHighlighter), "Activate")]
	private static void OverrideActivate(EntityHighlighter __instance)
	{
		//IL_0027: 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)
		__instance._text = "DEMON";
		((Graphic)__instance.label).color = new Color(1f, 0f, 0f, 1f);
		((Graphic)__instance.image).color = new Color(1f, 0f, 0f, 1f);
	}
}
[BepInPlugin("demon_mode", "Demon Mode", "0.0.3")]
public class DemonMode : BasePlugin
{
	internal static ManualLogSource Log;

	public override void Load()
	{
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Expected O, but got Unknown
		Log = ((BasePlugin)this).Log;
		((BasePlugin)this).AddComponent<DemonMode_Component>();
		ManualLogSource log = Log;
		bool flag = default(bool);
		BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(38, 0, ref flag);
		if (flag)
		{
			((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin demon_mode loaded successfully.");
		}
		log.LogInfo(val);
	}
}