Decompiled source of MiniMapFix v0.0.2

BepInEx/plugins/MiniMapFix.dll

Decompiled 20 hours ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("MiniMapFix")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MiniMapFix")]
[assembly: AssemblyTitle("MiniMapFix")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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 PRZ_MiniMapFix
{
	[HarmonyPatch(typeof(RadarUI), "UpdateMiniIslandDot")]
	public static class MiniIslandRadarPatch
	{
		private static readonly FieldRef<RadarUI, MapDot> MiniDotRef = AccessTools.FieldRefAccess<RadarUI, MapDot>("_miniIslandDot");

		private static readonly FieldRef<MapDot, Image> DotImgRef = AccessTools.FieldRefAccess<MapDot, Image>("_dot");

		[HarmonyPostfix]
		public static void Postfix(RadarUI __instance)
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)__instance == (Object)null)
			{
				return;
			}
			MapDot val = MiniDotRef.Invoke(__instance);
			if (val != null)
			{
				Image val2 = DotImgRef.Invoke(val);
				if (!((Object)(object)val2 == (Object)null))
				{
					Color color = ((Graphic)val2).color;
					((Graphic)val2).color = new Color(color.r, color.g, color.b, 1f);
				}
			}
		}
	}
	[BepInPlugin("com.prz.minimapfix", "PRZ - MiniMapFix", "0.0.1")]
	[BepInProcess("How to Fish.exe")]
	public class Plugin : BaseUnityPlugin
	{
		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Harmony val = new Harmony("com.prz.minimapfix");
			val.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"PRZ - MiniMapFix v0.0.1 loaded!");
		}
	}
}