More strings to MongoIds

Convert constructors into primary constructors

Simplified logic with use of ??, ??= and method groups

Cleaned up redundant conditional access qualifiers
This commit is contained in:
Chomp
2025-07-14 22:29:41 +01:00
parent 26afa19387
commit 040be2feaa
150 changed files with 482 additions and 631 deletions
@@ -1,3 +1,4 @@
using System.Globalization;
using SPTarkov.DI.Annotations;
using SPTarkov.Server.Core.Models.Common;
using SPTarkov.Server.Core.Models.Eft.Bot;
@@ -44,7 +45,8 @@ public class BotLevelGenerator(
// Get random level based on the exp table.
var exp = 0;
var level = int.Parse(
ChooseBotLevel(botLevelRange.Min, botLevelRange.Max, 1, 1.15).ToString()
ChooseBotLevel(botLevelRange.Min, botLevelRange.Max, 1, 1.15)
.ToString(CultureInfo.InvariantCulture)
); // TODO - nasty double to string to int conversion
for (var i = 0; i < level; i++)
{