Decompiled source of BoomBoxNoPower v1.0.0

BepInEx/plugins/BoomBoxNoPower.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 BoomBoxNoPower.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("BoomBoxNoPower")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BoomBoxNoPower")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("bd269fc6-abd7-4d33-b4d7-77be24732c49")]
[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 BoomBoxNoPower
{
	[BepInPlugin("BoomBox.BoomBoxNoPower", "Boombox No Power", "1.0.0.0")]
	public class BoomBoxModBase : BaseUnityPlugin
	{
		private const string modGUID = "BoomBox.BoomBoxNoPower";

		private const string modName = "Boombox No Power";

		private const string modVersion = "1.0.0.0";

		private static BoomBoxModBase instance;

		private readonly Harmony harmony = new Harmony("BoomBox.BoomBoxNoPower");

		internal ManualLogSource logger;

		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			if ((Object)instance != (Object)null)
			{
				instance = this;
			}
			logger = Logger.CreateLogSource("BoomBox.BoomBoxNoPower");
			logger.LogInfo((object)"Boombox No Power has awoken");
			harmony.PatchAll(typeof(BoomBoxModBase));
			harmony.PatchAll(typeof(BoomBoxPatch));
		}
	}
}
namespace BoomBoxNoPower.Patches
{
	[HarmonyPatch(typeof(BoomboxItem))]
	internal class BoomBoxPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void PatchBattery(ref Item ___itemProperties)
		{
			___itemProperties.requiresBattery = false;
		}
	}
}