Decompiled source of GodMode v1.0.0

plugins/GodModeByWaynethepro250.dll

Decompiled a month ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Assets.Scripts.Inventory__Items__Pickups;
using BepInEx;
using BepInEx.Unity.IL2CPP;
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("firstmod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("firstmod")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("23b709b4-55e0-4ba2-b35f-80102d64fe1e")]
[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")]
[BepInPlugin("com.waynethepro250.godmode", "GodMode by waynethepro250", "1.0.0")]
public class GodModeByWayne : BasePlugin
{
	public override void Load()
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		((BasePlugin)this).Log.LogInfo((object)"GodMode by waynethepro250 loaded!");
		new Harmony("com.waynethepro250.godmode").PatchAll();
	}
}
[HarmonyPatch(typeof(PlayerHealth))]
internal static class PlayerHealthPatches
{
	[HarmonyPatch("CanTakeDamage")]
	[HarmonyPrefix]
	private static bool CanTakeDamage_Prefix(ref bool __result)
	{
		__result = false;
		Debug.Log((object)"[GodMode by waynethepro250] CanTakeDamage() called — returning false.");
		return false;
	}

	[HarmonyPatch("DamagePlayer")]
	[HarmonyPrefix]
	private static bool DamagePlayer_Prefix()
	{
		Debug.Log((object)"[GodMode by waynethepro250] DamagePlayer() called — blocked damage.");
		return false;
	}
}