public void EquipItem(HackerMod hackerMod) { Debug.Log("Hackermod stuff"); List <HackerModChip> equippedChips = new List <HackerModChip>(); switch (hackerMod.GetItemType()) { case Item.ItemTypes.NeuralImplant: equippedChips = neuralImplant.GetAttachedChips(); if (equippedChips.Count < hackerMod.GetCurrentLevelSlotCount()) { equippedChips.AddRange(FillEmptySlotsWithInventoryItems(Item.ItemTypes.Wetware, hackerMod.GetCurrentLevelSlotCount() - equippedChips.Count)); } neuralImplant = hackerMod; break; case Item.ItemTypes.Rig: equippedChips = rig.GetAttachedChips(); if (equippedChips.Count < hackerMod.GetCurrentLevelSlotCount()) { equippedChips.AddRange(FillEmptySlotsWithInventoryItems(Item.ItemTypes.Software, hackerMod.GetCurrentLevelSlotCount() - equippedChips.Count)); } rig = hackerMod; break; case Item.ItemTypes.Uplink: equippedChips = uplink.GetAttachedChips(); if (equippedChips.Count < hackerMod.GetCurrentLevelSlotCount()) { equippedChips.AddRange(FillEmptySlotsWithInventoryItems(Item.ItemTypes.Chipset, hackerMod.GetCurrentLevelSlotCount() - equippedChips.Count)); } uplink = hackerMod; break; } for (int i = 0; i < hackerMod.GetCurrentLevelSlotCount(); i++) { hackerMod.InstallChip(equippedChips[i], i); } }