void WeaponSystem_WeaponUnregistered(MyGridWeaponSystem sender, MyGridWeaponSystem.EventArgs args)
 {
     if (m_shipController.Pilot != null && args.Weapon.DefinitionId == m_gunId)
     {
         if (m_currentGuns.Contains(args.Weapon))
         {
             args.Weapon.OnControlReleased();
             m_currentGuns.Remove(args.Weapon);
         }
     }
 }
 void WeaponSystem_WeaponRegistered(MyGridWeaponSystem sender, MyGridWeaponSystem.EventArgs args)
 {
     if (m_shipController.Pilot != null && args.Weapon.DefinitionId == m_gunId)
     {
         if (m_useSingleGun)
         {
             if (m_currentGuns.Count < 1)
             {
                 args.Weapon.OnControlAcquired(m_shipController.Pilot);
                 m_currentGuns.Add(args.Weapon);
             }
         }
         else
         {
             args.Weapon.OnControlAcquired(m_shipController.Pilot);
             m_currentGuns.Add(args.Weapon);
         }
     }
 }