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
32
JotunnModStub/DebugConfig.cs
Normal file
32
JotunnModStub/DebugConfig.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using UnityEngine;
|
||||
using BepInEx.Configuration;
|
||||
|
||||
namespace RacesOfValheim
|
||||
{
|
||||
/// <summary>
|
||||
/// The mod-wide debug switches, in one "Debug" section rather than one per race. Bound last
|
||||
/// from RacesOfValheim.Awake(), so Configuration Manager lists the section at the bottom.
|
||||
///
|
||||
/// Every entry stays local (never synced from the server): ConfigSync leaves KeyboardShortcut
|
||||
/// entries and any key containing "debug" alone, so keep "Debug" in the key names.
|
||||
/// </summary>
|
||||
public static class DebugConfig
|
||||
{
|
||||
public static ConfigEntry<bool> EnableDebugKey;
|
||||
public static ConfigEntry<KeyboardShortcut> DebugKey;
|
||||
public static ConfigEntry<bool> LogFormHits;
|
||||
|
||||
public static void Bind(ConfigFile config)
|
||||
{
|
||||
const string section = "Debug";
|
||||
EnableDebugKey = config.Bind(section, "Debug: Enable Debug Key", false,
|
||||
new ConfigDescription("Turns on the debug key below. Leave it off unless you are sending a bug report."));
|
||||
DebugKey = config.Bind(section, "Debug Key", new KeyboardShortcut(KeyCode.F8),
|
||||
new ConfigDescription("Toggles the melee reach readout (top left and log) and writes what the Alfar drones and the camera's target are doing to the log."));
|
||||
// Was "Fenrir - Debug" / "Debug: Log Form Hits" until v1.6.10. It covers the Skadi,
|
||||
// Sverm and Trol forms too (FormMelee.LogHit), so it moved here.
|
||||
LogFormHits = config.Bind(section, "Debug: Log Form Hits", false,
|
||||
new ConfigDescription("Writes one log line per form claw, bite or swing: what was in reach, what it hit, and why anything was skipped. For bug reports about attacks that do no damage."));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue