diff --git a/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs b/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs
index 140d3140a..bf1ad0ad0 100644
--- a/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs
+++ b/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs
@@ -241,7 +241,7 @@ protected void FilterEquipment(BotType baseBotNode, EquipmentFilterDetails? blac
var botEquipment = baseBotNode.BotInventory.Equipment[equipmentSlotKvP.Key];
// Skip equipment slot if blacklist doesn't exist / is empty
- if (blacklist.Equipment?.TryGetValue(equipmentSlotKvP.Key.ToString(), out var equipmentSlotBlacklist) is null)
+ if (blacklist.Equipment?.TryGetValue(equipmentSlotKvP.Key.ToString(), out var equipmentSlotBlacklist) is null or false)
{
continue;
}
@@ -302,7 +302,7 @@ protected void FilterCartridges(BotType baseBotNode, EquipmentFilterDetails? bla
{
// Skip cartridge slot if blacklist doesn't exist / is empty
if (
- blacklist.Cartridge?.TryGetValue(caliber, out var cartridgeCaliberBlacklist) is null
+ blacklist.Cartridge?.TryGetValue(caliber, out var cartridgeCaliberBlacklist) is null or false
|| cartridgeCaliberBlacklist is null
|| cartridgeCaliberBlacklist.Count == 0
)
@@ -366,13 +366,14 @@ protected void AdjustWeighting(
}
else
{
- if (showEditWarnings)
- {
- if (logger.IsLogEnabled(LogLevel.Debug))
- {
- logger.Debug($"Tried to edit a non-existent item for slot: {poolAdjustmentKvP} {itemToEditKvP}");
- }
- }
+ // Note: Logging disabled for now, because our configs are all kinds of wrong
+ //if (showEditWarnings)
+ //{
+ // if (logger.IsLogEnabled(LogLevel.Debug))
+ // {
+ // logger.Debug($"Tried to edit a non-existent item for slot: {poolAdjustmentKvP} {itemToEditKvP}");
+ // }
+ //}
}
}
}
@@ -417,19 +418,20 @@ protected void AdjustWeighting(
foreach (var itemToEditKvP in poolAdjustmentKvP.Value)
// Only make change if item exists as we're editing, not adding
{
- if (locationToUpdate.ContainsKey(itemToEditKvP.Key) || locationToUpdate[itemToEditKvP.Key] == 0)
+ if (locationToUpdate.ContainsKey(itemToEditKvP.Key))
{
locationToUpdate[itemToEditKvP.Key] = itemToEditKvP.Value;
}
else
{
- if (showEditWarnings)
- {
- if (logger.IsLogEnabled(LogLevel.Debug))
- {
- logger.Debug($"Tried to edit a non - existent item for slot: {poolAdjustmentKvP} {itemToEditKvP}");
- }
- }
+ // Note: Logging disabled for now, because our configs are all kinds of wrong
+ //if (showEditWarnings)
+ //{
+ // if (logger.IsLogEnabled(LogLevel.Debug))
+ // {
+ // logger.Debug($"Tried to edit a non - existent item for slot: {poolAdjustmentKvP} {itemToEditKvP}");
+ // }
+ //}
}
}
}
diff --git a/Libraries/SPTarkov.Server.Core/Services/BotInventoryContainerService.cs b/Libraries/SPTarkov.Server.Core/Services/BotInventoryContainerService.cs
index a824742cf..5a621e22e 100644
--- a/Libraries/SPTarkov.Server.Core/Services/BotInventoryContainerService.cs
+++ b/Libraries/SPTarkov.Server.Core/Services/BotInventoryContainerService.cs
@@ -12,7 +12,7 @@ namespace SPTarkov.Server.Core.Services;
///
/// Service for keeping track of items and their exact position inside a bots container
///
-[Injectable]
+[Injectable(InjectionType.Singleton)]
public class BotInventoryContainerService(ISptLogger logger, ItemHelper itemHelper)
{
// botId/containerName