feat(skeleton): dark aura while Summon on Kill is on, archaic toggle messages

Beside the Raise the Dead icon, a faint near-black smoke now rises off
the whole body while Summon on Kill is on: the Draugr's looping smoke,
borrowed like the Draugh aura, emitted from a body-sized box in world
space. The owner writes the switch to the ZDO, so other players see
it. "Raise the Dead Icon" and "Raise the Dead Aura" under Skeleton -
Visuals let each player keep either or both, for a community vote.

The toggle now says "Thy dead shall rise again." / "Raising...
nevermore.", in English, Italian and Russian.
This commit is contained in:
kanym 2026-10-24 15:38:42 +02:00
commit 98b1a1b5f3
7 changed files with 143 additions and 8 deletions

View file

@ -106,7 +106,22 @@ namespace RacesOfValheim
}
}
SetRaiseDeadIcon(player, rules.SummonOnKill && SummonOnKillEnabled);
bool on = rules.SummonOnKill && SummonOnKillEnabled;
SetRaiseDeadIcon(player, on && SkeletonConfig.RaiseDeadIcon.Value);
Instance?.raisingAura.Apply(player, on && SkeletonConfig.RaiseDeadAura.Value);
SetRaisingFlag(player, on);
}
private readonly SkeletonVisuals.RaisingAura raisingAura = new SkeletonVisuals.RaisingAura();
/// <summary>Owner only, and only on a change, so other clients can draw the aura.</summary>
private static void SetRaisingFlag(Player player, bool on)
{
ZNetView nview = player.GetComponent<ZNetView>();
if (nview == null || !nview.IsValid() || !nview.IsOwner()) return;
ZDO zdo = nview.GetZDO();
if (zdo.GetBool(SkeletonVisuals.RaisingZdoKey, false) != on) zdo.Set(SkeletonVisuals.RaisingZdoKey, on);
}
private static void SetRaiseDeadIcon(Player player, bool on)
@ -340,6 +355,8 @@ namespace RacesOfValheim
headFlame.Apply(Player.m_localPlayer, false);
RestoreJawBone();
SetRaiseDeadIcon(Player.m_localPlayer, false);
raisingAura.Apply(Player.m_localPlayer, false);
SetRaisingFlag(Player.m_localPlayer, false);
if (Player.m_localPlayer.transform.localScale != Vector3.one)
{