Merge branch 'fix-sverm-spines-off'

This commit is contained in:
kanym 2026-09-30 13:51:12 +02:00
commit 74363e12ee
2 changed files with 9 additions and 1 deletions

View file

@ -26,6 +26,7 @@ namespace RacesOfValheim
// and there is nothing left to tune.
// ─── Dorsal spines ───────────────────────────────────────────────────
public static ConfigEntry<bool> SpinesEnabled;
public static ConfigEntry<float> SpineSizeSmall;
public static ConfigEntry<float> SpineSizeFull;
public static ConfigEntry<string> SpineBoneName;
@ -231,6 +232,12 @@ namespace RacesOfValheim
"in game at 0.0625 after 1.0 blinded and 0.25 was still too bright. Above the bloom " +
"threshold more brightness buys a bigger white area and less red, so tune downward.");
// Off by default until the crest is placed properly: on a body wearing armour it came out
// through the chest and shoulder pieces instead of standing off the back.
SpinesEnabled = config.Bind(spines, "Enabled", false,
"Shows the dorsal spines from Moder on. Off by default: the crest is not placed right " +
"yet and pokes out through armour. Turning it off removes it at once.");
SpineSizeSmall = config.Bind(spines, "Size Vestigial", SvermConfig.SpineSizeSmall,
"How tall the dorsal spines stand, in metres, from Moder to the Queen.");
@ -352,6 +359,7 @@ namespace RacesOfValheim
public static float RavagerYaw => RavagerYawDegrees?.Value ?? 0f;
public static float RavagerAttackOffset => RavagerAttackOffsetValue?.Value ?? 1.5f;
public static bool Spines => SpinesEnabled?.Value ?? false;
public static float SizeSmall => SpineSizeSmall?.Value ?? SvermConfig.SpineSizeSmall;
public static float SizeFull => SpineSizeFull?.Value ?? SvermConfig.SpineSizeFull;
/// <summary>

View file

@ -424,7 +424,7 @@ namespace RacesOfValheim
// only the two numbers are live.
int state = GetRenderState(player);
float wanted = 0f;
if (IsSvermPlayer(player) && !player.IsDead() && SvermProgression.GetRules(state).SpineSize > 0f)
if (SvermConfigManagement.Spines && IsSvermPlayer(player) && !player.IsDead() && SvermProgression.GetRules(state).SpineSize > 0f)
{
wanted = state >= SvermConfig.FullWingspanState
? SvermConfigManagement.SizeFull