Decompiled source of FasterItems v1.0.0

FasterItem.dll

Decompiled 11 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using Unity.Netcode;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
[assembly: AssemblyCompany("FasterItem")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FasterItem")]
[assembly: AssemblyTitle("FasterItem")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace FasterItems
{
	[BepInPlugin("void.fasteritems", "Faster Items Mod", "1.0.0")]
	public class HarmonyLibs1 : BaseUnityPlugin
	{
		private const string guid = "void.fasteritems";

		private const string name = "Faster Items Mod";

		private const string version = "1.0.0";

		private readonly Harmony harmony = new Harmony("void.fasteritems");

		private static HarmonyLibs1 instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)instance == (Object)null)
			{
				instance = this;
			}
			mls.LogInfo((object)"FASTER ITEMS IS WORKING yay");
			harmony.PatchAll(typeof(HarmonyLibs1));
			harmony.PatchAll(typeof(PlayerControllerB));
		}
	}
}
namespace FasterItem
{
	[HarmonyPatch(typeof(ItemDropship))]
	internal class FasterItems
	{
		public static FasterItems instance;

		private void Awake()
		{
			if (instance == null)
			{
				instance = this;
			}
		}

		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private void FasterItems1(ref float __shipTimer, ref bool __deliveringOrder, ItemDropship __instance)
		{
			if (((NetworkBehaviour)__instance).IsServer && !__deliveringOrder && __shipTimer > 2f)
			{
				__shipTimer = 50f;
			}
		}
	}
}