Closed Nordsoft91 closed 4 months ago
There is prototype
{ "id": "my_item", "max_stack_size": 5 },
There are 2 items of same id "my_item" in one InventoryStacked
$InventoryItem1 { "id": "my_item", "max_stack_size": 5, "stack_size": 4 }, $InventoryItem2 { "id": "my_item", "max_stack_size": 5, "stack_size": 2 },
I want to have a method to do auto split-merge (InventoryItem2 -> InventoryItem1):
$InventoryItem1 { "id": "my_item", "max_stack_size": 5, "stack_size": 5 }, $InventoryItem2 { "id": "my_item", "max_stack_size": 5, "stack_size": 1 },
pack(item) has been added to InventoryStacked and InventoryGridStacked in v2.4.9. It can be used to merge the given item stack with all compatible items in the same inventory.
pack(item)
InventoryStacked
InventoryGridStacked
There is prototype
There are 2 items of same id "my_item" in one InventoryStacked
I want to have a method to do auto split-merge (InventoryItem2 -> InventoryItem1):