Expanded WeightedRandom() and GetWeightedWeatherTimePeriodMs() implementation

This commit is contained in:
Chomp
2025-01-12 16:37:28 +00:00
parent 6fcf73f223
commit 44ee0f11d5
4 changed files with 61 additions and 13 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Core.Models.Common;
using Core.Models.Enums;
using Core.Utils.Json.Converters;
@@ -107,5 +107,5 @@ public class WeatherSettings<T>
public List<T> Values { get; set; }
[JsonPropertyName("weights")]
public List<double> Weights { get; set; }
}
public List<int> Weights { get; set; }
}
@@ -0,0 +1,7 @@
namespace Core.Models.Spt.Helper;
public class WeightedRandomResult<T>
{
public T Item { get; set; }
public int Index { get; set; }
}