When picking up an item via X or right-click the SCR_InventoryStorageManagerComponent::OnItemAdded event triggers twice when picking up an item. In some situations, it invokes only once correctly maybe because an item of the same type was already present in the target storage, but as the video below shows for others it does not.
This makes it very difficult to do any scripting related to the event as you can not know if the event will be called once or twice per inventory operation. If on the first call some destructive work is done, e.g. removing information from a buffer, the second invoke will behave differently.
modded class SCR_InventoryStorageManagerComponent { //------------------------------------------------------------------------------------------------ override protected void OnItemAdded(BaseInventoryStorageComponent storageOwner, IEntity item) { PrintFormat("%1 added to %2", item, storageOwner); super.OnItemAdded(storageOwner, item); } }