RacesOfValheim/JotunnModStub/Butler/ButlerConfig.cs
2026-08-16 07:44:44 +02:00

50 lines
2.6 KiB
C#

using BepInEx.Configuration;
namespace RacesOfValheim
{
/// <summary>
/// The four knobs the Bone Servant exposes, and deliberately only four.
///
/// Butler_BoneServant.txt sec. 14 turned down "expose everything": tick cadence, safety margins,
/// penalty-box time and the spacing between tables are constants in the code, because they are
/// numbers that get tuned once during the test and then never again - and every config entry is
/// maintained forever.
///
/// The sigil is here for a different reason from the other three. It is a PLACEHOLDER: bone
/// fragments stand in for a craftable sigil that only gets made if the feature leaves the test,
/// and being able to move the mark onto another item without a rebuild is the whole point of the
/// entry.
/// </summary>
public static class ButlerConfig
{
public static ConfigEntry<string> SigilItem;
public static ConfigEntry<float> WorkRadius;
public static ConfigEntry<float> FuelThreshold;
public static ConfigEntry<float> ResummonSeconds;
public static void Bind(ConfigFile config)
{
const string section = "Butler - Bone Servant";
SigilItem = config.Bind(section, "Sigil Item", "BoneFragments",
new ConfigDescription("Prefab name of the item that marks a chest as the servant's. " +
"A chest holding at least one of these is worked from and " +
"delivered to; every other chest is left alone. The sigil itself " +
"is never taken and never processed."));
WorkRadius = config.Bind(section, "Work Radius", 20f,
new ConfigDescription("Metres from the Servant's Table within which chests and stations " +
"are served.", new AcceptableValueRange<float>(5f, 40f)));
FuelThreshold = config.Bind(section, "Fuel Threshold", 0.25f,
new ConfigDescription("Refuel a station when its fuel drops below this fraction of its " +
"maximum, and only while it has something to work on.",
new AcceptableValueRange<float>(0f, 1f)));
ResummonSeconds = config.Bind(section, "Resummon Cooldown", 0f,
new ConfigDescription("Seconds that must pass before a fallen servant can be raised " +
"again. Zero is free and immediate, which is what the test runs on.",
new AcceptableValueRange<float>(0f, 600f)));
}
}
}