Decompiled source of EvenBrutalerCompanyMinuxExtraPlusMinusPlus v1.0.2

EvenBrutalerCompanyMinusExtraPlusExtraMinusPlus.dll

Decompiled 10 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 BepInEx.Logging;
using GameNetcodeStuff;
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: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("EvenBrutalerCompanyMinusExtraPlusExtraMinusPlus")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("EvenBrutalerCompanyMinusExtraPlusExtraMinusPlus")]
[assembly: AssemblyTitle("EvenBrutalerCompanyMinusExtraPlusExtraMinusPlus")]
[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;
		}
	}
}
[BepInPlugin("EvenBrutalerCompanyMinusExtraPlusExtraMinusPlus", "EvenBrutalerCompanyMinusExtraPlusExtraMinusPlus", "1.0.2")]
public class EvenBrutalerCompanyMinusExtraPlusExtraMinusPlus : BaseUnityPlugin
{
	public class PlayerPatch
	{
		[HarmonyPatch(typeof(PlayerControllerB), "Update")]
		[HarmonyPostfix]
		private static void PlayerControllerB_Update(PlayerControllerB __instance)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)__instance))
			{
				if (__instance.isExhausted)
				{
					__instance.DamagePlayer(10, true, true, (CauseOfDeath)0, 0, false, default(Vector3));
				}
				if (__instance.isUnderwater)
				{
					((Component)__instance).BroadcastMessage("someone touched W*ter");
					__instance.DamagePlayer(10, true, true, (CauseOfDeath)0, 0, false, default(Vector3));
				}
				if (__instance.isCrouching)
				{
					__instance.drunkness += 1f;
					__instance.DropAllHeldItems(true, false);
				}
				else
				{
					__instance.drunkness = 0f;
				}
				if (__instance.drunkness >= 300f)
				{
					__instance.KillPlayer(Vector3.zero, true, (CauseOfDeath)0, 0, default(Vector3));
				}
			}
		}
	}

	internal static ManualLogSource logger;

	public void Awake()
	{
		logger = ((BaseUnityPlugin)this).Logger;
		Harmony.CreateAndPatchAll(typeof(PlayerPatch), (string)null);
		Debug.Log((object)" _           _             _     _ _     _ _   \r\n| |__   ___ | |_   _   ___| |__ (_) |_  (_) |_ \r\n| '_ \\ / _ \\| | | | | / __| '_ \\| | __| | | __|\r\n| | | | (_) | | |_| | \\__ \\ | | | | |_  | | |_ \r\n|_| |_|\\___/|_|\\__, | |___/_| |_|_|\\__| |_|\\__|\r\n _             |___/          _                \r\n| | ___   __ _  __| | ___  __| |               \r\n| |/ _ \\ / _` |/ _` |/ _ \\/ _` |               \r\n| | (_) | (_| | (_| |  __/ (_| |               \r\n|_|\\___/ \\__,_|\\__,_|\\___|\\__,_| ");
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}