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

@ -342,7 +342,7 @@ namespace RacesOfValheim
/// </summary>
public static void LogMiss(string form, Collider hit, string reason)
{
if (!FenrirConfig.DebugFormHits.Value) return;
if (!DebugConfig.LogFormHits.Value) return;
Jotunn.Logger.LogInfo($"[FenrirForm] {form} swing skipped '{hit.name}' (layer {LayerMask.LayerToName(hit.gameObject.layer)}): {reason}.");
}
@ -436,14 +436,14 @@ namespace RacesOfValheim
public static void LogHit(string form, IDestructible target, float damage)
{
if (!FenrirConfig.DebugFormHits.Value) return;
if (!DebugConfig.LogFormHits.Value) return;
string name = target is MonoBehaviour behaviour && behaviour != null ? behaviour.name : target.ToString();
Jotunn.Logger.LogInfo($"[FenrirForm] {form} swing hit '{name}' for {damage:0}.");
}
public static void LogSwing(string form, int candidates)
{
if (!FenrirConfig.DebugFormHits.Value) return;
if (!DebugConfig.LogFormHits.Value) return;
Jotunn.Logger.LogInfo($"[FenrirForm] {form} swing: {candidates} collider(s) in reach.");
}
}