@Override public boolean loadWeapon(Mounted mounted,Mounted mountedAmmo){
  boolean success=false;
  WeaponType wtype=(WeaponType)mounted.getType();
  AmmoType atype=(AmmoType)mountedAmmo.getType();
  if (mounted.getLocation() != mountedAmmo.getLocation()) {
    return success;
  }
  Mounted bay=whichBay(getEquipmentNum(mounted));
  if ((bay != null) && !bay.ammoInBay(getEquipmentNum(mountedAmmo))) {
    return success;
  }
  if (mountedAmmo.isAmmoUsable() && !wtype.hasFlag(WeaponType.F_ONESHOT) && (atype.getAmmoType() == wtype.getAmmoType())&& (atype.getRackSize() == wtype.getRackSize())) {
    mounted.setLinked(mountedAmmo);
    success=true;
  }
  return success;
}

@ Override public boolean loadWeapon ( Mounted mounted , Mounted mountedAmmo ) { boolean success = false ; WeaponType wtype = ( WeaponType ) mounted . getType ( ) ; AmmoType atype = ( AmmoType ) mountedAmmo . getType ( ) ; if ( mounted . getLocation ( ) != mountedAmmo . getLocation ( ) ) { return success ; } Mounted bay = whichBay ( getEquipmentNum ( mounted ) ) ; if ( ( bay != null ) && ! bay . ammoInBay ( getEquipmentNum ( mountedAmmo ) ) ) { return success ; } if ( mountedAmmo . isAmmoUsable ( ) && ! wtype . hasFlag ( WeaponType . F_ONESHOT ) && ( atype . getAmmoType ( ) == wtype . getAmmoType ( ) ) && ( atype . getRackSize ( ) == wtype . getRackSize ( ) ) ) { mounted . setLinked ( mountedAmmo ) ; success = true ; } return success ; }
need to check bay location before loading ammo
