32 lines
1.7 KiB
C#
32 lines
1.7 KiB
C#
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."));
|
|
}
|
|
}
|
|
}
|