warvulture
This commit is contained in:
parent
e9d6e78ec8
commit
4b95e705e7
9 changed files with 418 additions and 12 deletions
|
|
@ -15,7 +15,7 @@ namespace RacesOfValheim
|
|||
{
|
||||
public const string PluginGUID = "com.nandor.racesofvalheim";
|
||||
public const string PluginName = "Races Of Valheim";
|
||||
public const string PluginVersion = "1.4.5";
|
||||
public const string PluginVersion = "1.4.6";
|
||||
|
||||
private readonly Harmony harmony = new Harmony(PluginGUID);
|
||||
|
||||
|
|
@ -123,6 +123,25 @@ namespace RacesOfValheim
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears the boss-progression override and falls back to the natural world state.
|
||||
/// Shared by the resetprogression console command and the Race Menu Ward.
|
||||
/// </summary>
|
||||
public static int ResetProgression()
|
||||
{
|
||||
BossProgressionManager.DebugState = -1;
|
||||
int state = BossProgressionManager.GetCurrentProgressionState();
|
||||
|
||||
Player player = Player.m_localPlayer;
|
||||
if (player != null)
|
||||
{
|
||||
player.Message(MessageHud.MessageType.Center, $"Progression reset to: {state}");
|
||||
Traverse.Create(player).Method("SetupEquipment").GetValue();
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Strips whatever body-part weapon the outgoing race grew. The Aswid/Fenrir claws
|
||||
/// (RaceClawSet) and the Sverm's Chitin Claws (SvermClawSlot) are quest items a player can
|
||||
|
|
@ -1238,14 +1257,8 @@ namespace RacesOfValheim
|
|||
|
||||
public override void Run(string[] args)
|
||||
{
|
||||
BossProgressionManager.DebugState = -1;
|
||||
int state = BossProgressionManager.GetCurrentProgressionState();
|
||||
int state = RacesOfValheim.ResetProgression();
|
||||
Console.instance.Print($"[DEBUG] Progression state reset to natural world state: {state}");
|
||||
if (Player.m_localPlayer != null)
|
||||
{
|
||||
Player.m_localPlayer.Message(MessageHud.MessageType.Center, $"Progression reset to: {state}");
|
||||
Traverse.Create(Player.m_localPlayer).Method("SetupEquipment").GetValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue