public void SetParentInventory() { int SlotNum = 1; foreach (InventorySlot IS in InventorySlots) { IS.slotNumber = SlotNum; SlotNum++; IS.SetParentInventory(this); IS.RememberHeldItem(); IS.CalculateWeight(); InventoryWeight += IS.slotWeight; IS.ResetIventory(ItemTransform); } CalculateAddableWeight(); IA.SetInventory(); IA.SetHotbar(); }