/** * Is this a primitive ASF? * * @return */ public boolean isPrimitive() { return (getCockpitType() == Aero.COCKPIT_PRIMITIVE); }
public String getCockpitTypeString() { return Aero.getCockpitTypeString(getCockpitType()); }
/** * Checks that Conventional fighters only have a standard cockpit and that * Aerospace fighters have a valid cockpit (standard, small, primitive, * command console). * * @param buff * @return */ public boolean correctControlSystems(StringBuffer buff){ if ((aero.hasETypeFlag(Entity.ETYPE_CONV_FIGHTER)) && aero.getCockpitType() != Aero.COCKPIT_STANDARD){ buff.append( "Conventional fighters may only have standard cockpits!"); return false; } else if (aero.getCockpitType() < Aero.COCKPIT_STANDARD || aero.getCockpitType() > Aero.COCKPIT_PRIMITIVE){ buff.append( "Invalid cockpit type!"); return false; } return true; }
sBasic.append(" (" + a.getHeatSinkHits() + " damaged)"); if (a.getCockpitType() != Mech.COCKPIT_STANDARD) { sBasic.append("\n"); //$NON-NLS-1$ sBasic.append(Messages.getString("MechView.Cockpit"));
@Override public double getWeightControls() { // Controls for Aerospace Fighters and Conventional Fighters consists // of the cockpit and the fuel double weight; if (aero.hasETypeFlag(Entity.ETYPE_CONV_FIGHTER)) { // Weight = tonnage * 0.1 rounded to nearest half ton weight = Math.round(0.1 * aero.getWeight()*2) / 2.0; } else { weight = 3.0; if (aero.getCockpitType() == Aero.COCKPIT_SMALL) { weight = 2.0; } else if (aero.getCockpitType() == Aero.COCKPIT_COMMAND_CONSOLE){ weight = 6.0; } else if (aero.getCockpitType() == Aero.COCKPIT_PRIMITIVE) { weight = 5.0; } } return weight; }
setModelData("fuelMass", aero.getFuelTonnage()); setModelData("hsMass", NumberFormat.getInstance().format(testAero.getWeightHeatSinks())); if (aero.getCockpitType() == Aero.COCKPIT_STANDARD) { setModelData("cockpitType", "Cockpit"); } else { setModelData("cockpitType", Aero.getCockpitTypeString(aero.getCockpitType()));
public TechAdvancement getCockpitTechAdvancement() { return getCockpitTechAdvancement(getCockpitType()); }
if (a.getCockpitType() != Mech.COCKPIT_STANDARD) { sBasic.add(new LabeledElement(Messages.getString("MechView.Cockpit"), // $NON-NLS-1$ a.getCockpitTypeString()));
@Override public boolean hasCommandConsoleBonus() { return getCockpitType() == COCKPIT_COMMAND_CONSOLE && getCrew().hasActiveCommandConsole() && getWeightClass() >= EntityWeightClass.WEIGHT_HEAVY; }
if (getCockpitType() == Aero.COCKPIT_SMALL) { cockpitMod = 0.95; finalBV *= cockpitMod;
if (((Aero)entity1).getCockpitType() != ((Aero)entity2).getCockpitType()) { return false;
if (t instanceof Aero){ if (t.isFighter()) { blk.writeBlockData("cockpit_type", ((Aero)t).getCockpitType()); } else if ((t instanceof Dropship) && ((Aero)t).isPrimitive()) { blk.writeBlockData("collartype", ((Dropship)t).getCollarType());
if ((getCockpitType() == Aero.COCKPIT_SMALL) && !hasAbility(OptionsConstants.MD_BVDNI)) { prd.addModifier(1, "Small Cockpit");
ms.setCockpitType(((Mech) e).getCockpitType()); } else if ((e instanceof Aero)) { ms.setCockpitType(((Aero) e).getCockpitType()); } else {