Decompiled source of GodShovel v0.0.4

DeathShovel.dll

Decompiled 6 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 HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("DeathShovel")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DeathShovel")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ed49b4f9-dc97-411a-b2bc-ef6ec7f89bc8")]
[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 DeathShovel
{
	[BepInPlugin("Ccode.DeathShovel", "DeathShovel", "0.0.1")]
	public class Plugin : BaseUnityPlugin
	{
		private const string MyGuid = "Ccode.DeathShovel";

		private const string PluginName = "DeathShovel";

		private const string VersionString = "0.0.1";

		private static readonly Harmony Harmony = new Harmony("Ccode.DeathShovel");

		public static ManualLogSource Log;

		public void Awake()
		{
			Harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"DeathShovel 0.0.1 loaded.");
			Log = ((BaseUnityPlugin)this).Logger;
		}
	}
}
namespace DeathShovel.Patches.Items
{
	[HarmonyPatch(typeof(GrabbableObject), "Start")]
	internal class GrabbableObjectPatch
	{
		public static void Prefix(GrabbableObject __instance)
		{
			if (((object)__instance).GetType() == typeof(Shovel))
			{
				Shovel val = (Shovel)(object)((__instance is Shovel) ? __instance : null);
				val.shovelHitForce = 99;
			}
		}
	}
	[HarmonyPatch(typeof(Shovel), "SwingShovel")]
	internal class ShovelPatch
	{
		public static void Prefix(Shovel __instance, bool cancel = false)
		{
			Plugin.Log.LogInfo((object)__instance.shovelHitForce);
		}
	}
}