Decompiled source of InfinityFlashlightMod v1.0.0

battery.dll

Decompiled 7 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BatteryPatchMod.Patches;
using BepInEx;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("battery")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("battery")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d7227239-a637-471f-afa0-03f999703abf")]
[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 BatteryPatchMod
{
	[BepInPlugin("izirat.tol", "flashLightInf", "1.0.0.0")]
	public class TurretAlwaysLaserModBase : BaseUnityPlugin
	{
		private const string modGUID = "izirat.tol";

		private const string modName = "flashLightInf";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("izirat.tol");

		private void Awake()
		{
			harmony.PatchAll(typeof(BatteryPatch));
		}
	}
}
namespace BatteryPatchMod.Patches
{
	[HarmonyPatch(typeof(FlashlightItem))]
	internal class BatteryPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void TurretDetectionToChargingPatch(ref Battery ___insertedBattery)
		{
			___insertedBattery.charge = 100f;
		}
	}
}