Decompiled source of ExplosiveManeaters v0.0.1

com.sagtag.ExplosiveManeater.dll

Decompiled a day 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 BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;

[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("SagTag")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyCopyright("Copyright (c) 2026 SagTag")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyInformationalVersion("0.1.0")]
[assembly: AssemblyProduct("com.sagtag.ExplosiveManeater")]
[assembly: AssemblyTitle("ExplosiveManeater")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[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 ExplosiveManeater
{
	[HarmonyPatch(typeof(CaveDwellerAI))]
	public class NuclearManeater
	{
		[HarmonyPatch("TurnIntoAdultClientRpc")]
		[HarmonyPrefix]
		private static void Detect(CaveDwellerAI __instance)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			GameNetworkManager.Instance.localPlayerController.KillPlayer(Vector3.up, true, (CauseOfDeath)0, 0, default(Vector3), false);
		}

		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void HumanEraserSpawned(CaveDwellerAI __instance)
		{
			HUDManager.Instance.DisplayTip("Baby spawned", "A Baby has spawned somewhere", false, false, "LC_Tip1");
		}

		[HarmonyPatch("SetCryingLocalClient")]
		[HarmonyPostfix]
		private static void HumanEraserIsCrying(CaveDwellerAI __instance, bool setCrying)
		{
			if (setCrying)
			{
				HUDManager.Instance.DisplayTip("Baby crying", "THE BABY IS CRYING!!!!", false, false, "LC_Tip1");
			}
			else
			{
				HUDManager.Instance.DisplayTip("Baby stopped crying", "The baby has stopped crying :3", false, false, "LC_Tip1");
			}
		}

		[HarmonyPatch("SetBabyNearTransformingClientRpc")]
		[HarmonyPostfix]
		private static void HumanEraserAboutToErase()
		{
			HUDManager.Instance.DisplayTip("THE BABY IS ABOUT TO KILL EVEROYNE", "Feed it scrap to reset it ", false, false, "LC_Tip1");
		}

		[HarmonyPatch("ClearBabyObservingClientRpc")]
		[HarmonyPostfix]
		private static void HumanEraserAteScrap(CaveDwellerAI __instance)
		{
			__instance.growthMeter = 0f;
		}
	}
	[BepInPlugin("com.sagtag.ExplosiveManeater", "ExplosiveManeater", "0.1.0")]
	[BepInProcess("Lethal Company.exe")]
	public class Plugin : BaseUnityPlugin
	{
		internal static ManualLogSource Log { get; private set; }

		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.sagtag.ExplosiveManeater");
			val.PatchAll();
			Log = ((BaseUnityPlugin)this).Logger;
			Log.LogInfo((object)"ExplosiveManeater 0.1.0 loaded");
		}
	}
	internal static class MyPluginInfo
	{
		public const string Id = "com.sagtag.ExplosiveManeater";

		public const string Name = "ExplosiveManeater";

		public const string Version = "0.1.0";
	}
}