mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* documentation pass on content.server -> E! * APi pass on content.server for the E folder. * documentation pass on content.shared for e. * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> * fixing documentation according to review part 1. * typo * Very minor fixes * And a short explanation about EUI --------- Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
29 lines
913 B
C#
29 lines
913 B
C#
using Content.Shared.EntityTable.EntitySelectors;
|
|
using JetBrains.Annotations;
|
|
using Robust.Shared.Random;
|
|
|
|
namespace Content.Shared.EntityTable.ValueSelector;
|
|
|
|
/// <summary>
|
|
/// Used for implementing custom value selection for <see cref="EntityTableSelector"/>
|
|
/// </summary>
|
|
[ImplicitDataDefinitionForInheritors, UsedImplicitly(ImplicitUseTargetFlags.WithInheritors)]
|
|
public abstract partial class NumberSelector
|
|
{
|
|
/// <summary>
|
|
/// Returns a value for this selector given a randomizer.
|
|
/// </summary>
|
|
public abstract int Get(IRobustRandom rand);
|
|
|
|
/// <summary>
|
|
/// Odds of occurrence
|
|
/// </summary>
|
|
/// <returns>An odds multiplier of at least one occurrence</returns>
|
|
public abstract float Odds();
|
|
|
|
/// <summary>
|
|
/// Average number of occurrences
|
|
/// </summary>
|
|
/// <returns>The average amount of occurrences</returns>
|
|
public abstract float Average();
|
|
}
|