1.0 compatibility
This commit is contained in:
parent
5104f86ede
commit
6193b3ee2d
33 changed files with 712 additions and 49 deletions
|
|
@ -95,6 +95,36 @@ namespace RacesOfValheim
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether this character carries a claimed personal tier at all. Distinct from
|
||||
/// "PersonalState == MinState": the getter answers MinState for a character who has never
|
||||
/// claimed anything AND for one who has been reset, and the Reset Progression button needs
|
||||
/// to tell the player which of the two just happened.
|
||||
/// </summary>
|
||||
public static bool HasPersonalState
|
||||
{
|
||||
get
|
||||
{
|
||||
Player player = Player.m_localPlayer;
|
||||
if (player == null || player.m_customData == null) return false;
|
||||
return player.m_customData.ContainsKey(PersonalStateKey);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gives back every tier claimed with a boss relic. The key is removed rather than written
|
||||
/// back as MinState so the character reads as one that never claimed anything - which is
|
||||
/// what a reset means, and what HasPersonalState above then reports.
|
||||
///
|
||||
/// The relics themselves do not come back: RaceMenuWardBehavior.UseItem consumed them.
|
||||
/// </summary>
|
||||
public static void ClearPersonalState()
|
||||
{
|
||||
Player player = Player.m_localPlayer;
|
||||
if (player == null || player.m_customData == null) return;
|
||||
player.m_customData.Remove(PersonalStateKey);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the current progression state of the world based on defeated bosses.
|
||||
/// 1 = No bosses defeated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue