Decompiled source of NoInfectionSway v0.1.0

NoInfectionSway.dll

Decompiled a month ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("NoInfectionSway")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+0aebdcfc5bd157835b04ca2f32e2b422a5be15f4")]
[assembly: AssemblyProduct("NoInfectionSway")]
[assembly: AssemblyTitle("NoInfectionSway")]
[assembly: AssemblyVersion("1.0.0.0")]
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 NoInfectionSway
{
	internal static class Logger
	{
		private static ManualLogSource m_LogSource;

		public static void SetupFromInit(ManualLogSource logSource)
		{
			m_LogSource = logSource;
		}

		private static string Format(object data)
		{
			return data.ToString();
		}

		public static void Debug(object msg)
		{
			bool flag = true;
			m_LogSource.LogInfo((object)Format(msg));
		}

		public static void Info(object msg)
		{
			m_LogSource.LogInfo((object)Format(msg));
		}

		public static void Warn(object msg)
		{
			m_LogSource.LogWarning((object)Format(msg));
		}

		public static void Error(object msg)
		{
			m_LogSource.LogError((object)Format(msg));
		}

		public static void Fatal(object msg)
		{
			m_LogSource.LogFatal((object)Format(msg));
		}
	}
	[HarmonyPatch]
	internal class Patch
	{
		[HarmonyPatch(typeof(PE_FPSDamageFeedback), "Update")]
		[HarmonyPostfix]
		public static void Update(PE_FPSDamageFeedback __instance)
		{
			__instance.m_damageMaterialInstance.SetFloat(__instance.m_infectionID, 0f);
		}
	}
	[BepInPlugin("io.takina.gtfo.NoInfectionSway", "NoInfectionSway", "0.1.0")]
	public class Plugin : BasePlugin
	{
		public const string NAME = "NoInfectionSway";

		public const string GUID = "io.takina.gtfo.NoInfectionSway";

		public const string VERSION = "0.1.0";

		public override void Load()
		{
			Logger.SetupFromInit(((BasePlugin)this).Log);
			Logger.Info("NoInfectionSway io.takina.gtfo.NoInfectionSway 0.1.0");
			Logger.Info("Patching...");
			Harmony.CreateAndPatchAll(typeof(Patch), "io.takina.gtfo.NoInfectionSway");
			Logger.Info("Finished Patching");
		}
	}
}