using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using HarmonyLib;
using MelonLoader;
using Microsoft.CodeAnalysis;
using Mimic.Audio;
using MimicVoiceFix;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(MimicVoiceFixMod), "MimicVoiceFix", "1.0.0", "User", null)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("MimicVoiceFix")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MimicVoiceFix")]
[assembly: AssemblyTitle("MimicVoiceFix")]
[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 MimicVoiceFix
{
public class MimicVoiceFixMod : MelonMod
{
public override void OnInitializeMelon()
{
MelonLogger.Msg("MimicVoiceFix loaded! Voice effects will be disabled for the Mimic.");
}
}
[HarmonyPatch(typeof(VoiceEffectPreset), "ApplyFilters")]
public class VoiceEffectPresetPatch
{
public static void Postfix(VoiceEffectPreset __instance, AudioFilterReference filterRef)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)filterRef.LowPass != (Object)null)
{
((Behaviour)filterRef.LowPass).enabled = false;
}
if ((Object)(object)filterRef.HighPass != (Object)null)
{
((Behaviour)filterRef.HighPass).enabled = false;
}
if ((Object)(object)filterRef.Distortion != (Object)null)
{
((Behaviour)filterRef.Distortion).enabled = false;
}
if ((Object)(object)filterRef.Chorus != (Object)null)
{
((Behaviour)filterRef.Chorus).enabled = false;
}
if ((Object)(object)filterRef.Reverb != (Object)null)
{
((Behaviour)filterRef.Reverb).enabled = false;
}
if ((Object)(object)filterRef.Echo != (Object)null)
{
((Behaviour)filterRef.Echo).enabled = false;
}
if ((Object)(object)filterRef.Amplifier != (Object)null)
{
((Behaviour)filterRef.Amplifier).enabled = false;
}
}
}
}