fix: Adds reset RNG command (#1201)
This commit is contained in:
parent
28040582bc
commit
24e2696510
2 changed files with 30 additions and 3 deletions
20
Projects/UOContent/Commands/ResetRng.cs
Normal file
20
Projects/UOContent/Commands/ResetRng.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using Server.Random;
|
||||
|
||||
namespace Server.Commands;
|
||||
|
||||
public class ResetRng
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("RestRng", AccessLevel.Administrator, ResetRng_OnCommand);
|
||||
}
|
||||
|
||||
[Usage("RestRng")]
|
||||
[Description(
|
||||
"Resets the global RNG. Use with care! Do not reset often as this will affect the over-all distribution."
|
||||
)]
|
||||
private static void ResetRng_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
RandomSources.SetRng(new Xoshiro256PlusPlus());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue