public boolean correctHeatSinks(StringBuffer buff){
  if ((aero.getHeatType() != Aero.HEAT_SINGLE) && (aero.getHeatType() != Aero.HEAT_DOUBLE)) {
    buff.append("Invalid heatsink type!  Valid types are " + Aero.HEAT_SINGLE + " and "+ Aero.HEAT_DOUBLE+ ".  Found "+ aero.getHeatType()+ ".");
  }
  if (aero.getEntityType() == Entity.ETYPE_CONV_FIGHTER) {
    int maxWeapHeat=countHeatEnergyWeapons();
    int heatDissipation=0;
    if (aero.getHeatType() == Aero.HEAT_DOUBLE) {
      buff.append("Conventional fighters may only use single " + "heatsinks!");
      return false;
    }
    heatDissipation=aero.getHeatSinks();
    if (maxWeapHeat > heatDissipation) {
      buff.append("Conventional fighters must be able to " + "dissipate all heat from energy weapons! \n" + "Max energy heat: " + maxWeapHeat + ", max dissipation: "+ heatDissipation);
      return false;
    }
 else {
      return true;
    }
  }
 else {
    return true;
  }
}

public boolean correctHeatSinks ( StringBuffer buff ) { if ( ( aero . getHeatType ( ) != Aero . HEAT_SINGLE ) && ( aero . getHeatType ( ) != Aero . HEAT_DOUBLE ) ) { buff . append ( "Invalid heatsink type!  Valid types are " + Aero . HEAT_SINGLE + " and " + Aero . HEAT_DOUBLE + ".  Found " + aero . getHeatType ( ) + "." ) ; } if ( aero . getEntityType ( ) == Entity . ETYPE_CONV_FIGHTER ) { int maxWeapHeat = countHeatEnergyWeapons ( ) ; int heatDissipation = 0 ; if ( aero . getHeatType ( ) == Aero . HEAT_DOUBLE ) { buff . append ( "Conventional fighters may only use single " + "heatsinks!" ) ; return false ; } heatDissipation = aero . getHeatSinks ( ) ; if ( maxWeapHeat > heatDissipation ) { buff . append ( "Conventional fighters must be able to " + "dissipate all heat from energy weapons! \n" + "Max energy heat: " + maxWeapHeat + ", max dissipation: " + heatDissipation ) ; return false ; } else { return true ; } } else { return true ; } }
checks that the heatsink assignment is legal . conventional fighters must have enough heatsinks to dissipate heat from all of their energy weapons and they may only mount standard heatsinks . aerospace fighters must have at least 10 heatsinks .
