IWeightedRandom.cs 444 B

12345678910111213
  1. using Robust.Shared.Prototypes;
  2. namespace Content.Shared.Random;
  3. /// <summary>
  4. /// IWeightedRandomPrototype implements a dictionary of strings to float weights
  5. /// to be used with <see cref="Helpers.SharedRandomExtensions.Pick(IWeightedRandomPrototype, Robust.Shared.Random.IRobustRandom)" />.
  6. /// </summary>
  7. public interface IWeightedRandomPrototype : IPrototype
  8. {
  9. [ViewVariables]
  10. public Dictionary<string, float> Weights { get; }
  11. }