Decompiled source of ReverbRemoval v1.0.0

ReverbRemoval.dll

Decompiled 5 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
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 = "")]
[assembly: AssemblyCompany("ReverbRemoval")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Remove Reverb Zones for hard-of-hearing accessibility.")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ReverbRemoval")]
[assembly: AssemblyTitle("ReverbRemoval")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace ReverbRemoval;

[HarmonyPatch(typeof(OccludeAudio))]
internal class OccludeAudioPatch
{
	[HarmonyPrefix]
	[HarmonyPatch("Update")]
	private static void UpdatePrefix(ref OccludeAudio __instance)
	{
		__instance.useReverb = false;
		if (Object.op_Implicit((Object)(object)((Component)__instance).gameObject.GetComponent<AudioReverbFilter>()))
		{
			((Behaviour)((Component)__instance).gameObject.GetComponent<AudioReverbFilter>()).enabled = false;
		}
	}
}
[BepInPlugin("ReverbRemoval", "ReverbRemoval", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Expected O, but got Unknown
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Loading a mod by swAAn\n\n                                    _\n                                ,-\"\" \"\".\n                              ,'  ____  `.\n                            ,'  ,'    `.  `._\n   (`.         _..--.._   ,'  ,'        \\    \\\n  (`-.\\    .-\"\"        \"\"'   /          (  d _b\n (`._  `-\"\" ,._             (            `-(   \\\n <_  `     (  <`<            \\              `-._\\\n  <`-       (__< <           :\n   (__        (_<_<          ;\n    `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
		Harmony val = new Harmony("ReverbRemoval");
		val.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin ReverbRemoval is loaded!");
	}
}
public static class PluginInfo
{
	public const string PLUGIN_GUID = "ReverbRemoval";

	public const string PLUGIN_NAME = "ReverbRemoval";

	public const string PLUGIN_VERSION = "1.0.0";
}