Decompiled source of InfiniteBoomboxBattery v1.0.0

InfiniteBoomboxBattery.dll

Decompiled 2 weeks ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using InfiniteBoomboxBattery.Patches;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("InfiniteBoomboxBattery")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("InfiniteBoomboxBattery")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3543362c-37b7-4d26-ae93-d93ec6946a41")]
[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 InfiniteBoomboxBattery
{
	[BepInPlugin("LimeSkillZ.InfiniteBoomboxBattery", "InfiniteBoomboxBattery", "1.0.0")]
	public class BoomboxPlugin : BaseUnityPlugin
	{
		private const string modGUID = "LimeSkillZ.InfiniteBoomboxBattery";

		private const string modName = "InfiniteBoomboxBattery";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("LimeSkillZ.InfiniteBoomboxBattery");

		private static BoomboxPlugin instance;

		private void Awake()
		{
			if (Object.op_Implicit((Object)(object)(instance = null)))
			{
				instance = this;
			}
			harmony.PatchAll(typeof(BoomboxPlugin));
			harmony.PatchAll(typeof(BoomboxBatteryPatch));
		}
	}
}
namespace InfiniteBoomboxBattery.Patches
{
	[HarmonyPatch(typeof(BoomboxItem))]
	internal class BoomboxBatteryPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void PatchBattery(ref Item ___itemProperties)
		{
			___itemProperties.requiresBattery = false;
		}
	}
}