1.0 compatibility

This commit is contained in:
Ferdinando 2026-09-10 18:05:24 +02:00
commit 6193b3ee2d
33 changed files with 712 additions and 49 deletions

View file

@ -163,6 +163,10 @@ namespace RacesOfValheim
public class RaceMenuWardBehavior : MonoBehaviour, Hoverable, Interactable
{
// New in Valheim 1.0: Hoverable gained this. Every vanilla implementation returns a
// serialised m_hoverOffset, which is 0 unless the prefab sets one, so 0 is vanilla behaviour.
public float GetHoverOffset() => 0f;
public string GetHoverName() => "Race Menu Ward";
public string GetHoverText()
@ -286,9 +290,12 @@ namespace RacesOfValheim
RacesOfValheim.ResetRace();
});
// Refresh and not Close: unlike Reset Race, this one leaves the panel up so the two
// World/Personal lines visibly change under the player. That is also how the old
// no-op was noticed - the numbers stayed put while the message claimed a reset.
AddButton("ResetProgressionBtn", "Reset Progression", new Vector2(170, -110), new Color(0.5f, 0.4f, 0.2f, 1f), () =>
{
RacesOfValheim.ResetProgression();
RacesOfValheim.ResetProgression(out _);
Refresh();
});