Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of MewMod v1.1.1
mew.MewMod.dll
Decompiled a year agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using LobbyCompatibility.Attributes; using MewMod.Hooks; using Microsoft.CodeAnalysis; using On; using Unity.Netcode; 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("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: AssemblyCompany("mew.MewMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+caf0f4fc2aca33e402a720272865ee55aae6871e")] [assembly: AssemblyProduct("MewMod")] [assembly: AssemblyTitle("mew.MewMod")] [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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [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 MewMod { [BepInPlugin("mew.MewMod", "MewMod", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [LobbyCompatibility(/*Could not decode attribute arguments.*/)] public class MewMod : BaseUnityPlugin { [CompilerGenerated] private static class <>O { public static hook_killAnimation <0>__DisableJumpscarePatch; public static hook_SetFearAudio <1>__DisableFearSoundsPatch; public static hook_PlayNonDiageticSound <2>__DisableNonDiageticSoundsPatch; public static hook_PlayAmbientSound <3>__DisableScaryAmbientSoundsPatch; public static hook_PlayAmbienceClipClientRpc <4>__DisableScaryAmbientSoundsRpcPatch; } public static MewMod Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Instance = this; ConfigEntry<string> val = ((BaseUnityPlugin)this).Config.Bind<string>("General", "lessScary", "false", "Set to true (case sensitive) to make the game less scary."); if (val.Value == "true") { Hook(); } else { Logger.LogWarning((object)"Mod disabled, scary things ENABLED!!!! (Check ones config file!!)"); } Logger.LogInfo((object)"mew.MewMod v1.0.0 has loaded,, awawawawa"); } internal static void Hook() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0063: 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_006e: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown Logger.LogDebug((object)"Hooking..."); object obj = <>O.<0>__DisableJumpscarePatch; if (obj == null) { hook_killAnimation val = DisableMaskedJumpscare.DisableJumpscarePatch; <>O.<0>__DisableJumpscarePatch = val; obj = (object)val; } MaskedPlayerEnemy.killAnimation += (hook_killAnimation)obj; object obj2 = <>O.<1>__DisableFearSoundsPatch; if (obj2 == null) { hook_SetFearAudio val2 = DisableFearSounds.DisableFearSoundsPatch; <>O.<1>__DisableFearSoundsPatch = val2; obj2 = (object)val2; } SoundManager.SetFearAudio += (hook_SetFearAudio)obj2; object obj3 = <>O.<2>__DisableNonDiageticSoundsPatch; if (obj3 == null) { hook_PlayNonDiageticSound val3 = DisableNonDiageticSounds.DisableNonDiageticSoundsPatch; <>O.<2>__DisableNonDiageticSoundsPatch = val3; obj3 = (object)val3; } SoundManager.PlayNonDiageticSound += (hook_PlayNonDiageticSound)obj3; object obj4 = <>O.<3>__DisableScaryAmbientSoundsPatch; if (obj4 == null) { hook_PlayAmbientSound val4 = DisableScaryAmbientSounds.DisableScaryAmbientSoundsPatch; <>O.<3>__DisableScaryAmbientSoundsPatch = val4; obj4 = (object)val4; } SoundManager.PlayAmbientSound += (hook_PlayAmbientSound)obj4; object obj5 = <>O.<4>__DisableScaryAmbientSoundsRpcPatch; if (obj5 == null) { hook_PlayAmbienceClipClientRpc val5 = DisableScaryAmbientSounds.DisableScaryAmbientSoundsRpcPatch; <>O.<4>__DisableScaryAmbientSoundsRpcPatch = val5; obj5 = (object)val5; } SoundManager.PlayAmbienceClipClientRpc += (hook_PlayAmbienceClipClientRpc)obj5; Logger.LogDebug((object)"Finished Hooking!"); } internal static void Unhook() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0063: 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_006e: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown Logger.LogDebug((object)"Unhooking..."); object obj = <>O.<0>__DisableJumpscarePatch; if (obj == null) { hook_killAnimation val = DisableMaskedJumpscare.DisableJumpscarePatch; <>O.<0>__DisableJumpscarePatch = val; obj = (object)val; } MaskedPlayerEnemy.killAnimation -= (hook_killAnimation)obj; object obj2 = <>O.<1>__DisableFearSoundsPatch; if (obj2 == null) { hook_SetFearAudio val2 = DisableFearSounds.DisableFearSoundsPatch; <>O.<1>__DisableFearSoundsPatch = val2; obj2 = (object)val2; } SoundManager.SetFearAudio -= (hook_SetFearAudio)obj2; object obj3 = <>O.<2>__DisableNonDiageticSoundsPatch; if (obj3 == null) { hook_PlayNonDiageticSound val3 = DisableNonDiageticSounds.DisableNonDiageticSoundsPatch; <>O.<2>__DisableNonDiageticSoundsPatch = val3; obj3 = (object)val3; } SoundManager.PlayNonDiageticSound -= (hook_PlayNonDiageticSound)obj3; object obj4 = <>O.<3>__DisableScaryAmbientSoundsPatch; if (obj4 == null) { hook_PlayAmbientSound val4 = DisableScaryAmbientSounds.DisableScaryAmbientSoundsPatch; <>O.<3>__DisableScaryAmbientSoundsPatch = val4; obj4 = (object)val4; } SoundManager.PlayAmbientSound -= (hook_PlayAmbientSound)obj4; object obj5 = <>O.<4>__DisableScaryAmbientSoundsRpcPatch; if (obj5 == null) { hook_PlayAmbienceClipClientRpc val5 = DisableScaryAmbientSounds.DisableScaryAmbientSoundsRpcPatch; <>O.<4>__DisableScaryAmbientSoundsRpcPatch = val5; obj5 = (object)val5; } SoundManager.PlayAmbienceClipClientRpc -= (hook_PlayAmbienceClipClientRpc)obj5; Logger.LogDebug((object)"Finished Unhooking!"); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "mew.MewMod"; public const string PLUGIN_NAME = "MewMod"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace MewMod.Hooks { public class DisableFearSounds { public static void DisableFearSoundsPatch(orig_SetFearAudio orig, SoundManager self) { self.highAction1.volume = 0f; self.highAction1.Stop(); self.highAction2.volume = 0f; self.highAction2.Stop(); self.heartbeatSFX.volume = 0f; self.heartbeatSFX.Stop(); self.lowAction.volume = 0f; self.lowAction.Stop(); } } public class DisableMaskedJumpscare { [CompilerGenerated] private sealed class <DisableJumpscarePatch>d__0 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public orig_killAnimation orig; public MaskedPlayerEnemy self; private bool <flag>5__1; private NetworkObjectReference <netObjectRef>5__2; private NetworkObject <networkObject>5__3; private MaskedPlayerEnemy <component>5__4; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DisableJumpscarePatch>d__0(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <networkObject>5__3 = null; <component>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; self.lastPlayerKilled = ((EnemyAI)self).inSpecialAnimationWithPlayer; <flag>5__1 = ((Component)((EnemyAI)self).inSpecialAnimationWithPlayer).transform.position.y < -80f; ((EnemyAI)self).inSpecialAnimationWithPlayer.KillPlayer(Vector3.zero, false, (CauseOfDeath)4, 4, default(Vector3)); ((EnemyAI)self).inSpecialAnimationWithPlayer.snapToServerPosition = false; self.FinishKillAnimation(true); if (((NetworkBehaviour)self).IsServer) { self.playersKilled.Add((int)((EnemyAI)self).inSpecialAnimationWithPlayer.playerClientId); <netObjectRef>5__2 = RoundManager.Instance.SpawnEnemyGameObject(self.GetGroundPosition(((Ray)(ref self.playerRay)).origin), ((Component)((EnemyAI)self).inSpecialAnimationWithPlayer).transform.eulerAngles.y, -1, ((EnemyAI)self).enemyType); if (((NetworkObjectReference)(ref <netObjectRef>5__2)).TryGet(ref <networkObject>5__3, (NetworkManager)null)) { <component>5__4 = ((Component)<networkObject>5__3).GetComponent<MaskedPlayerEnemy>(); <component>5__4.SetSuit(((EnemyAI)self).inSpecialAnimationWithPlayer.currentSuitID); <component>5__4.mimickingPlayer = ((EnemyAI)self).inSpecialAnimationWithPlayer; ((EnemyAI)<component>5__4).SetEnemyOutside(!<flag>5__1); ((EnemyAI)self).inSpecialAnimationWithPlayer.redirectToEnemy = (EnemyAI)(object)<component>5__4; if ((Object)(object)((EnemyAI)self).inSpecialAnimationWithPlayer.deadBody != (Object)null) { ((EnemyAI)self).inSpecialAnimationWithPlayer.deadBody.DeactivateBody(false); } <component>5__4 = null; } self.CreateMimicClientRpc(<netObjectRef>5__2, <flag>5__1, (int)((EnemyAI)self).inSpecialAnimationWithPlayer.playerClientId); <networkObject>5__3 = null; } <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [IteratorStateMachine(typeof(<DisableJumpscarePatch>d__0))] public static IEnumerator DisableJumpscarePatch(orig_killAnimation orig, MaskedPlayerEnemy self) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DisableJumpscarePatch>d__0(0) { orig = orig, self = self }; } } public class DisableNonDiageticSounds { public static void DisableNonDiageticSoundsPatch(orig_PlayNonDiageticSound orig, SoundManager self) { } } public class DisableScaryAmbientSounds { public static void DisableScaryAmbientSoundsPatch(orig_PlayAmbientSound orig, SoundManager self, bool syncedForAllPlayers = false, bool playInsanitySounds = false) { if (!playInsanitySounds) { orig.Invoke(self, syncedForAllPlayers, playInsanitySounds); } } public static void DisableScaryAmbientSoundsRpcPatch(orig_PlayAmbienceClipClientRpc orig, SoundManager self, int soundType, int clipIndex, float soundVolume, bool playInsanitySounds) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Invalid comparison between Unknown and I4 //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)self).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)self).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)self).__beginSendClientRpc(580761520u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, soundType); BytePacker.WriteValueBitPacked(val2, clipIndex); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref soundVolume, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref playInsanitySounds, default(ForPrimitives)); ((NetworkBehaviour)self).__endSendClientRpc(ref val2, 580761520u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)self).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !playInsanitySounds) { orig.Invoke(self, soundType, clipIndex, soundVolume, playInsanitySounds); } } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }