Decompiled source of ULTRAKillYourself v1.0.0

ULTRAKillYourself.dll

Decompiled 6 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 Configgy;
using HarmonyLib;
using UnityEngine;
using UnityEngine.AddressableAssets;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("SomethingWickedSpawner")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SomethingWickedSpawner")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("6485b501-a9bb-41e3-92c9-1bf7fbbef3a0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SomethingWickedSpawner;

[BepInPlugin("thebluenebula.SelfDestruct", "SelfDestruct", "1.0.0")]
public class SWBase : BaseUnityPlugin
{
	[Configgable("", "Boom", 0, null)]
	public static ConfigKeybind Boom = new ConfigKeybind((KeyCode)107);

	private const string modGUID = "thebluenebula.SelfDestruct";

	private const string modName = "SelfDestruct";

	private const string modVersion = "1.0.0";

	public string explosionAddress = "Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion.prefab";

	private readonly Harmony harmony = new Harmony("thebluenebula.SelfDestruct");

	private static SWBase Instance;

	internal ManualLogSource mls;

	public static ConfigBuilder ConfigBuilder { get; private set; }

	private void Awake()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Expected O, but got Unknown
		ConfigBuilder = new ConfigBuilder("SelfDestruct", (string)null);
		ConfigBuilder.BuildAll();
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
		}
		mls = Logger.CreateLogSource("thebluenebula.SelfDestruct");
		mls.LogInfo((object)"thebluenebula.SelfDestruct has loaded! Version test electric boogaloo");
		harmony.PatchAll();
	}

	private void Update()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		if (Input.GetKeyDown(((ConfigValueElement<KeyCode>)(object)Boom).Value))
		{
			Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)explosionAddress).Result, GameObject.Find("Player").transform.position, Quaternion.identity);
			MonoSingleton<NewMovement>.Instance.hp = 0;
		}
	}
}