Decompiled source of GoofieTroopie v1.0.1

GoofieTroopie.dll

Decompiled 5 hours 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 GameNetcodeStuff;
using GoofieTroopie.Patches;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("GoofieTroopie")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GoofieTroopie")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("2866edce-44e4-472f-b720-92a0d56af84a")]
[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 GoofieTroopie
{
	[BepInPlugin("KimKhoa.GoofieTroopie", "Goofie Troopie", "1.0.0.0")]
	public class GoofieModBase : BaseUnityPlugin
	{
		private const string modGUID = "KimKhoa.GoofieTroopie";

		private const string modName = "Goofie Troopie";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("KimKhoa.GoofieTroopie");

		private static GoofieModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("KimKhoa.GoofieTroopie");
			mls.LogInfo((object)"Welcome Troopies :)");
			harmony.PatchAll(typeof(GoofieModBase));
			harmony.PatchAll(typeof(GoofiePatches));
		}
	}
}
namespace GoofieTroopie.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class GoofiePatches
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void Patch(ref float ___sprintMeter, ref int ___health, ref bool ___hasBeenCriticallyInjured, ref bool ___bleedingHeavily, ref bool ___criticallyInjured)
		{
			___sprintMeter = 1f;
			___hasBeenCriticallyInjured = true;
			___bleedingHeavily = true;
			___health = 1;
		}
	}
}