From 80e0637b26ec89eb2b2aa535797718309754bcfb Mon Sep 17 00:00:00 2001 From: Chomp Date: Sun, 20 Jul 2025 11:33:25 +0100 Subject: [PATCH] string to mongoid conversion Removed unnecessary nulls Cleaned up access levels for methods in `BotGenerator` --- .../SPT_Data/configs/pmc.json | 1 - .../Generators/BotGenerator.cs | 66 +++++------ .../Generators/BotInventoryGenerator.cs | 9 +- .../Generators/BotLootGenerator.cs | 8 +- .../Generators/BotWeaponGenerator.cs | 6 +- .../Models/Eft/Common/Tables/BotBase.cs | 2 +- .../Models/Eft/Common/Tables/BotType.cs | 105 +++++++++--------- .../Models/Spt/Config/PmcConfig.cs | 7 +- .../Services/BotNameService.cs | 2 +- .../Services/PostDbLoadService.cs | 2 +- 10 files changed, 96 insertions(+), 112 deletions(-) diff --git a/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/pmc.json b/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/pmc.json index 64861e43..e7db1b23 100644 --- a/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/pmc.json +++ b/Libraries/SPTarkov.Server.Assets/SPT_Data/configs/pmc.json @@ -165,7 +165,6 @@ "difficulty": "AsOnline", "botRelativeLevelDeltaMax": 10, "botRelativeLevelDeltaMin": 70, - "_isUsec": "Percentage chance PMC will be USEC", "isUsec": 60, "_pmcType": "Controls what bot brain can be chosen for each PMC bot type, the number is the weighting to be picked", "pmcType": { diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs index a1b1674e..e385137b 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs @@ -56,7 +56,7 @@ public class BotGenerator( PmcData profile ) { - var bot = GetCloneOfBotBase(); + var bot = GetBotBaseClone(); bot.Info.Settings.BotDifficulty = difficulty; bot.Info.Settings.Role = role; bot.Info.Side = Sides.Savage; @@ -121,7 +121,7 @@ public class BotGenerator( /// constructed bot public BotBase PrepareAndGenerateBot( MongoId sessionId, - BotGenerationDetails? botGenerationDetails + BotGenerationDetails botGenerationDetails ) { var preparedBotBase = GetPreparedBotBase( @@ -152,9 +152,9 @@ public class BotGenerator( /// Side bot should have /// Difficult bot should have /// Cloned bot base - public BotBase GetPreparedBotBase(string botRole, string botSide, string difficulty) + protected BotBase GetPreparedBotBase(string botRole, string botSide, string difficulty) { - var botBaseClone = GetCloneOfBotBase(); + var botBaseClone = GetBotBaseClone(); botBaseClone.Info.Settings.Role = botRole; botBaseClone.Info.Side = botSide; botBaseClone.Info.Settings.BotDifficulty = difficulty; @@ -166,7 +166,7 @@ public class BotGenerator( /// Get a clone of the database\bots\base.json file /// /// BotBase object - public BotBase GetCloneOfBotBase() + protected BotBase GetBotBaseClone() { return cloner.Clone(databaseService.GetBots().Base); } @@ -179,7 +179,7 @@ public class BotGenerator( /// Bot template from db/bots/x.json /// details on how to generate the bot /// BotBase object - public BotBase GenerateBot( + protected BotBase GenerateBot( MongoId sessionId, BotBase bot, BotType botJsonTemplate, @@ -260,8 +260,7 @@ public class BotGenerator( botGenerationDetails.BotDifficulty, botGenerationDetails.Role ); - bot.Info.Settings.UseSimpleAnimator = - botJsonTemplate.BotExperience.UseSimpleAnimator ?? false; + bot.Info.Settings.UseSimpleAnimator = botJsonTemplate.BotExperience.UseSimpleAnimator; var chosenVoiceName = weightedRandomHelper.GetWeightedValue( botJsonTemplate.BotAppearance.Voice ); @@ -322,7 +321,7 @@ public class BotGenerator( /// /// Role bot has /// True if name should be simulated pscav - public bool ShouldSimulatePlayerScav(string botRole) + protected bool ShouldSimulatePlayerScav(string botRole) { return botRole == Roles.Assault && randomUtil.GetChance100(_botConfig.ChanceAssaultScavHasPlayerScavName); @@ -335,7 +334,7 @@ public class BotGenerator( /// the killed bots difficulty /// Role of bot (optional, used for error logging) /// Experience for kill - public int GetExperienceRewardForKillByDifficulty( + protected int GetExperienceRewardForKillByDifficulty( Dictionary> experiences, string botDifficulty, string role @@ -370,7 +369,7 @@ public class BotGenerator( /// Difficulty of bot to look up /// Role of bot (optional, used for error logging) /// Standing change value - public double GetStandingChangeForKillByDifficulty( + protected double GetStandingChangeForKillByDifficulty( Dictionary standingsForKill, string botDifficulty, string role @@ -395,7 +394,7 @@ public class BotGenerator( /// Difficulty of bot to look up /// Role of bot (optional, used for error logging) /// Standing change value - public double GetAggressorBonusByDifficulty( + protected double GetAggressorBonusByDifficulty( Dictionary aggressorBonuses, string botDifficulty, string role @@ -417,7 +416,7 @@ public class BotGenerator( /// Unheard PMCs need their pockets expanded /// /// Bot data to adjust - public void AddAdditionalPocketLootWeightsForUnheardBot(BotType botJsonTemplate) + protected void AddAdditionalPocketLootWeightsForUnheardBot(BotType botJsonTemplate) { // Adjust pocket loot weights to allow for 5 or 6 items var pocketWeights = botJsonTemplate.BotGeneration.Items.PocketLoot.Weights; @@ -429,7 +428,7 @@ public class BotGenerator( /// Remove items from item.json/lootableItemBlacklist from bots inventory /// /// Bot to filter - public void RemoveBlacklistedLootFromBotTemplate(BotTypeInventory botInventory) + protected void RemoveBlacklistedLootFromBotTemplate(BotTypeInventory botInventory) { var containersToProcess = new List> { @@ -466,7 +465,7 @@ public class BotGenerator( /// Bot to adjust /// Appearance settings to choose from /// Generation details - public void SetBotAppearance( + protected void SetBotAppearance( BotBase bot, Appearance appearance, BotGenerationDetails botGenerationDetails @@ -496,10 +495,10 @@ public class BotGenerator( /// health object from bot json /// Is a pscav bot being generated /// Health object - public BotBaseHealth GenerateHealth(BotTypeHealth healthObj, bool playerScav = false) + protected BotBaseHealth GenerateHealth(BotTypeHealth healthObj, bool playerScav = false) { var bodyParts = playerScav - ? GetLowestHpBody(healthObj.BodyParts) + ? GetLowestHpBodyPart(healthObj.BodyParts) : randomUtil.GetArrayValue(healthObj.BodyParts); BotBaseHealth health = new() @@ -632,7 +631,7 @@ public class BotGenerator( /// /// Body parts /// Part with the lowest hp - public BodyPart? GetLowestHpBody(List bodyParts) + protected BodyPart? GetLowestHpBodyPart(List bodyParts) { if (bodyParts.Count == 0) { @@ -660,7 +659,7 @@ public class BotGenerator( /// /// Skills that should have their progress value randomised /// Skills - public Skills GenerateSkills(BotDbSkills botSkills) + protected Skills GenerateSkills(BotDbSkills botSkills) { var skillsToReturn = new Skills { @@ -677,15 +676,10 @@ public class BotGenerator( /// /// Skills to randomise /// Skills with randomised progress values as a collection - public List GetCommonSkillsWithRandomisedProgressValue( - Dictionary>? skills + protected List GetCommonSkillsWithRandomisedProgressValue( + Dictionary> skills ) { - if (skills is null) - { - return []; - } - return skills .Select(kvp => { @@ -711,18 +705,18 @@ public class BotGenerator( /// /// Randomise the progress value of passed in skills based on the min/max value /// - /// Skills to randomise + /// Skills to randomise /// Skills with randomised progress values as a collection - public List GetMasteringSkillsWithRandomisedProgressValue( - Dictionary>? skills + protected List GetMasteringSkillsWithRandomisedProgressValue( + Dictionary>? masteringSkills ) { - if (skills is null) + if (masteringSkills is null) { return []; } - return skills + return masteringSkills .Select(kvp => { // Get skill from dict, skip if not found @@ -749,7 +743,7 @@ public class BotGenerator( /// bot to update /// /// - public void AddIdsToBot(BotBase bot, BotGenerationDetails botGenerationDetails) + protected void AddIdsToBot(BotBase bot, BotGenerationDetails botGenerationDetails) { bot.Id = new MongoId(); bot.Aid = botGenerationDetails.IsPmc ? hashUtil.GenerateAccountId() : 0; @@ -760,7 +754,7 @@ public class BotGenerator( /// Update all inventory items that make use of this value too. /// /// Profile to update - public void GenerateInventoryId(BotBase profile) + protected void GenerateInventoryId(BotBase profile) { var newInventoryItemId = new MongoId(); @@ -799,7 +793,7 @@ public class BotGenerator( /// /// bot info object to update /// Chosen game version - public string SetRandomisedGameVersionAndCategory(Info botInfo) + protected string SetRandomisedGameVersionAndCategory(Info botInfo) { // Special case if (string.Equals(botInfo.Nickname, "nikita", StringComparison.OrdinalIgnoreCase)) @@ -841,7 +835,7 @@ public class BotGenerator( /// /// bot to add dogtag to /// - public void AddDogtagToBot(BotBase bot) + protected void AddDogtagToBot(BotBase bot) { Item inventoryItem = new() { @@ -861,7 +855,7 @@ public class BotGenerator( /// Usec/Bear /// edge_of_darkness / standard /// item tpl - public MongoId GetDogtagTplByGameVersionAndSide(string side, string gameVersion) + protected MongoId GetDogtagTplByGameVersionAndSide(string side, string gameVersion) { _pmcConfig.DogtagSettings.TryGetValue(side.ToLower(), out var gameVersionWeights); if (!gameVersionWeights.TryGetValue(gameVersion, out var possibleDogtags)) diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs index ee170ded..a7f4acb7 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs @@ -212,11 +212,8 @@ public class BotInventoryGenerator( ) // Never let mod chance go outside 0 - 100 { - randomistionDetails.EquipmentMods[equipment] = Math.Clamp( - randomistionDetails.EquipmentMods[equipment] + weight, - 0, - 100 - ); + var newWeight = weight + randomistionDetails.EquipmentMods[equipment]; + randomistionDetails.EquipmentMods[equipment] = Math.Clamp(newWeight, 0, 100); } } @@ -794,7 +791,7 @@ public class BotInventoryGenerator( sessionId, weaponSlot.Slot.ToString(), templateInventory, - botInventory.Equipment, + botInventory.Equipment.Value, equipmentChances.WeaponModsChances, botRole, isPmc, diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotLootGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotLootGenerator.cs index 369dcc51..25f0457f 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotLootGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotLootGenerator.cs @@ -411,7 +411,7 @@ public class BotLootGenerator( return null; } - var matchingValue = _pmcConfig?.LootItemLimitsRub?.FirstOrDefault(minMaxValue => + var matchingValue = _pmcConfig?.LootItemLimitsRub.FirstOrDefault(minMaxValue => botLevel >= minMaxValue.Min && botLevel <= minMaxValue.Max ); @@ -753,7 +753,7 @@ public class BotLootGenerator( BotBaseInventory botInventory, EquipmentSlots equipmentSlot, BotTypeInventory? templateInventory, - Dictionary? modChances, + Dictionary modChances, string botRole, bool isPmc, int botLevel, @@ -784,7 +784,7 @@ public class BotLootGenerator( sessionId, chosenWeaponType, templateInventory, - botInventory.Equipment, + botInventory.Equipment.Value, modChances, botRole, isPmc, @@ -795,7 +795,7 @@ public class BotLootGenerator( if (weaponRootItem is null) { logger.Error( - $"Generated loose weapon: {chosenWeaponType} for: {botRole} level: {botLevel} was null, skipping" + $"Generated null loose weapon: {chosenWeaponType} for: {botRole} level: {botLevel}, skipping" ); continue; diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs index e3343393..3a62c462 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs @@ -66,7 +66,7 @@ public class BotWeaponGenerator( MongoId sessionId, string equipmentSlot, BotTypeInventory botTemplateInventory, - string weaponParentId, + MongoId weaponParentId, Dictionary modChances, string botRole, bool isPmc, @@ -93,7 +93,7 @@ public class BotWeaponGenerator( /// Primary/secondary/holster /// e.g. assault.json /// Weapon template - public string PickWeightedWeaponTemplateFromPool( + public MongoId PickWeightedWeaponTemplateFromPool( string equipmentSlot, BotTypeInventory botTemplateInventory ) @@ -125,7 +125,7 @@ public class BotWeaponGenerator( MongoId weaponTpl, string slotName, BotTypeInventory botTemplateInventory, - string weaponParentId, + MongoId weaponParentId, Dictionary modChances, string botRole, bool isPmc, diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotBase.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotBase.cs index faec5e59..1e34bb3c 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotBase.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotBase.cs @@ -441,7 +441,7 @@ public record Skills [JsonExtensionData] public Dictionary? ExtensionData { get; set; } - public List? Common { get; set; } + public List Common { get; set; } public List? Mastering { get; set; } diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotType.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotType.cs index de09de3a..7229ac5c 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotType.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotType.cs @@ -11,34 +11,34 @@ public record BotType public Dictionary? ExtensionData { get; set; } [JsonPropertyName("appearance")] - public Appearance? BotAppearance { get; set; } + public Appearance BotAppearance { get; set; } [JsonPropertyName("chances")] - public Chances? BotChances { get; set; } + public Chances BotChances { get; set; } [JsonPropertyName("difficulty")] - public Dictionary? BotDifficulty { get; set; } + public Dictionary BotDifficulty { get; set; } [JsonPropertyName("experience")] - public Experience? BotExperience { get; set; } + public Experience BotExperience { get; set; } [JsonPropertyName("firstName")] - public List? FirstNames { get; set; } + public List FirstNames { get; set; } [JsonPropertyName("generation")] - public Generation? BotGeneration { get; set; } + public Generation BotGeneration { get; set; } [JsonPropertyName("health")] - public BotTypeHealth? BotHealth { get; set; } + public BotTypeHealth BotHealth { get; set; } [JsonPropertyName("inventory")] - public BotTypeInventory? BotInventory { get; set; } + public BotTypeInventory BotInventory { get; set; } [JsonPropertyName("lastName")] - public List? LastNames { get; set; } + public List LastNames { get; set; } [JsonPropertyName("skills")] - public BotDbSkills? BotSkills { get; set; } + public BotDbSkills BotSkills { get; set; } } public record Appearance @@ -47,22 +47,22 @@ public record Appearance public Dictionary? ExtensionData { get; set; } [JsonPropertyName("body")] - public Dictionary? Body { get; set; } + public Dictionary Body { get; set; } [JsonPropertyName("feet")] - public Dictionary? Feet { get; set; } + public Dictionary Feet { get; set; } [JsonPropertyName("hands")] [JsonConverter(typeof(ArrayToObjectFactoryConverter))] - public Dictionary? Hands { get; set; } + public Dictionary Hands { get; set; } [JsonPropertyName("head")] [JsonConverter(typeof(ArrayToObjectFactoryConverter))] - public Dictionary? Head { get; set; } + public Dictionary Head { get; set; } [JsonPropertyName("voice")] [JsonConverter(typeof(ArrayToObjectFactoryConverter))] - public Dictionary? Voice { get; set; } + public Dictionary Voice { get; set; } } public record Chances @@ -71,16 +71,13 @@ public record Chances public Dictionary? ExtensionData { get; set; } [JsonPropertyName("equipment")] - public Dictionary? EquipmentChances { get; set; } + public Dictionary EquipmentChances { get; set; } [JsonPropertyName("weaponMods")] - public Dictionary? WeaponModsChances { get; set; } + public Dictionary WeaponModsChances { get; set; } [JsonPropertyName("equipmentMods")] - public Dictionary? EquipmentModsChances { get; set; } - - [JsonPropertyName("mods")] - public Dictionary? Mods { get; set; } + public Dictionary EquipmentModsChances { get; set; } } /* record removed in favor of Dictionary @@ -257,16 +254,16 @@ public record Difficulties public Dictionary? ExtensionData { get; set; } [JsonPropertyName("easy")] - public DifficultyCategories? Easy { get; set; } + public DifficultyCategories Easy { get; set; } [JsonPropertyName("normal")] - public DifficultyCategories? Normal { get; set; } + public DifficultyCategories Normal { get; set; } [JsonPropertyName("hard")] - public DifficultyCategories? Hard { get; set; } + public DifficultyCategories Hard { get; set; } [JsonPropertyName("impossible")] - public DifficultyCategories? Impossible { get; set; } + public DifficultyCategories Impossible { get; set; } } public record DifficultyCategories @@ -312,25 +309,25 @@ public record Experience /// key = bot difficulty /// [JsonPropertyName("aggressorBonus")] - public Dictionary? AggressorBonus { get; set; } + public Dictionary AggressorBonus { get; set; } [JsonPropertyName("level")] - public MinMax? Level { get; set; } + public MinMax Level { get; set; } /// /// key = bot difficulty /// [JsonPropertyName("reward")] - public Dictionary>? Reward { get; set; } + public Dictionary> Reward { get; set; } /// /// key = bot difficulty /// [JsonPropertyName("standingForKill")] - public Dictionary? StandingForKill { get; set; } + public Dictionary StandingForKill { get; set; } [JsonPropertyName("useSimpleAnimator")] - public bool? UseSimpleAnimator { get; set; } + public bool UseSimpleAnimator { get; set; } } public record Generation @@ -339,7 +336,7 @@ public record Generation public Dictionary? ExtensionData { get; set; } [JsonPropertyName("items")] - public GenerationWeightingItems? Items { get; set; } + public GenerationWeightingItems Items { get; set; } } public record GenerationData @@ -351,14 +348,14 @@ public record GenerationData /// key: number of items, value: weighting /// [JsonPropertyName("weights")] - public Dictionary? Weights { get; set; } + public Dictionary Weights { get; set; } /// /// Array of item tpls /// [JsonPropertyName("whitelist")] [JsonConverter(typeof(ArrayToObjectFactoryConverter))] - public Dictionary? Whitelist { get; set; } + public Dictionary Whitelist { get; set; } } public record GenerationWeightingItems @@ -411,13 +408,13 @@ public record BotTypeHealth [JsonExtensionData] public Dictionary? ExtensionData { get; set; } - public List? BodyParts { get; set; } + public List BodyParts { get; set; } - public MinMax? Energy { get; set; } + public MinMax Energy { get; set; } - public MinMax? Hydration { get; set; } + public MinMax Hydration { get; set; } - public MinMax? Temperature { get; set; } + public MinMax Temperature { get; set; } } public record BodyPart @@ -425,19 +422,19 @@ public record BodyPart [JsonExtensionData] public Dictionary? ExtensionData { get; set; } - public MinMax? Chest { get; set; } + public MinMax Chest { get; set; } - public MinMax? Head { get; set; } + public MinMax Head { get; set; } - public MinMax? LeftArm { get; set; } + public MinMax LeftArm { get; set; } - public MinMax? LeftLeg { get; set; } + public MinMax LeftLeg { get; set; } - public MinMax? RightArm { get; set; } + public MinMax RightArm { get; set; } - public MinMax? RightLeg { get; set; } + public MinMax RightLeg { get; set; } - public MinMax? Stomach { get; set; } + public MinMax Stomach { get; set; } } public record BotTypeInventory @@ -446,15 +443,15 @@ public record BotTypeInventory public Dictionary? ExtensionData { get; set; } [JsonPropertyName("equipment")] - public Dictionary>? Equipment { get; set; } + public Dictionary> Equipment { get; set; } - public Dictionary>? Ammo { get; set; } + public Dictionary> Ammo { get; set; } [JsonPropertyName("items")] - public ItemPools? Items { get; set; } + public ItemPools Items { get; set; } [JsonPropertyName("mods")] - public GlobalMods? Mods { get; set; } + public GlobalMods Mods { get; set; } } public record Equipment @@ -496,15 +493,15 @@ public record ItemPools [JsonExtensionData] public Dictionary? ExtensionData { get; set; } - public Dictionary? Backpack { get; set; } + public Dictionary Backpack { get; set; } - public Dictionary? Pockets { get; set; } + public Dictionary Pockets { get; set; } - public Dictionary? SecuredContainer { get; set; } + public Dictionary SecuredContainer { get; set; } - public Dictionary? SpecialLoot { get; set; } + public Dictionary SpecialLoot { get; set; } - public Dictionary? TacticalVest { get; set; } + public Dictionary TacticalVest { get; set; } } public record BotDbSkills @@ -512,7 +509,7 @@ public record BotDbSkills [JsonExtensionData] public Dictionary? ExtensionData { get; set; } - public Dictionary>? Common { get; set; } + public Dictionary> Common { get; set; } public Dictionary>? Mastering { get; set; } } diff --git a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/PmcConfig.cs b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/PmcConfig.cs index 88dc22b4..934c7407 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/PmcConfig.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/PmcConfig.cs @@ -73,9 +73,6 @@ public record PmcConfig : BaseConfig [JsonPropertyName("looseWeaponInBackpackLootMinMax")] public required MinMax LooseWeaponInBackpackLootMinMax { get; set; } - [JsonPropertyName("_isUsec")] - public string? IsUsecDescription { get; set; } - /// /// Percentage chance PMC will be USEC /// @@ -143,10 +140,10 @@ public record PmcConfig : BaseConfig public required bool AddSecureContainerLootFromBotConfig { get; set; } [JsonPropertyName("lootItemLimitsRub")] - public required List? LootItemLimitsRub { get; set; } + public required List LootItemLimitsRub { get; set; } [JsonPropertyName("removeExistingPmcWaves")] - public required bool? RemoveExistingPmcWaves { get; set; } + public required bool RemoveExistingPmcWaves { get; set; } [JsonPropertyName("dogtags")] public required Dictionary< diff --git a/Libraries/SPTarkov.Server.Core/Services/BotNameService.cs b/Libraries/SPTarkov.Server.Core/Services/BotNameService.cs index 163371b1..46000a69 100644 --- a/Libraries/SPTarkov.Server.Core/Services/BotNameService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/BotNameService.cs @@ -25,7 +25,7 @@ public class BotNameService( protected readonly HashSet _usedNameCache = []; /// - /// Clear out any entries in Name Set + /// Clear out generated pmc names from cache /// public void ClearNameCache() { diff --git a/Libraries/SPTarkov.Server.Core/Services/PostDbLoadService.cs b/Libraries/SPTarkov.Server.Core/Services/PostDbLoadService.cs index 68a44588..18592bb4 100644 --- a/Libraries/SPTarkov.Server.Core/Services/PostDbLoadService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/PostDbLoadService.cs @@ -66,7 +66,7 @@ public class PostDbLoadService( openZoneService.ApplyZoneChangesToAllMaps(); } - if (_pmcConfig.RemoveExistingPmcWaves.GetValueOrDefault(false)) + if (_pmcConfig.RemoveExistingPmcWaves) { RemoveExistingPmcWaves(); }