Renamed method to TryAddItemToBotContainer

This commit is contained in:
Chomp
2025-08-20 12:05:47 +01:00
parent 108e6d7512
commit d8987d55f7
3 changed files with 3 additions and 3 deletions
@@ -501,7 +501,7 @@ public class BotGeneratorHelper(
// Get x/y grid size of item
var (itemWidth, itemHeight) = inventoryHelper.GetItemSize(rootItemTplId, rootItemId, itemWithChildrenList);
var result = botInventoryContainerService.AddItemToBotContainer(
var result = botInventoryContainerService.TryAddItemToBotContainer(
botId,
equipmentSlotId,
itemWithChildrenList,
@@ -50,7 +50,7 @@ public class BotInventoryContainerService(ISptLogger<BotGeneratorHelper> logger,
/// <param name="itemWidth">Width of item with its children</param>
/// <param name="itemHeight">Height of item with its children</param>
/// <returns>ItemAddedResult</returns>
public ItemAddedResult AddItemToBotContainer(
public ItemAddedResult TryAddItemToBotContainer(
MongoId botId,
EquipmentSlots containerName,
List<Item> itemAndChildren,
@@ -190,7 +190,7 @@ public class BotGeneratorHelperTests
},
Upd = new Upd { StackObjectsCount = 1 },
};
_botInventoryContainerService.AddItemToBotContainer(botId, EquipmentSlots.Backpack, [akbsCartridge], botInventory, 1, 1);
_botInventoryContainerService.TryAddItemToBotContainer(botId, EquipmentSlots.Backpack, [akbsCartridge], botInventory, 1, 1);
var rootWeaponId = new MongoId();
var weaponWithChildren = CreateMp18(rootWeaponId);