Decompiled source of Rehighlight v1.0.1

Rehighlight.dll

Decompiled 2 weeks ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using RoR2;
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("Rehighlight")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Rehighlight")]
[assembly: AssemblyCopyright("Copyright © kingfisher95 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8CF1CE97-68A1-4E91-AF69-DA0F2728E811")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")]
[assembly: AssemblyVersion("1.0.1.0")]
[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 Rehighlight
{
	[BepInPlugin("gg.kingfisher.rehighlight", "Rehighlight", "1.0.1")]
	public class RehighlightMod : BaseUnityPlugin
	{
		private Harmony _harmony;

		public void Awake()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			_harmony = new Harmony("gg.kingfisher.rehighlight");
			_harmony.PatchAll(typeof(Patches));
		}
	}
	public static class Patches
	{
		[HarmonyPatch(typeof(PickupDisplay), "RebuildModel")]
		[HarmonyPostfix]
		public static void PickupDisplayHighlights(ref PickupDisplay __instance)
		{
			Highlight val = default(Highlight);
			if (((Component)__instance).TryGetComponent<Highlight>(ref val))
			{
				((Behaviour)val).enabled = false;
				((Behaviour)val).enabled = true;
			}
		}
	}
}