modeLabel.setEnabled(true);
m_chMode.setEnabled(true);
m_chMode.removeAll();
for (Enumeration<EquipmentMode> e = m.getType()
.getModes(); e.hasMoreElements();) {
EquipmentMode em = e.nextElement();
m_chMode.add(em.getDisplayableName());
}
m_chMode.select(m.curMode().getDisplayableName());
}
} else if ((m != null) && bOwner && m.getType().hasModes()) {
if (!m.isDestroyed() && en.isActive()) {
m_chMode.setEnabled(true);
}
if (!m.isDestroyed() && !en.isActive()
&& en.isCapitalFighter()
&& en.isPartOfFighterSquadron()) {
m_chMode.setEnabled(true);
}
if (!m.isDestroyed()
&& m.getType().hasFlag(MiscType.F_STEALTH)) {
m_chMode.setEnabled(true);
}
// If not using tacops Energy Weapon rule then remove all
// the dial down statements
if (m.getType().hasFlag(WeaponType.F_ENERGY)
&& (((WeaponType) m.getType()).getAmmoType() == AmmoType.T_NA)
&& !clientgui.getClient().game.getOptions()
.booleanOption("tacops_energy_weapons")) {
m_chMode.removeAll();
return;
}
// If not using tacops Gauss Weapon rule then remove all the
// power up/down modes
if ((m.getType() instanceof GaussWeapon)
&& !clientgui.getClient().game.getOptions()
.booleanOption("tacops_gauss_weapons")) {
m_chMode.removeAll();
return;
}
// disable rapid fire mode switching for Aeros
if (((en instanceof Aero) && (m.getType() instanceof ACWeapon))
|| (m.getType() instanceof RACWeapon)
|| (m.getType() instanceof UACWeapon)) {
m_chMode.removeAll();
return;
}
modeLabel.setEnabled(true);
m_chMode.removeAll();
for (Enumeration<EquipmentMode> e = m.getType().getModes(); e
.hasMoreElements();) {
EquipmentMode em = e.nextElement();
m_chMode.add(em.getDisplayableName());
}
m_chMode.select(m.curMode().getDisplayableName());
} else {
CriticalSlot cs = getSelectedCritical();
if ((cs != null) && (cs.getType() == CriticalSlot.TYPE_SYSTEM)) {