.NET Format Style Fixes

This commit is contained in:
sp-tarkov-bot
2025-07-22 18:42:12 +00:00
parent 5bbf671acd
commit 22da08bca5
4 changed files with 19 additions and 11 deletions
+3 -1
View File
@@ -15,6 +15,7 @@ public class DI
private static IServiceProvider _serviceProvider;
private static DI? _instance;
private DI()
{
ConfigureServices();
@@ -59,7 +60,8 @@ public class DI
}
}
public T GetService<T>() where T : notnull
public T GetService<T>()
where T : notnull
{
return _serviceProvider.GetRequiredService<T>();
}
@@ -127,7 +127,20 @@ public class BotGeneratorHelperTests
botInventory
);
_botLootGenerator.AddLootFromPool(new Dictionary<MongoId, double>{{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}}, [EquipmentSlots.Backpack], 4, botInventory, "assault", null);
_botLootGenerator.AddLootFromPool(
new Dictionary<MongoId, double>
{
{ 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 },
},
[EquipmentSlots.Backpack],
4,
botInventory,
"assault",
null
);
Assert.AreEqual(ItemAddedResult.SUCCESS, result);
@@ -173,13 +173,7 @@ public class InventoryHelperTests
Template = "6699249f3c4fda6471005cba",
ParentId = root.Id,
SlotId = "mod_stock",
Upd = new Upd
{
Foldable = new UpdFoldable
{
Folded = true
}
},
Upd = new Upd { Foldable = new UpdFoldable { Folded = true } },
};
weaponWithChildren.Add(stock);