feat(aswid): let players toggle the Vampiric Aura, move Devour off I

The Vampiric Aura had no on/off switch - it always drains/executes
nearby targets in every form. I now toggles it (AswidRace.AuraEnabled,
on by default), matching the existing toggle pattern already used for
Devour.

Devour's own toggle moves off I to make room and stays on by default;
its keybind is unbound (KeyCode.None) rather than removed outright, so
it remains a real Configuration Manager entry for anyone who wants to
bind their own key to it.
This commit is contained in:
kanym 2026-08-09 17:11:25 +02:00
commit 9e4778def7
3 changed files with 22 additions and 3 deletions

View file

@ -529,6 +529,13 @@ namespace RacesOfValheim
ZNetView nview = __instance.GetComponent<ZNetView>();
if (nview != null && nview.IsValid() && nview.GetZDO().GetString("RacesOfValheim_Race", "Human") == "Aswid")
{
if (__instance == Player.m_localPlayer && RaceInput.Allowed && AswidConfig.ToggleAuraKey.Value.IsDownIgnoringHeldKeys())
{
AswidRace.AuraEnabled = !AswidRace.AuraEnabled;
string msg = AswidRace.AuraEnabled ? "Vampiric Aura: ENABLED" : "Vampiric Aura: DISABLED";
__instance.Message(MessageHud.MessageType.Center, msg);
}
if (__instance == Player.m_localPlayer && RaceInput.Allowed && AswidConfig.ToggleDevourKey.Value.IsDownIgnoringHeldKeys())
{
AswidRace.DevourEnabled = !AswidRace.DevourEnabled;