.NET Format Style Fixes
This commit is contained in:
@@ -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<Item> itemsToFilter = [..itemsWithoutLocation, rootItem];
|
||||
List<Item> itemsToFilter = [.. itemsWithoutLocation, rootItem];
|
||||
var itemWithChildItems = itemsToFilter.FindAndReturnChildrenAsItems(rootItem.Id);
|
||||
|
||||
// Item had children, replace existing data with item + its children
|
||||
|
||||
@@ -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!"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user