feat(debug): Debug config section; debug key rebindable and off by default; Log Form Hits moved from Fenrir; dead Skeleton F8 helpers removed

Requested by Dagaz.
This commit is contained in:
kanym 2026-11-13 17:07:45 +01:00
commit 0668d59a9b
6 changed files with 40 additions and 103 deletions

View file

@ -115,13 +115,14 @@ namespace RacesOfValheim
}
}
/// <summary>F8 turns the reach readout on and off.</summary>
/// <summary>The debug key (DebugConfig, F8 by default) turns the reach readout on and off.</summary>
[HarmonyPatch(typeof(Player), "Update")]
internal static class RaceMeleeReachDebugKey
{
private static void Postfix(Player __instance)
{
if (__instance != Player.m_localPlayer || !Input.GetKeyDown(KeyCode.F8)) return;
if (__instance != Player.m_localPlayer || !DebugConfig.EnableDebugKey.Value) return;
if (!DebugConfig.DebugKey.Value.IsDownIgnoringHeldKeys()) return;
RaceMeleeReach.DebugOn = !RaceMeleeReach.DebugOn;
__instance.Message(MessageHud.MessageType.TopLeft, $"[RoV reach] debug {(RaceMeleeReach.DebugOn ? "on" : "off")}");
AlfarMiner.DebugReport(__instance);