Decompiled source of BerserkTurrets v1.0.0

BerserkTurrets.dll

Decompiled a year ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using BerserkTurrets.Patches;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("BerserkTurrets")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BerserkTurrets")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e43e7eba-1e9a-4011-8e9e-60980a3a6c59")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace BerserkTurrets
{
	[BepInPlugin("SleeplessKyru.BerserkTurrets", "Berserk Turrets", "1.0.0")]
	public class SleeplessModBase : BaseUnityPlugin
	{
		private const string modGUID = "SleeplessKyru.BerserkTurrets";

		private const string modName = "Berserk Turrets";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("SleeplessKyru.BerserkTurrets");

		private static SleeplessModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance != (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("SleeplessKyru.BerserkTurrets");
			mls.LogInfo((object)"Berserk Turrets by Sleepless Kyru has loaded!");
			harmony.PatchAll(typeof(SleeplessModBase));
			harmony.PatchAll(typeof(TurretPatch));
		}
	}
}
namespace BerserkTurrets.Patches
{
	[HarmonyPatch(typeof(Turret))]
	internal class TurretPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void berserkTurretsPatch(ref int ___turretMode)
		{
			___turretMode = 3;
		}
	}
}