Decompiled source of Ship Mimics Riot Control v1.0.2

RiotControl.dll

Decompiled 4 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("RiotControl")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RiotControl")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("9dee6e3f-c8e0-4283-a751-ec6c3ed6b9c6")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace RiotControl
{
	[BepInPlugin("Riot_Control", "Riot_Control", "1.0.2")]
	[BepInProcess("Lethal Company.exe")]
	public class Plugin : BaseUnityPlugin
	{
		private const string modGUID = "Riot_Control";

		private const string modName = "Riot_Control";

		private const string modVersion = "1.0.2";

		private readonly Harmony harmony = new Harmony("Riot_Control");

		private static Plugin Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Riot_Control");
			mls.LogInfo((object)"Riot Control Initiated!");
			harmony.PatchAll();
		}
	}
}
namespace RiotControl.Patches
{
	[HarmonyPatch(typeof(MaskedPlayerEnemy))]
	internal class MaskedPlayerEnemyPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPrefix]
		private static void UpdatePatch(MaskedPlayerEnemy __instance, bool ___isInsidePlayerShip)
		{
			if (___isInsidePlayerShip)
			{
				((EnemyAI)__instance).KillEnemy(true);
			}
		}
	}
}