Decompiled source of DestructionOfTheMasked v1.0.2

F_CKMaskeds.dll

Decompiled 9 months 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 F_CKMaskeds.Patches;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("F_CKMaskeds")]
[assembly: AssemblyConfiguration("release")]
[assembly: AssemblyDescription("This is a mod that removes masked enemies from Lethal Company")]
[assembly: AssemblyFileVersion("1.0.8.0")]
[assembly: AssemblyInformationalVersion("1.0.8-M+a92710e429310877fc688342a4a4bd90202d787c")]
[assembly: AssemblyProduct("F_CKMaskeds")]
[assembly: AssemblyTitle("F_CKMaskeds")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.8.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 F_CKMaskeds
{
	[BepInPlugin("SugoiDogo.F_CKMaskeds", "F_CKMaskeds", "1.0.2")]
	public class FuckMaskeds : BaseUnityPlugin
	{
		private const string modGUID = "SugoiDogo.F_CKMaskeds";

		private const string modName = "F_CKMaskeds";

		private const string modVersion = "1.0.2";

		private readonly Harmony harmony = new Harmony("SugoiDogo.F_CKMaskeds");

		private static FuckMaskeds Instance;

		public static int amountFucked;

		internal static ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("SugoiDogo.F_CKMaskeds");
			mls.LogInfo((object)"F_CK Maskeds!!!");
			harmony.PatchAll(typeof(FuckMaskeds));
			harmony.PatchAll(typeof(MaskedPlayerEnemyPatch));
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "F_CKMaskeds";

		public const string PLUGIN_NAME = "F_CKMaskeds";

		public const string PLUGIN_VERSION = "1.0.8-M";
	}
}
namespace F_CKMaskeds.Patches
{
	[HarmonyPatch(typeof(MaskedPlayerEnemy))]
	internal class MaskedPlayerEnemyPatch
	{
		[HarmonyPatch(typeof(MaskedPlayerEnemy), "Start")]
		[HarmonyPostfix]
		private static void fuckMaskedsPatch(MaskedPlayerEnemy __instance)
		{
			((EnemyAI)__instance).KillEnemyOnOwnerClient(false);
			string text = "Masked F_CKED!";
			FuckMaskeds.mls.LogInfo((object)text);
			FuckMaskeds.amountFucked++;
			string text2 = "Total F_CKED masked this session: " + FuckMaskeds.amountFucked;
			FuckMaskeds.mls.LogInfo((object)text2);
		}
	}
}

MaskedsBegone.dll

Decompiled 9 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("MaskedsBegone")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MaskedsBegone")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("FAAB4C32-6593-45AC-A28E-9D77F75873E4")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
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;
		}
	}
}
namespace MaskedsBegone
{
	[BepInPlugin("com.github.tinyhoot.MaskedsBegone", "MaskedsBegone", "1.0")]
	internal class MaskedsBegone : BaseUnityPlugin
	{
		public const string GUID = "com.github.tinyhoot.MaskedsBegone";

		public const string NAME = "MaskedsBegone";

		public const string VERSION = "1.0";

		internal static ManualLogSource Log;

		private void Awake()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			Log = ((BaseUnityPlugin)this).Logger;
			new Harmony("com.github.tinyhoot.MaskedsBegone").PatchAll(Assembly.GetExecutingAssembly());
		}
	}
}
namespace MaskedsBegone.Patches
{
	[HarmonyPatch]
	internal class RoundManagerPatcher
	{
		[HarmonyPostfix]
		[HarmonyPatch(typeof(RoundManager), "EnemyCannotBeSpawned")]
		private static void PreventMaskedSpawns(RoundManager __instance, ref bool __result, int enemyIndex)
		{
			if (__instance.currentLevel.Enemies[enemyIndex].enemyType.enemyName.ToLower().Contains("masked"))
			{
				MaskedsBegone.Log.LogDebug((object)"Prevented masked spawn.");
				__result = true;
			}
		}
	}
}