diff --git a/Libraries/SPTarkov.Server.Core/Services/BotWeaponModLimitService.cs b/Libraries/SPTarkov.Server.Core/Services/BotWeaponModLimitService.cs index 1d0746fa..2916e680 100644 --- a/Libraries/SPTarkov.Server.Core/Services/BotWeaponModLimitService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/BotWeaponModLimitService.cs @@ -113,7 +113,7 @@ public class BotWeaponModLimitService(ISptLogger logge var modIsLightOrLaser = itemHelper.IsOfBaseclasses(modTemplate.Id, modLimits.FlashlightLaserBaseTypes); if (modIsLightOrLaser) { - return WeaponModLimitReached(modTemplate.Id, modLimits.FlashlightLaser, modLimits.FlashlightLaserMax ?? 0, botRole); + return WeaponModLimitReached(modTemplate.Id, modLimits.FlashlightLaser, modLimits.FlashlightLaserMax ?? 0, botRole, "light/laser"); } // Mod is a mount that can hold only flashlights ad limit is reached (don't want to add empty mounts if limit is reached) @@ -137,10 +137,11 @@ public class BotWeaponModLimitService(ISptLogger logge /// current number of this item on gun /// mod limit allowed /// role of bot we're checking weapon of + /// OPTIONAL: Type of mod, scope or lightlaser /// true if limit reached - protected bool WeaponModLimitReached(MongoId modTpl, ItemCount currentCount, int? maxLimit, string botRole) + protected bool WeaponModLimitReached(MongoId modTpl, ItemCount currentCount, int? maxLimit, string botRole, string modType = "scope") { - // No limit + // No limit, ignore if (maxLimit is null or 0) { return false; @@ -151,13 +152,13 @@ public class BotWeaponModLimitService(ISptLogger logge { if (logger.IsLogEnabled(LogLevel.Debug)) { - logger.Debug($"[{botRole}] scope limit reached! tried to add {modTpl} but scope count is {currentCount.Count}"); + logger.Debug($"[{botRole}] {modType} limit reached! tried to add: {modTpl} but scope count is: {currentCount.Count}"); } return true; } - // Increment scope count + // Increment mod count limit currentCount.Count++; return false;