using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using HarmonyLib;
using MelonLoader;
using NullProject;
using PuppetMasta;
using SLZ.Zones;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("NullMurderer")]
[assembly: AssemblyDescription("A BONELAB Mod that kills NullBodies")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("ArpaRec")]
[assembly: AssemblyProduct("NullMurderer")]
[assembly: AssemblyCopyright("© ArpaRec 2024")]
[assembly: AssemblyTrademark("NullMurderer")]
[assembly: MelonInfo(typeof(NullMurderer), "Null Murderer", "1.0.0", "ArpaRec", null)]
[assembly: ComVisible(false)]
[assembly: Guid("b86689f0-7980-4c8b-84c7-c52ee509c2f7")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NullProject;
public class NullMurderer : MelonMod
{
public override void OnInitializeMelon()
{
try
{
((MelonBase)this).HarmonyInstance.Patch((MethodBase)typeof(ZoneSpawner).GetMethod("Awake"), MelonUtils.ToNewHarmonyMethod(typeof(NullMurderer).GetMethod("Murderer")), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
}
catch (Exception ex)
{
MelonLogger.Error(ex.ToString());
}
}
public static void Murderer(ZoneSpawner __instance)
{
if (((Object)__instance).name.Contains("Null Body"))
{
Object.Destroy((Object)(object)((Component)__instance).gameObject);
}
}
public static void Disable(BehaviourBase __instance)
{
((Component)((Component)__instance).transform.parent.parent).gameObject.SetActive(false);
Object.Destroy((Object)(object)((Component)((Component)__instance).transform.parent.parent).gameObject);
}
}