diff --git a/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs index d3c7a0b2..fec04ed2 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs @@ -265,8 +265,12 @@ public class BotGeneratorHelper( return defaultValue; } - var botEquipmentSettings = _botConfig.Equipment[GetBotEquipmentRole(botRole)]; - if (botEquipmentSettings is null) + if ( + !_botConfig.Equipment.TryGetValue( + GetBotEquipmentRole(botRole), + out var botEquipmentSettings + ) + ) { logger.Warning( serverLocalisationService.GetText( diff --git a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/BotConfig.cs b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/BotConfig.cs index 40155f3f..c97a710e 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/BotConfig.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/BotConfig.cs @@ -257,6 +257,42 @@ public record EquipmentFilters [JsonPropertyName("armorPlateWeighting")] public List? ArmorPlateWeighting { get; set; } + /// + /// Chance face shield is down/active + /// + [JsonPropertyName("faceShieldIsActiveChancePercent")] + public double? FaceShieldIsActiveChancePercent { get; set; } + + /// + /// Chance gun flashlight is active during the day + /// + [JsonPropertyName("lightIsActiveDayChancePercent")] + public double? LightIsActiveDayChancePercent { get; set; } + + /// + /// Chance gun flashlight is active during the night + /// + [JsonPropertyName("lightIsActiveNightChancePercent")] + public double? LightIsActiveNightChancePercent { get; set; } + + /// + /// Chance gun laser is active during the day + /// + [JsonPropertyName("laserIsActiveChancePercent")] + public double? LaserIsActiveChancePercent { get; set; } + + /// + /// Chance NODS are down/active during the day + /// + [JsonPropertyName("nvgIsActiveChanceDayPercent")] + public double? NvgIsActiveChanceDayPercent { get; set; } + + /// + /// Chance NODS are down/active during the night + /// + [JsonPropertyName("nvgIsActiveChanceNightPercent")] + public double? NvgIsActiveChanceNightPercent { get; set; } + [JsonPropertyName("forceRigWhenNoVest")] public bool? ForceRigWhenNoVest { get; set; } }