CatStation/Content.Shared/EntityTable/ValueSelector/NumberSelector.cs
Ewanderer d7f7a91183
Documentation of e api (#44395)
* 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>
2026-07-01 08:38:04 +00:00

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();
}