Decompiled source of CatalystGroupMod v2.0.1

CatalystGroupMod.dll

Decompiled 7 months 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 GameNetcodeStuff;
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("LCCollectYourDead")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LCCollectYourDead")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e5414fef-ab62-4b31-b9d8-94bf927816d3")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Catalyst
{
	[BepInPlugin("Catalyst", "Catalyst", "2.0.0")]
	public class Catalyst : BaseUnityPlugin
	{
		private const string MOD_NAMESPACE = "Catalyst";

		private const string MOD_NAME = "Catalyst";

		private const string MOD_VERSION = "2.0.0";

		private readonly Harmony _harmony = new Harmony("Catalyst");

		public ManualLogSource Logger { get; private set; }

		public static Catalyst Instance { get; private set; }

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			Logger = Logger.CreateLogSource("Catalyst");
			Logger.LogInfo((object)"Catalyst v2.0.0 is now running.");
			_harmony.PatchAll();
		}
	}
}
namespace Catalyst.Patches
{
	[HarmonyPatch(typeof(ShipTeleporter))]
	internal class ShipTeleporterPatch
	{
		[HarmonyPatch("beamUpPlayer")]
		[HarmonyPostfix]
		private static void CashEmIn(ShipTeleporter __instance)
		{
			PlayerControllerB val = StartOfRound.Instance?.mapScreen?.targetedPlayer;
			if ((Object)(object)val?.deadBody != (Object)null)
			{
				GrabbableObject grabBodyObject = val.deadBody.grabBodyObject;
				if ((Object)(object)grabBodyObject != (Object)null)
				{
					RoundManager.Instance.CollectNewScrapForThisRound(grabBodyObject);
				}
			}
		}
	}
}