Files
tbd-station-14/Content.Shared/Destructible/Thresholds/MinMax.cs
deltanedas a3a1538d32 move gamerule components to shared (#28572)
* move MinMax to shared

* cleanup MinMax

* move other ticking components to shared just because

* remove unused prototype file

* update everything to use shared components

* test

* test 2

* test 3

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2024-06-04 21:53:24 +10:00

25 lines
404 B
C#

using Robust.Shared.Random;
namespace Content.Shared.Destructible.Thresholds;
[DataDefinition, Serializable]
public partial struct MinMax
{
[DataField]
public int Min;
[DataField]
public int Max;
public MinMax(int min, int max)
{
Min = min;
Max = max;
}
public int Next(IRobustRandom random)
{
return random.Next(Min, Max + 1);
}
}