private void OnDropHardpointModule(ShipModuleController droppedModule)
    {
        if (!module)
        {
            //only drop areas associated with a slot can be swapped like this
            return;
        }

        var player = PlayerShip.LocalPlayer;
        var loadout = player.Ship.ModuleLoadout;

        loadout.Swap(module.ModuleSlot, droppedModule.ModuleSlot);
    }
 public void OnSelectShipModule(ShipModuleController moduleController)
 {
     playerCargoList.HighlightedIndex = -1;
     targetCargoList.HighlightedIndex = -1;
 }
 private void OnDropHardpointModule(ShipModuleController module)
 {
     dragItem.gameObject.SetActive(false);
     dragItem.Module = null;
 }
 private void OnDragHardpointModule(ShipModuleController module)
 {
     dragItem.gameObject.SetActive(true);
     dragItem.Module = module;
 }
 private void OnSelectShipModule(ShipModuleController selected)
 {
     for (int moduleIndex = 0; moduleIndex < modules.Count; ++moduleIndex)
     {
         var module = modules[moduleIndex];
         if (module == selected)
         {
             HighlightedIndex = moduleIndex;
             break;
         }
     }
 }