Decompiled source of InfiniteBoost v1.0.0

InfiniteBoost/InfiniteBoost.dll

Decompiled a year ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using InfiniteBoost.Patches;
using Reptile;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("InfiniteBoost")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("InfiniteBoost")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d59824e8-ca90-4d33-836d-e0555451c34f")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace InfiniteBoost
{
	[BepInPlugin("com.yuril.InfiniteBoost", "InfiniteBoost", "1.0.0")]
	public class InfiniteBoostPlugin : BaseUnityPlugin
	{
		private const string MyGUID = "com.yuril.InfiniteBoost";

		private const string PluginName = "InfiniteBoost";

		private const string VersionString = "1.0.0";

		private Harmony harmony;

		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			harmony = new Harmony("com.yuril.InfiniteBoost");
			harmony.PatchAll(typeof(PlayerPatch));
		}
	}
}
namespace InfiniteBoost.Patches
{
	internal static class PlayerPatch
	{
		[HarmonyPatch(typeof(Player), "FixedUpdatePlayer")]
		[HarmonyPostfix]
		private static void Player_FixedUpdatePlayer_Postfix(Player __instance)
		{
			if (__instance.boostCharge != __instance.maxBoostCharge)
			{
				__instance.AddBoostCharge(1f);
			}
		}
	}
}