Add linter-friendly WeightedRandom prototypes (#18729)

This commit is contained in:
Vordenburg
2023-08-05 22:31:25 -04:00
committed by GitHub
parent 9c84108672
commit cc8b642444
16 changed files with 88 additions and 21 deletions

View File

@@ -0,0 +1,13 @@
using Robust.Shared.Prototypes;
namespace Content.Shared.Random;
/// <summary>
/// IWeightedRandomPrototype implements a dictionary of strings to float weights
/// to be used with <see cref="Helpers.SharedRandomExtensions.Pick(IWeightedRandomPrototype, Robust.Shared.Random.IRobustRandom)" />.
/// </summary>
public interface IWeightedRandomPrototype : IPrototype
{
[ViewVariables]
public Dictionary<string, float> Weights { get; }
}