Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of WeaponDamageMod v0.1.1
plugins/WeaponDamageMod.dll
Decompiled 3 hours agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; 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("WeaponDamageMod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("WeaponDamageMod")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("0d5b48e2-6419-42d0-ad35-7754a52a60b7")] [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 WeaponDamageMod; [BepInPlugin("mariothinks.WeaponDamage", "WeaponDamageMod", "0.0.1.0")] public class Plugin : BaseUnityPlugin { internal static ManualLogSource Log; internal static ConfigEntry<int> ShovelDamage; internal static ConfigEntry<int> KnifeDamage; internal static ConfigEntry<float> ShotgunMultiplier; private void Awake() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; ShovelDamage = ((BaseUnityPlugin)this).Config.Bind<int>("Weapons", "ShovelDamage", 1, "Shovel hit force (default: 1)"); KnifeDamage = ((BaseUnityPlugin)this).Config.Bind<int>("Weapons", "KnifeDamage", 1, "Knife hit force (default: 1)"); ShotgunMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("Weapons", "ShotgunMultiplier", 1f, "Shotgun damage multiplier (default: 1.0)"); new Harmony("mariothinks.WeaponDamage").PatchAll(); Log.LogInfo((object)"WeaponDamage loaded!"); } } [HarmonyPatch(typeof(Shovel), "Start")] internal class ShovelPatch { private static void Prefix(Shovel __instance) { __instance.shovelHitForce = Plugin.ShovelDamage.Value; } } [HarmonyPatch(typeof(KnifeItem), "Start")] internal class KnifePatch { private static void Prefix(KnifeItem __instance) { __instance.knifeHitForce = Plugin.KnifeDamage.Value; } } [HarmonyPatch(typeof(ShotgunItem), "Start")] internal class ShotgunPatch { public static bool isShotgunFiring = true; private static void Prefix() { isShotgunFiring = true; } private static void Postfix() { isShotgunFiring = false; } } [HarmonyPatch(typeof(EnemyAI), "HitEnemyOnLocalClient")] internal class EnemyHitPatch { private static void Prefix(ref int force) { if (ShotgunPatch.isShotgunFiring) { force = (int)((float)force * Plugin.ShotgunMultiplier.Value); } } }