Decompiled source of NoVomit v1.0.1

NoVomit.dll

Decompiled 11 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
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: AssemblyTitle("ColourfulFlashlights")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ColourfulFlashlights")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("35a79675-215d-4715-be09-288b1d07a711")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[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 LCPlugin
{
	public static class Patches
	{
		[HarmonyPatch(typeof(MaskedPlayerEnemy))]
		public class MaskedPatch
		{
			[HarmonyPatch("Update")]
			[HarmonyPostfix]
			public static void MaskedPlayerPatch(MaskedPlayerEnemy __instance)
			{
				if (__instance.startingKillAnimationLocalClient)
				{
					if (((EnemyAI)__instance).creatureSFX.isPlaying)
					{
						((EnemyAI)__instance).creatureSFX.Stop();
					}
					if (__instance.maskFloodParticle.isPlaying)
					{
						__instance.maskFloodParticle.Stop();
					}
				}
			}
		}
	}
	[BepInPlugin("Cubly.NoVomit", "NoVomit", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		private const string MOD_NAME = "NoVomit";

		private const string MOD_GUID = "Cubly.NoVomit";

		private const string MOD_VERSION = "1.0.0";

		private readonly Harmony harmony = new Harmony("Cubly.NoVomit");

		public static Plugin Instance;

		public static ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Cubly.NoVomit");
			harmony.PatchAll();
			mls.LogInfo((object)"NoVomit loaded");
		}
	}
}