//Refreshes the displayed Equipment from the current Bot's parts public void RefreshEquipment() { // SetEquipmentMax(currentBot); //Retrieves all of the items currently equipped and store them List <Item> addToInventory = equipmentPanel.ClearEquippedItems(); Item previousItem; foreach (PartInfo part in currentBot.Equipment) { //Creating new item to add to equipment panel Item item = PartToItem(part); equipmentPanel.AddItem(item, out previousItem); inventory.AddItem(previousItem); } }