diff --git a/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs index 2f78554a..b4ec8ec3 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs @@ -734,7 +734,7 @@ public class BotGeneratorHelper( { // Check item in container for children, store for later insertion into `containerItemsToCheck` // (used later when figuring out how much space weapon takes up) - List itemsToFilter = [..itemsWithoutLocation, rootItem]; + List itemsToFilter = [.. itemsWithoutLocation, rootItem]; var itemWithChildItems = itemsToFilter.FindAndReturnChildrenAsItems(rootItem.Id); // Item had children, replace existing data with item + its children diff --git a/UnitTests/Tests/Helpers/BotGeneratorHelperTests.cs b/UnitTests/Tests/Helpers/BotGeneratorHelperTests.cs index 8c7e6e4d..cd904620 100644 --- a/UnitTests/Tests/Helpers/BotGeneratorHelperTests.cs +++ b/UnitTests/Tests/Helpers/BotGeneratorHelperTests.cs @@ -132,9 +132,16 @@ public class BotGeneratorHelperTests { ItemTpl.BARTER_MALBORO_CIGARETTES, 1 }, { ItemTpl.FOREGRIP_SAKO_TRG_M10_GRIP_PAD, 1 }, { ItemTpl.BARTER_GOLD_SKULL_RING, 1 }, - { ItemTpl.BARTER_PACK_OF_NAILS, 1 } + { ItemTpl.BARTER_PACK_OF_NAILS, 1 }, }; - _botLootGenerator.AddLootFromPool(tplsToAdd, [EquipmentSlots.Backpack], 4, botInventory, "assault", null); + _botLootGenerator.AddLootFromPool( + tplsToAdd, + [EquipmentSlots.Backpack], + 4, + botInventory, + "assault", + null + ); Assert.AreEqual(ItemAddedResult.SUCCESS, result); @@ -145,8 +152,15 @@ public class BotGeneratorHelperTests foreach (var item in botInventory.Items.Where(i => tplsToAdd.ContainsKey(i.Template))) { var location = item.Location as ItemLocation; - Assert.True(location.X >= 0 && location.X <= 3, "Error! An item was misplaced on the X axis inside the item grid!"); - Assert.AreEqual(1, location.Y, "Error! An item was misplaced on the Y axis inside the item grid!"); + Assert.True( + location.X >= 0 && location.X <= 3, + "Error! An item was misplaced on the X axis inside the item grid!" + ); + Assert.AreEqual( + 1, + location.Y, + "Error! An item was misplaced on the Y axis inside the item grid!" + ); } }