Infer NumberSelector type in EntityTables (#36568)

* Infer number selector types from context

* forgor
This commit is contained in:
Nemanja
2025-05-14 21:21:54 -04:00
committed by GitHub
parent 338665a3ca
commit 91e441ada1
3 changed files with 65 additions and 10 deletions

View File

@@ -8,6 +8,11 @@ public sealed partial class RangeNumberSelector : NumberSelector
[DataField]
public Vector2i Range = new(1, 1);
public RangeNumberSelector(Vector2i range)
{
Range = range;
}
public override int Get(System.Random rand)
{
// rand.Next() is inclusive on the first number and exclusive on the second number,