Renamed method to TryAddItemToBotContainer
This commit is contained in:
@@ -501,7 +501,7 @@ public class BotGeneratorHelper(
|
|||||||
// Get x/y grid size of item
|
// Get x/y grid size of item
|
||||||
var (itemWidth, itemHeight) = inventoryHelper.GetItemSize(rootItemTplId, rootItemId, itemWithChildrenList);
|
var (itemWidth, itemHeight) = inventoryHelper.GetItemSize(rootItemTplId, rootItemId, itemWithChildrenList);
|
||||||
|
|
||||||
var result = botInventoryContainerService.AddItemToBotContainer(
|
var result = botInventoryContainerService.TryAddItemToBotContainer(
|
||||||
botId,
|
botId,
|
||||||
equipmentSlotId,
|
equipmentSlotId,
|
||||||
itemWithChildrenList,
|
itemWithChildrenList,
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class BotInventoryContainerService(ISptLogger<BotGeneratorHelper> logger,
|
|||||||
/// <param name="itemWidth">Width of item with its children</param>
|
/// <param name="itemWidth">Width of item with its children</param>
|
||||||
/// <param name="itemHeight">Height of item with its children</param>
|
/// <param name="itemHeight">Height of item with its children</param>
|
||||||
/// <returns>ItemAddedResult</returns>
|
/// <returns>ItemAddedResult</returns>
|
||||||
public ItemAddedResult AddItemToBotContainer(
|
public ItemAddedResult TryAddItemToBotContainer(
|
||||||
MongoId botId,
|
MongoId botId,
|
||||||
EquipmentSlots containerName,
|
EquipmentSlots containerName,
|
||||||
List<Item> itemAndChildren,
|
List<Item> itemAndChildren,
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ public class BotGeneratorHelperTests
|
|||||||
},
|
},
|
||||||
Upd = new Upd { StackObjectsCount = 1 },
|
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 rootWeaponId = new MongoId();
|
||||||
var weaponWithChildren = CreateMp18(rootWeaponId);
|
var weaponWithChildren = CreateMp18(rootWeaponId);
|
||||||
|
|||||||
Reference in New Issue
Block a user