mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* push * fix * push * abstract and more accurate * new abstract method I guess * that table does not explode * webedit major * Update Content.Shared/EntityTable/ValueSelector/BinomialNumberSelector.cs Co-authored-by: SnappingOpossum <snappingopossum@outlook.com> * big ass merge conflicts * sadas * review --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> Co-authored-by: Tayrtahn <tayrtahn@gmail.com> Co-authored-by: SnappingOpossum <snappingopossum@outlook.com>
26 lines
786 B
C#
26 lines
786 B
C#
using Content.Shared.EntityTable.EntitySelectors;
|
|
using JetBrains.Annotations;
|
|
|
|
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
|
|
{
|
|
public abstract int Get(System.Random 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();
|
|
}
|