Decompiled source of THXScout v1.0.2

plugins/THXScout/THXScout.dll

Decompiled 6 months 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.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("THXScout")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("THXScout")]
[assembly: AssemblyTitle("THXScout")]
[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 THXScout
{
	[BepInPlugin("com.Runebreaker.THXScout", "THXScout", "1.0.0")]
	[BepInProcess("GTFO.exe")]
	public class Plugin : BasePlugin
	{
		public static ManualLogSource LogSource;

		public const string NAME = "THXScout";

		public const string AUTHOR = "Runebreaker";

		public const string GUID = "com.Runebreaker.THXScout";

		public const string VERSION = "1.0.0";

		public override void Load()
		{
			LogSource = ((BasePlugin)this).Log;
			LogSource.LogDebug((object)"Loading THXScout plugin...");
			Harmony.CreateAndPatchAll(typeof(ScoutScreamPatch), "THXScout");
			LogSource.LogDebug((object)"Loading THXScout plugin done!");
		}
	}
	internal static class ScoutScreamPatch
	{
		[HarmonyPatch(typeof(EnemyVoice), "PlayVoiceEvent", new Type[] { typeof(uint) })]
		[HarmonyPrefix]
		public static void Prefix(ref uint ID, EnemyVoice __instance)
		{
			if (ID == 255815502)
			{
				ID = 2173822979u;
			}
		}
	}
}