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:
parent
b431bb9d1f
commit
0668d59a9b
6 changed files with 40 additions and 103 deletions
|
|
@ -100,9 +100,6 @@ namespace RacesOfValheim
|
|||
public static ConfigEntry<float> UlvAttackRadius;
|
||||
public static ConfigEntry<float> UlvPushForce;
|
||||
|
||||
// ─── Debug ─────────────────────────────────────────────────────────────
|
||||
public static ConfigEntry<bool> DebugFormHits;
|
||||
|
||||
// ─── Appearance (per player, never synced) ──────────────────────────────
|
||||
public static ConfigEntry<bool> ReadyMessage;
|
||||
public static ConfigEntry<bool> EyeGlow;
|
||||
|
|
@ -268,10 +265,6 @@ namespace RacesOfValheim
|
|||
// Tried at 1.2 in game: the orange was too strong. 0.9 checked and kept.
|
||||
EyeReadyStrength = config.Bind(appearance, "Eye Ready Strength", 0.9f,
|
||||
new ConfigDescription("Glow at night while a form is ready.", new AcceptableValueRange<float>(0f, 3f)));
|
||||
|
||||
// "debug" in the key keeps it local - see ConfigSync.
|
||||
DebugFormHits = config.Bind("Fenrir - Debug", "Debug: Log Form Hits", false,
|
||||
new ConfigDescription("Writes one log line per claw or bite: what was in reach, what it hit, and why anything was skipped. For bug reports about attacks that do no damage."));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -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.");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue