Decompiled source of NoZombies v1.0.1

Huskslay-NoZombies.dll

Decompiled a day ago
using System;
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.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: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Huskslay-NoZombies")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1+f85b1a6ba48410e460aa9b9fa2f3b5642632cb24")]
[assembly: AssemblyProduct("Huskslay - No Zombies")]
[assembly: AssemblyTitle("Huskslay-NoZombies")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.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 NoZombies
{
	[BepInPlugin("Huskslay-NoZombies", "Huskslay - No Zombies", "1.0.1")]
	public class Plugin : BaseUnityPlugin
	{
		internal static ManualLogSource Logger;

		public static readonly KeyCode GUIKey = (KeyCode)278;

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			Patch();
			Logger.LogInfo((object)"Plugin Huskslay-NoZombies is loaded!");
		}

		private void Patch()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Harmony val = new Harmony("HarmonyPatcher");
			val.PatchAll();
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "Huskslay-NoZombies";

		public const string PLUGIN_NAME = "Huskslay - No Zombies";

		public const string PLUGIN_VERSION = "1.0.1";
	}
}
namespace NoZombies.Patches
{
	[HarmonyPatch(typeof(MushroomZombieSpawner))]
	public class MushroomZombieSpawnerPatch
	{
		[HarmonyPrefix]
		[HarmonyPatch("Start")]
		public static bool StartPrefix(MushroomZombieSpawner __instance)
		{
			Object.Destroy((Object)(object)((Component)__instance).gameObject);
			Plugin.Logger.LogMessage((object)"No zombies, removing zombie spawner!");
			return false;
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}