Decompiled source of monsterphobia v1.0.2

Monsterphobia.dll

Decompiled 9 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
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: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("Monsterphobia")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+09e82f4f2f0b3a2f36103086b0c8435464f22984")]
[assembly: AssemblyProduct("Monsterphobia")]
[assembly: AssemblyTitle("Monsterphobia")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[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 Monsterphobia
{
	public class MonsterReplacement : MonoBehaviour
	{
		private string pathToMesh = "assets/meshes/";

		private string pathToMaterial = "assets/materials/";

		public Dictionary<string, string> assets = new Dictionary<string, string>
		{
			{
				ScriptNames.baboonScript,
				"baboon_hawk.mesh"
			},
			{
				ScriptNames.slimeScript,
				"slime.mesh"
			},
			{
				ScriptNames.thumperScript,
				"thumper.mesh"
			},
			{
				ScriptNames.snareFleaScript,
				"snare_flea.mesh"
			},
			{ "CentipedeAIClinging", "snare_flea_clinging.mesh" },
			{
				ScriptNames.locustScript,
				""
			},
			{
				ScriptNames.manticoilScript,
				""
			},
			{
				ScriptNames.ghostGirlScript,
				"ghost_girl.mesh"
			},
			{
				ScriptNames.brackenScript,
				"bracken.mesh"
			},
			{
				ScriptNames.forestKeeperScript,
				"forest_giant.mesh"
			},
			{
				ScriptNames.hoardingBugScript,
				"hoarding_bug.mesh"
			},
			{
				ScriptNames.jesterScript,
				"jester.mesh"
			},
			{
				ScriptNames.lassoManScript,
				""
			},
			{
				ScriptNames.eyelessDogScript,
				"eyeless_dog.mesh"
			},
			{
				ScriptNames.nutcrackerScript,
				"nutcracker.mesh"
			},
			{
				ScriptNames.sandSpiderScript,
				""
			},
			{
				ScriptNames.sporeLizardScript,
				"spore_lizard.mesh"
			},
			{
				ScriptNames.earthLeviathanScript,
				"earth_leviathan.mesh"
			},
			{
				ScriptNames.coilHeadScript,
				"coil_head.mesh"
			},
			{
				ScriptNames.maskedScript,
				"masked.mesh"
			},
			{ "RedCord", "red_cord.mat" }
		};

		public EnemyAI enemyAI;

		public Mesh safeMesh = null;

		public Material safeMaterial = null;

		private string enemyScriptName = "";

		private bool meshesReplaced = false;

		public Mesh safeSnareFleaMeshClinging = null;

		private void Start()
		{
			enemyAI = ((Component)this).gameObject.GetComponent<EnemyAI>();
			if ((Object)(object)enemyAI == (Object)null)
			{
				Console.WriteLine("Monsterphobia: Unable to find " + ((object)enemyAI).GetType().Name);
				return;
			}
			enemyScriptName = ((object)enemyAI).GetType().Name;
			SetSafeAssets();
		}

		private void Update()
		{
			bool flag = SafeMeshEnabled();
			if ((Object)(object)enemyAI != (Object)null && enemyAI.skinnedMeshRenderers != null && (Object)(object)safeMesh != (Object)null && Config.enableMonsterphbia.Value && flag)
			{
				ReplaceMeshes();
			}
			else
			{
				ResetMeshes();
			}
		}

		private bool SafeMeshEnabled()
		{
			if (enemyScriptName == ScriptNames.baboonScript)
			{
				return Config.enableBaboonText.Value;
			}
			if (enemyScriptName == ScriptNames.slimeScript)
			{
				return Config.enableSlimeText.Value;
			}
			if (enemyScriptName == ScriptNames.thumperScript)
			{
				return Config.enableThumperText.Value;
			}
			if (enemyScriptName == ScriptNames.snareFleaScript)
			{
				return Config.enableSnareFleaText.Value;
			}
			if (enemyScriptName == ScriptNames.ghostGirlScript)
			{
				return Config.enableGhostGirlText.Value;
			}
			if (enemyScriptName == ScriptNames.brackenScript)
			{
				return Config.enableBrackenText.Value;
			}
			if (enemyScriptName == ScriptNames.forestKeeperScript)
			{
				return Config.enableForestGiantText.Value;
			}
			if (enemyScriptName == ScriptNames.hoardingBugScript)
			{
				return Config.enableHoardingBugText.Value;
			}
			if (enemyScriptName == ScriptNames.jesterScript)
			{
				return Config.enableJesterText.Value;
			}
			if (enemyScriptName == ScriptNames.eyelessDogScript)
			{
				return Config.enableEyelessDogText.Value;
			}
			if (enemyScriptName == ScriptNames.nutcrackerScript)
			{
				return Config.enableNutcrackerText.Value;
			}
			if (enemyScriptName == ScriptNames.sporeLizardScript)
			{
				return Config.enableSporeLizardText.Value;
			}
			if (enemyScriptName == ScriptNames.earthLeviathanScript)
			{
				return Config.enableEarthLeviathanText.Value;
			}
			if (enemyScriptName == ScriptNames.coilHeadScript)
			{
				return Config.enableCoilHeadText.Value;
			}
			if (enemyScriptName == ScriptNames.maskedScript)
			{
				return Config.enableMaskedText.Value;
			}
			return false;
		}

		private void ReplaceMeshes()
		{
			for (int i = 0; i < enemyAI.skinnedMeshRenderers.Length; i++)
			{
				((Renderer)enemyAI.skinnedMeshRenderers[i]).enabled = false;
			}
			for (int j = 0; j < enemyAI.meshRenderers.Length; j++)
			{
				MeshRenderer obj = enemyAI.meshRenderers[j];
				string text = ((obj != null) ? ((Object)((Renderer)obj).material).name : null);
				if (!string.IsNullOrEmpty(text) && !text.ToLower().Contains("mapdot") && !text.ToLower().Contains("scannode"))
				{
					((Renderer)enemyAI.meshRenderers[j]).enabled = false;
				}
			}
			if ((Object)(object)((Component)enemyAI).gameObject.GetComponent<MeshRenderer>() == (Object)null)
			{
				((Renderer)((Component)enemyAI).gameObject.AddComponent<MeshRenderer>()).material = safeMaterial;
			}
			else
			{
				((Renderer)((Component)enemyAI).gameObject.GetComponent<MeshRenderer>()).material = safeMaterial;
			}
			if ((Object)(object)((Component)enemyAI).gameObject.GetComponent<MeshFilter>() == (Object)null)
			{
				((Component)enemyAI).gameObject.AddComponent<MeshFilter>().mesh = safeMesh;
			}
			if (enemyScriptName == ScriptNames.snareFleaScript)
			{
				SetSnareFleaMesh();
			}
			else
			{
				((Component)enemyAI).gameObject.GetComponent<MeshFilter>().mesh = safeMesh;
			}
			meshesReplaced = true;
		}

		private void ResetMeshes()
		{
			if (meshesReplaced)
			{
				for (int i = 0; i < enemyAI.skinnedMeshRenderers.Length; i++)
				{
					((Renderer)enemyAI.skinnedMeshRenderers[i]).enabled = true;
				}
				for (int j = 0; j < enemyAI.meshRenderers.Length; j++)
				{
					((Renderer)enemyAI.meshRenderers[j]).enabled = true;
				}
				((Component)enemyAI).gameObject.GetComponent<MeshFilter>().mesh = null;
				((Renderer)((Component)enemyAI).gameObject.GetComponent<MeshRenderer>()).material = null;
			}
		}

		private void SetSnareFleaMesh()
		{
			EnemyAI obj = enemyAI;
			CentipedeAI val = (CentipedeAI)(object)((obj is CentipedeAI) ? obj : null);
			if ((Object)(object)((Component)enemyAI).gameObject.GetComponent<MeshFilter>() == (Object)null)
			{
				((Component)enemyAI).gameObject.AddComponent<MeshFilter>().mesh = safeMesh;
			}
			else if (Object.op_Implicit((Object)(object)val.clingingToPlayer))
			{
				((Component)enemyAI).gameObject.GetComponent<MeshFilter>().mesh = safeSnareFleaMeshClinging;
			}
			else
			{
				((Component)enemyAI).gameObject.GetComponent<MeshFilter>().mesh = safeMesh;
			}
		}

		private void SetSafeAssets()
		{
			string[] allAssetNames = Assets.Bundle.GetAllAssetNames();
			try
			{
				safeMaterial = Assets.Bundle.LoadAsset<Material>(pathToMaterial + assets["RedCord"]);
				safeMesh = Assets.Bundle.LoadAsset<Mesh>(pathToMesh + assets[enemyScriptName]);
				if ((Object)(object)safeSnareFleaMeshClinging == (Object)null)
				{
					safeSnareFleaMeshClinging = Assets.Bundle.LoadAsset<Mesh>(pathToMesh + assets["CentipedeAIClinging"]);
				}
				if ((Object)(object)safeMesh == (Object)null)
				{
					Console.WriteLine(((object)enemyAI).GetType().Name + " is missing safeMesh");
				}
			}
			catch (Exception arg)
			{
				Console.WriteLine($"Error when loading monster replacement meshes or material for {enemyScriptName}. {arg}");
			}
		}
	}
	[BepInPlugin("Monsterphobia", "Monsterphobia", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		[HarmonyPatch(typeof(EnemyAI))]
		public class EnemyAIPatch
		{
			[HarmonyPatch("Start")]
			[HarmonyPostfix]
			private static void InitReplacement(ref EnemyAI __instance)
			{
				try
				{
					((BaseUnityPlugin)Instance).Logger.LogInfo((object)("Monsterphobia Attached to " + ((object)__instance).GetType().Name));
					((Component)__instance).gameObject.AddComponent(typeof(MonsterReplacement));
					((Component)__instance).gameObject.AddComponent(typeof(RemoveAudio));
				}
				catch (Exception arg)
				{
					((BaseUnityPlugin)Instance).Logger.LogError((object)$"Monsterphobia: Error in EnemyAI InitReplacement: {arg}");
				}
			}
		}

		[HarmonyPatch(typeof(MaskedPlayerEnemy))]
		public class MaskedPlayerEnemyPatch
		{
			[HarmonyPatch("Start")]
			[HarmonyPostfix]
			private static void InitReplacement(ref EnemyAI __instance)
			{
				try
				{
					((BaseUnityPlugin)Instance).Logger.LogInfo((object)("Monsterphobia Attached to " + ((object)__instance).GetType().Name));
					((Component)__instance).gameObject.AddComponent(typeof(MonsterReplacement));
					((Component)__instance).gameObject.AddComponent(typeof(RemoveAudio));
				}
				catch (Exception arg)
				{
					((BaseUnityPlugin)Instance).Logger.LogError((object)$"Monsterphobia: Error in MaskedPlayerEnemy InitReplacement: {arg}");
				}
			}
		}

		public static Plugin Instance;

		public static Config config { get; internal set; }

		private void Awake()
		{
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Expected O, but got Unknown
			config = new Config(((BaseUnityPlugin)this).Config);
			Instance = this;
			try
			{
				Assets.PopulateAssets();
			}
			catch (Exception ex)
			{
				Console.WriteLine("Monsterphobia: " + ex.Message);
				((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Monsterphobia is NOT loaded!");
				return;
			}
			Harmony val = new Harmony("Monsterphobia");
			val.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Monsterphobia is loaded!");
		}
	}
	public class Config
	{
		public static ConfigEntry<bool> enableMonsterphbia { get; private set; }

		public static ConfigEntry<bool> enableBaboonText { get; private set; }

		public static ConfigEntry<bool> enableSlimeText { get; private set; }

		public static ConfigEntry<bool> enableThumperText { get; private set; }

		public static ConfigEntry<bool> enableSnareFleaText { get; private set; }

		public static ConfigEntry<bool> enableGhostGirlText { get; private set; }

		public static ConfigEntry<bool> enableBrackenText { get; private set; }

		public static ConfigEntry<bool> enableForestGiantText { get; private set; }

		public static ConfigEntry<bool> enableHoardingBugText { get; private set; }

		public static ConfigEntry<bool> enableJesterText { get; private set; }

		public static ConfigEntry<bool> enableEyelessDogText { get; private set; }

		public static ConfigEntry<bool> enableNutcrackerText { get; private set; }

		public static ConfigEntry<bool> enableSporeLizardText { get; private set; }

		public static ConfigEntry<bool> enableEarthLeviathanText { get; private set; }

		public static ConfigEntry<bool> enableCoilHeadText { get; private set; }

		public static ConfigEntry<bool> enableMaskedText { get; private set; }

		public static ConfigEntry<bool> disableMonsterSounds { get; private set; }

		public static ConfigEntry<bool> disableBaboonSounds { get; private set; }

		public static ConfigEntry<bool> disableSlimeSounds { get; private set; }

		public static ConfigEntry<bool> disableThumperSounds { get; private set; }

		public static ConfigEntry<bool> disableSnareFleaSounds { get; private set; }

		public static ConfigEntry<bool> disableGhostGirlSounds { get; private set; }

		public static ConfigEntry<bool> disableBrackenSounds { get; private set; }

		public static ConfigEntry<bool> disableForestGiantSounds { get; private set; }

		public static ConfigEntry<bool> disableHoardingBugSounds { get; private set; }

		public static ConfigEntry<bool> disableJesterSounds { get; private set; }

		public static ConfigEntry<bool> disableEyelessDogSounds { get; private set; }

		public static ConfigEntry<bool> disableNutcrackerSounds { get; private set; }

		public static ConfigEntry<bool> disableSpiderSounds { get; private set; }

		public static ConfigEntry<bool> disableSporeLizardSounds { get; private set; }

		public static ConfigEntry<bool> disableEarthLeviathanSounds { get; private set; }

		public static ConfigEntry<bool> disableCoilHeadSounds { get; private set; }

		public static ConfigEntry<bool> disableMaskedSounds { get; private set; }

		public Config(ConfigFile cfg)
		{
			enableMonsterphbia = cfg.Bind<bool>("Turn all monsters into text!", "Enable monster to text technology", true, "Check this to replace all monsters with their text variant. Set to false to play it scary, again.");
			enableBaboonText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Baboon Hawk text", true, "");
			enableSlimeText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Slime text", true, "");
			enableThumperText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Thumper text", true, "");
			enableSnareFleaText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Snare Flea text", true, "");
			enableGhostGirlText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Ghost Girl text", true, "");
			enableBrackenText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Bracken text", true, "");
			enableForestGiantText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Forest Giant text", true, "");
			enableHoardingBugText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Hoarding Bug text", true, "");
			enableJesterText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Jester text", true, "");
			enableEyelessDogText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Eyeless Dog text", true, "");
			enableNutcrackerText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Nutcracker text", true, "");
			enableSporeLizardText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Spore Lizard text", true, "");
			enableEarthLeviathanText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Earth Leviathan text", true, "");
			enableCoilHeadText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Coil Head text", true, "");
			enableMaskedText = cfg.Bind<bool>("Turn all monsters into text!", "Enable Masked text", true, "");
			disableMonsterSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable monster sounds", false, "Check this to turn off monster sounds. Choose the ones you want disabled below");
			disableBaboonSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Baboon sounds", false, "");
			disableSlimeSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Slime sounds", false, "");
			disableThumperSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Thumper sounds", false, "");
			disableSnareFleaSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Snare Flea sounds", false, "");
			disableGhostGirlSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Ghost Girl sounds", false, "");
			disableBrackenSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Bracken sounds", false, "");
			disableForestGiantSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Forest Giant sounds", false, "");
			disableHoardingBugSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Hoarding Bug sounds", false, "");
			disableJesterSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Jester sounds", false, "");
			disableEyelessDogSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Eyeless Dog sounds", false, "");
			disableNutcrackerSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Nutcracker sounds", false, "");
			disableSpiderSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Spider sounds", false, "");
			disableSporeLizardSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Spore Lizard sounds", false, "");
			disableEarthLeviathanSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Earth Leviathan sounds", false, "");
			disableCoilHeadSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Coil Head sounds", false, "");
			disableMaskedSounds = cfg.Bind<bool>("Turn off monster sounds!", "Disable Masked sounds", false, "");
		}
	}
	public static class Assets
	{
		public static string AssetBundleName = "monsterphobia-assets\\monsterphobia";

		public static AssetBundle Bundle = null;

		private static string GetAssemblyName()
		{
			return Assembly.GetExecutingAssembly().FullName.Split(',')[0];
		}

		public static void PopulateAssets()
		{
			string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			AssetBundle val = null;
			if (File.Exists(Path.Combine(directoryName, AssetBundleName)))
			{
				val = AssetBundle.LoadFromFile(Path.Combine(directoryName, AssetBundleName));
			}
			else if (File.Exists(Path.Combine(directoryName, "monsterphobia")))
			{
				val = AssetBundle.LoadFromFile(Path.Combine(directoryName, "monsterphobia"));
			}
			if ((Object)(object)val == (Object)null)
			{
				throw new Exception("Please include the asset bundle");
			}
			if ((Object)(object)Bundle == (Object)null)
			{
				Bundle = val;
			}
		}
	}
	public class RemoveAudio : MonoBehaviour
	{
		private string enemyScriptName = "";

		public EnemyAI enemyAI;

		private void Start()
		{
			enemyAI = ((Component)this).gameObject.GetComponent<EnemyAI>();
			if ((Object)(object)enemyAI == (Object)null)
			{
				Console.WriteLine("Monsterphobia: Unable to find " + ((object)enemyAI).GetType().Name);
				return;
			}
			enemyScriptName = ((object)enemyAI).GetType().Name;
			RemoveAudioSources();
		}

		private void RemoveAudioSources()
		{
			if (enemyScriptName == ScriptNames.baboonScript && Config.disableBaboonSounds.Value)
			{
				EnemyAI obj = enemyAI;
				BaboonBirdAI val = (BaboonBirdAI)(object)((obj is BaboonBirdAI) ? obj : null);
				((EnemyAI)val).creatureSFX.volume = 0f;
				((EnemyAI)val).creatureVoice.volume = 0f;
				val.aggressionAudio.volume = 0f;
				val.cawLaughSFX = Array.Empty<AudioClip>();
				val.cawScreamSFX = Array.Empty<AudioClip>();
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.slimeScript && Config.disableSlimeSounds.Value)
			{
				EnemyAI obj2 = enemyAI;
				BlobAI val2 = (BlobAI)(object)((obj2 is BlobAI) ? obj2 : null);
				((EnemyAI)val2).creatureSFX.volume = 0f;
				((EnemyAI)val2).creatureVoice.volume = 0f;
				val2.movableAudioSource.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.thumperScript && Config.disableThumperSounds.Value)
			{
				EnemyAI obj3 = enemyAI;
				CrawlerAI val3 = (CrawlerAI)(object)((obj3 is CrawlerAI) ? obj3 : null);
				((EnemyAI)val3).creatureSFX.volume = 0f;
				((EnemyAI)val3).creatureVoice.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.snareFleaScript && Config.disableSnareFleaSounds.Value)
			{
				EnemyAI obj4 = enemyAI;
				CentipedeAI val4 = (CentipedeAI)(object)((obj4 is CentipedeAI) ? obj4 : null);
				((EnemyAI)val4).creatureSFX.volume = 0f;
				((EnemyAI)val4).creatureVoice.volume = 0f;
				val4.clingingToPlayer2DAudio.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.ghostGirlScript && Config.disableGhostGirlSounds.Value)
			{
				EnemyAI obj5 = enemyAI;
				DressGirlAI val5 = (DressGirlAI)(object)((obj5 is DressGirlAI) ? obj5 : null);
				((EnemyAI)val5).creatureSFX.volume = 0f;
				((EnemyAI)val5).creatureVoice.volume = 0f;
				val5.heartbeatMusic.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.brackenScript && Config.disableBrackenSounds.Value)
			{
				EnemyAI obj6 = enemyAI;
				FlowermanAI val6 = (FlowermanAI)(object)((obj6 is FlowermanAI) ? obj6 : null);
				((EnemyAI)val6).creatureSFX.volume = 0f;
				((EnemyAI)val6).creatureVoice.volume = 0f;
				val6.creatureAngerVoice.volume = 0f;
				val6.crackNeckAudio.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.forestKeeperScript && Config.disableForestGiantSounds.Value)
			{
				EnemyAI obj7 = enemyAI;
				ForestGiantAI val7 = (ForestGiantAI)(object)((obj7 is ForestGiantAI) ? obj7 : null);
				((EnemyAI)val7).creatureSFX.volume = 0f;
				((EnemyAI)val7).creatureVoice.volume = 0f;
				val7.farWideSFX.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.hoardingBugScript && Config.disableHoardingBugSounds.Value)
			{
				EnemyAI obj8 = enemyAI;
				HoarderBugAI val8 = (HoarderBugAI)(object)((obj8 is HoarderBugAI) ? obj8 : null);
				((EnemyAI)val8).creatureSFX.volume = 0f;
				((EnemyAI)val8).creatureVoice.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.jesterScript && Config.disableJesterSounds.Value)
			{
				EnemyAI obj9 = enemyAI;
				JesterAI val9 = (JesterAI)(object)((obj9 is JesterAI) ? obj9 : null);
				((EnemyAI)val9).creatureSFX.volume = 0f;
				((EnemyAI)val9).creatureVoice.volume = 0f;
				val9.farAudio.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.eyelessDogScript && Config.disableEyelessDogSounds.Value)
			{
				EnemyAI obj10 = enemyAI;
				MouthDogAI val10 = (MouthDogAI)(object)((obj10 is MouthDogAI) ? obj10 : null);
				((EnemyAI)val10).creatureSFX.volume = 0f;
				((EnemyAI)val10).creatureVoice.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.nutcrackerScript && Config.disableNutcrackerSounds.Value)
			{
				EnemyAI obj11 = enemyAI;
				NutcrackerEnemyAI val11 = (NutcrackerEnemyAI)(object)((obj11 is NutcrackerEnemyAI) ? obj11 : null);
				((EnemyAI)val11).creatureSFX.volume = 0f;
				((EnemyAI)val11).creatureVoice.volume = 0f;
				val11.torsoTurnAudio.volume = 0f;
				val11.longRangeAudio.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.sandSpiderScript && Config.disableSpiderSounds.Value)
			{
				EnemyAI obj12 = enemyAI;
				SandSpiderAI val12 = (SandSpiderAI)(object)((obj12 is SandSpiderAI) ? obj12 : null);
				((EnemyAI)val12).creatureSFX.volume = 0f;
				((EnemyAI)val12).creatureVoice.volume = 0f;
				val12.footstepAudio.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.sporeLizardScript && Config.disableSporeLizardSounds.Value)
			{
				EnemyAI obj13 = enemyAI;
				PufferAI val13 = (PufferAI)(object)((obj13 is PufferAI) ? obj13 : null);
				((EnemyAI)val13).creatureSFX.volume = 0f;
				((EnemyAI)val13).creatureVoice.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.earthLeviathanScript && Config.disableEarthLeviathanSounds.Value)
			{
				EnemyAI obj14 = enemyAI;
				SandWormAI val14 = (SandWormAI)(object)((obj14 is SandWormAI) ? obj14 : null);
				((EnemyAI)val14).creatureSFX.volume = 0f;
				((EnemyAI)val14).creatureVoice.volume = 0f;
				val14.groundAudio.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.coilHeadScript && Config.disableCoilHeadSounds.Value)
			{
				EnemyAI obj15 = enemyAI;
				SpringManAI val15 = (SpringManAI)(object)((obj15 is SpringManAI) ? obj15 : null);
				((EnemyAI)val15).creatureSFX.volume = 0f;
				((EnemyAI)val15).creatureVoice.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
			if (enemyScriptName == ScriptNames.maskedScript && Config.disableMaskedSounds.Value)
			{
				EnemyAI obj16 = enemyAI;
				MaskedPlayerEnemy val16 = (MaskedPlayerEnemy)(object)((obj16 is MaskedPlayerEnemy) ? obj16 : null);
				((EnemyAI)val16).creatureSFX.volume = 0f;
				((EnemyAI)val16).creatureVoice.volume = 0f;
				val16.movementAudio.volume = 0f;
				Console.WriteLine("Monsterphobia: Muted " + enemyScriptName);
			}
		}
	}
	public class ScriptNames
	{
		public static string baboonScript = "BaboonBirdAI";

		public static string slimeScript = "BlobAI";

		public static string thumperScript = "CrawlerAI";

		public static string snareFleaScript = "CentipedeAI";

		public static string ghostGirlScript = "DressGirlAI";

		public static string brackenScript = "FlowermanAI";

		public static string forestKeeperScript = "ForestGiantAI";

		public static string hoardingBugScript = "HoarderBugAI";

		public static string jesterScript = "JesterAI";

		public static string eyelessDogScript = "MouthDogAI";

		public static string nutcrackerScript = "NutcrackerEnemyAI";

		public static string sporeLizardScript = "PufferAI";

		public static string earthLeviathanScript = "SandWormAI";

		public static string sandSpiderScript = "SandSpiderAI";

		public static string coilHeadScript = "SpringManAI";

		public static string maskedScript = "MaskedPlayerEnemy";

		public static string locustScript = "DocileLocustBeesAI";

		public static string manticoilScript = "DoublewingAI";

		public static string lassoManScript = "LassoManAI";
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "Monsterphobia";

		public const string PLUGIN_NAME = "Monsterphobia";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}