using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
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("ValheimModeOne")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ValheimModeOne")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e41876c3-3312-4f78-9fe2-c032c9127d44")]
[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 NoWaveShipDamage;
[BepInPlugin("srettellareves.NoWaveShipDamage", "No Wave Ship Damage", "1.0.0")]
[BepInProcess("valheim.exe")]
public class BepInExPlugin : BaseUnityPlugin
{
[HarmonyPatch(typeof(Ship), "Awake")]
private static class Awake_Patch
{
private static void Postfix(ref float ___m_waterImpactDamage)
{
Debug.Log((object)$"Current water impact damage: {___m_waterImpactDamage}");
___m_waterImpactDamage = 0f;
Debug.Log((object)$"Patched water impact damage: {___m_waterImpactDamage}");
}
}
private readonly Harmony harmony = new Harmony("srettellareves.NoWaveShipDamage");
private void Awake()
{
harmony.PatchAll();
}
private void OnDestroy()
{
harmony.UnpatchSelf();
}
}