using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("NoMajorThreats")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NoMajorThreats")]
[assembly: AssemblyTitle("NoMajorThreats")]
[assembly: AssemblyVersion("1.0.0.0")]
[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 NoMajorThreats
{
[BepInPlugin("com.abyvex.NoMajorThreats", "NoMajorThreats", "1.0.0")]
public class NoMajorThreatsPlugin : BaseUnityPlugin
{
private void Awake()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.abyvex.NoMajorThreats").PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"Mass, Teeth, Face, and Hunter remover mod loaded.");
}
}
[HarmonyPatch(typeof(DEN_DeathFloor), "Update")]
public static class DEN_DeathFloor_Update_Patch
{
private static void Prefix(ref bool ___active)
{
___active = false;
}
}
[HarmonyPatch(typeof(DEN_Face), "Update")]
public static class DEN_Face_Update_Patch
{
private static bool Prefix(DEN_Face __instance)
{
if ((Object)(object)__instance != (Object)null && (Object)(object)((Component)__instance).gameObject != (Object)null)
{
Object.Destroy((Object)(object)((Component)__instance).gameObject);
}
return false;
}
}
[HarmonyPatch(typeof(DEN_Teeth), "Awake")]
public static class DEN_Teeth_Awake_Patch
{
private static bool Prefix(DEN_Teeth __instance)
{
if ((Object)(object)__instance == (Object)null)
{
return false;
}
if ((Object)(object)__instance.geoRoot != (Object)null)
{
Object.Destroy((Object)(object)((Component)__instance.geoRoot).gameObject);
}
if ((Object)(object)__instance.screenHandEffect != (Object)null)
{
Object.Destroy((Object)(object)((Component)__instance.screenHandEffect).gameObject);
}
if ((Object)(object)__instance.handParticle != (Object)null)
{
Object.Destroy((Object)(object)((Component)__instance.handParticle).gameObject);
}
((Component)__instance).gameObject.SetActive(false);
Object.Destroy((Object)(object)((Component)__instance).gameObject);
return false;
}
}
[HarmonyPatch(typeof(DEN_Teeth), "Update")]
public static class DEN_Teeth_Update_Patch
{
private static bool Prefix(DEN_Teeth __instance)
{
if ((Object)(object)__instance != (Object)null && (Object)(object)((Component)__instance).gameObject != (Object)null)
{
Object.Destroy((Object)(object)((Component)__instance).gameObject);
}
return false;
}
}
[HarmonyPatch(typeof(DEN_Hunter), "Update")]
public static class DEN_Hunter_Update_Patch
{
private static bool Prefix(DEN_Hunter __instance)
{
if ((Object)(object)__instance != (Object)null && (Object)(object)((Component)__instance).gameObject != (Object)null)
{
DEN_Hunter.activeHunters?.Remove(__instance);
Object.Destroy((Object)(object)((Component)__instance).gameObject);
}
return false;
}
}
[HarmonyPatch(typeof(M_Gamemode), "Initialize")]
public static class M_Gamemode_Initialize_Patch
{
private static void Postfix(M_Gamemode __instance)
{
__instance.allowLeaderboardScoring = false;
}
}
}