bugfix 24/09/26

This commit is contained in:
Ferdinando 2026-09-24 10:30:39 +02:00
commit 9bebcf340b
7 changed files with 205 additions and 31 deletions

View file

@ -135,9 +135,15 @@ namespace RacesOfValheim {
}
else if (!isNight && wasNight)
{
// Sunrise: force revert and block transforming again for a while
sunSicknessTimer = FenrirConfig.SunSicknessDuration.Value;
ForceRevert();
// Sunrise: a form that was granted for the night only is taken back, and the
// beast is tired for a while. A form the progression lets through by day (Queen's
// Fenrir, Fader's Cultist, Bonemass's Wolf) is not the sun's to take: activeRules is
// what the transform was actually granted under.
if (activeRules == null || activeRules.NeedsNight)
{
sunSicknessTimer = FenrirConfig.SunSicknessDuration.Value;
ForceRevert();
}
}
wasNight = isNight;
@ -166,7 +172,9 @@ namespace RacesOfValheim {
{
if (rules == null || rules.Form == FenrirProgression.FormType.None) return;
if (sunSicknessTimer > 0f)
// The tiredness is the sun's doing, so it only stands in the way of a night form; the
// forms allowed by day would otherwise be locked out right after every sunrise.
if (rules.NeedsNight && sunSicknessTimer > 0f)
{
Player.m_localPlayer.Message(MessageHud.MessageType.Center, "The beast is tired");
return;