using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using CrabMurderer;
using HarmonyLib;
using Il2CppSLZ.Bonelab;
using Il2CppSLZ.Marrow.Warehouse;
using MelonLoader;
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: AssemblyTitle("CrabMurderer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany(null)]
[assembly: AssemblyProduct("CrabMurderer")]
[assembly: AssemblyCopyright("Created by trev")]
[assembly: AssemblyTrademark(null)]
[assembly: ComVisible(false)]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: NeutralResourcesLanguage("en")]
[assembly: MelonInfo(typeof(Core), "CrabMurderer", "1.0.0", "trev", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyVersion("1.0.0.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 CrabMurderer
{
public static class BuildInfo
{
public const string Name = "CrabMurderer";
public const string Author = "trev";
public const string Company = null;
public const string Version = "1.0.0";
public const string DownloadLink = null;
}
public class Core : MelonMod
{
public override void OnInitializeMelon()
{
try
{
((MelonBase)this).HarmonyInstance.Patch((MethodBase)typeof(CrateSpawner).GetMethod("Awake"), MelonUtils.ToNewHarmonyMethod(typeof(Core).GetMethod("Murderer")), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
((MelonBase)this).HarmonyInstance.Patch((MethodBase)typeof(BehaviourCrablet).GetMethod("OnInitiate"), (HarmonyMethod)null, MelonUtils.ToNewHarmonyMethod(typeof(Core).GetMethod("Disable")), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
}
catch (Exception ex)
{
MelonLogger.Error(ex.ToString());
}
}
public static void Murderer(CrateSpawner __instance)
{
if (((Object)__instance).name.Contains("Crablet") || ((ScannableReference)__instance.crateQuery).Barcode.ID == "c1534c5a-4583-48b5-ac3f-eb9543726162" || ((ScannableReference)__instance.crateQuery).Barcode.ID == "c1534c5a-af28-46cb-84c1-012343726162")
{
Object.Destroy((Object)(object)((Component)__instance).gameObject);
}
}
public static void Disable(BehaviourCrablet __instance)
{
((Component)((Component)__instance).transform.parent.parent).gameObject.SetActive(false);
Object.Destroy((Object)(object)((Component)((Component)__instance).transform.parent.parent).gameObject);
}
}
}