API-level Random instance
MaxWasUnavailable opened this issue · comments
Is your feature request related to a problem? Please describe.
I feel like it'd be cleaner to have a single random I can reuse everywhere, rather than make one for each mod I have that needs a Random instance.
Describe the solution you'd like
Something akin to
using LethalAPI.Random
// (...)
APIRandom.Next()
// (...)
Describe alternatives you've considered
Using a Random instance per mod that uses it.
Additional context
It's a very minor thing, but there might be benefits to having a "global" random anyone can use. People that require a specific seed still need their own instance, though.
This is probably useless because of Random that mscorlib/System.Private.Corelib have by default. Is there anything else that you would think that can make this standout of the default random?
Unity ransoms are a static and via a range. Depending on use case this may work.