public static bool AddItemToInventory(MechLabInventoryWidget_ListView __instance, InventoryDataObject_BASE ItemData)
        {
            LogDebug("ShopTabLagFix: AddItemToInventory");
            var _this  = __instance;
            var _items = _this.ListView.Items;
            InventoryDataObject_BASE listElementController_BASE = null;

            foreach (InventoryDataObject_BASE listElementController_BASE2 in _this.inventoryData)
            {
                if (listElementController_BASE2.GetItemType() == ItemData.GetItemType() && listElementController_BASE2.IsDuplicateContent(ItemData) && _this.ParentDropTarget != null && _this.StackQuantities)
                {
                    listElementController_BASE = listElementController_BASE2;
                    break;
                }
            }

            if (listElementController_BASE != null)
            {
                listElementController_BASE.ModifyQuantity(1);
            }
            else
            {
                // OnItemAdded logic does not seem to be needed?
                // HBSLoopScroll 219-228
                _items.Add(ItemData);
            }
            return(false);
        }