Decompiled source of ModifiedCats v1.0.0

ModifiedCats.dll

Decompiled 9 months ago
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 ModifiedCats.Patches;
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("ModifiedCats")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ModifiedCats")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4c4b19ed-d05d-41f1-9a12-e4c6a7f7b881")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace ModifiedCats
{
	[BepInPlugin("ModifiedCats", "Modified NeedyCats", "1.0.0.0")]
	public class ModBase : BaseUnityPlugin
	{
		private const string modGUID = "ModifiedCats";

		private const string modName = "Modified NeedyCats";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("ModifiedCats");

		private static ModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("ModifiedCats");
			mls.LogInfo((object)"ModifiedCats is loaded.");
			harmony.PatchAll(typeof(ModBase));
			harmony.PatchAll(typeof(DetectNoisePatch));
		}
	}
}
namespace ModifiedCats.Patches
{
	[HarmonyPatch(typeof(MouthDogAI))]
	[HarmonyPatch("DetectNoise")]
	internal class DetectNoisePatch
	{
		[HarmonyPrefix]
		private static bool Prefix(MouthDogAI __instance, ref int noiseID)
		{
			if (noiseID == 8881)
			{
				return false;
			}
			return true;
		}
	}
}