* 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>
25 lines
404 B
C#
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);
|
|
}
|
|
}
|