Decompiled source of Force Roach Mode v1.0.3

WK_Force_Roach.dll

Decompiled 17 hours 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 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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("WK_Force_Roach")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Description")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("WK_Force_Roach")]
[assembly: AssemblyTitle("WK_Force_Roach")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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 YourModNameHere
{
	[BepInPlugin("YourName.YourModName", "YourModNameHere", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			new Harmony("YourName.YourModName").PatchAll();
		}
	}
	public class PluginInfo
	{
		public const string GUID = "YourName.YourModName";

		public const string Name = "YourModNameHere";

		public const string Version = "1.0.0";
	}
}
namespace WKRoach
{
	public static class Plugin
	{
		public const string name = "WKRoach";

		public const string guid = "plonk.wk.forceroach";

		public const string version = "1.0.0";
	}
	[BepInPlugin("plonk.wk.forceroach", "WKRoach", "1.0.0")]
	public class PluginClass : BaseUnityPlugin
	{
		public void Awake()
		{
			//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("plonk.wk.forceroach");
			val.PatchAll();
		}
	}
	[HarmonyPatch]
	public class Patches
	{
		[HarmonyPostfix]
		[HarmonyPatch(typeof(ENT_Player), "OrganizePerkIconOrder")]
		[HarmonyPatch(typeof(ENT_Player), "FixedUpdate")]
		public static void AddRoach(ENT_Player __instance)
		{
			Debug.LogWarning((object)"Try Add Roach");
			if (!__instance.HasPerk("Perk_Binding_RoachMode"))
			{
				Debug.LogWarning((object)"Add Roach Ok");
				__instance.AddPerk(CL_AssetManager.GetPerkAsset("Perk_Binding_RoachMode", ""), 1, true);
				CL_GameManager.gMan.allowScores = false;
			}
		}
	}
}