if (m.getType().hasModes()) { sb.append(" (").append(m.curMode().getDisplayableName()).append(")"); } slotList.add(sb.toString()); } } } if (clientgui.getClient().game.getOptions().booleanOption("maxtech_eccm")) { for (Mounted m : en.getMisc()) { if (m.getType().hasFlag(MiscType.F_ECM)) { StringBuffer sb = new StringBuffer(32); sb.append(m.isDestroyed() ? "*" : "").append(m.isBreached() ? "x" : "").append(m.getDesc()); if (m.getType().hasModes()) { sb.append(" (").append(m.curMode().getDisplayableName()).append(")"); }
        public void displaySlots() {            int loc = locList.getSelectedIndex();            slotList.removeAll();            for (int i = 0; i < en.getNumberOfCriticals(loc); i++) {                final CriticalSlot cs = en.getCritical(loc, i);                StringBuffer sb = new StringBuffer(32);                if (cs == null) {                    sb.append("---"); //$NON-NLS-1$                } else {                    switch (cs.getType()) {                        case CriticalSlot.TYPE_SYSTEM:                            sb.append(cs.isDestroyed() ? "*" : "")//$NON-NLS-1$ //$NON-NLS-2$                                    .append(cs.isBreached() ? "x" : ""); //$NON-NLS-1$ //$NON-NLS-2$                            // Protomechs have different systme names.                            if (en instanceof Protomech) {                                sb.append(Protomech.systemNames[cs.getIndex()]);                            } else {                                sb.append(((Mech) en).getSystemName(cs.getIndex()));                            }                            break;                        case CriticalSlot.TYPE_EQUIPMENT:                            Mounted m = en.getEquipment(cs.getIndex());                            sb.append(cs.isDestroyed() ? "*" : "").append(cs.isBreached() ? "x" : "").append(m.getDesc()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$                            if ( m.isHotLoaded() )                                sb.append(Messages.getString("MechDisplay.isHotLoaded")); //$NON-NLS-1$                            if (m.getType().hasModes()) {                                sb.append(" (").append(m.curMode().getDisplayableName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$                                if (m.getType() instanceof MiscType && ((MiscType) m.getType()).isShield()) {                                    sb.append(" " + m.getDamageAbsorption(en, loc) + "/" +  m.getCurrentDamageCapacity(en, loc) + ")");                                }                            }                            break;                    }                }                slotList.add(sb.toString());            }            if (en instanceof Tank || en instanceof GunEmplacement) {                if (en.hasTargComp()) {                    for (Mounted m : en.getEquipment()) {                        if ((m.getType() instanceof MiscType &&                                m.getType().hasFlag(MiscType.F_TARGCOMP))) {                            StringBuffer sb = new StringBuffer(32);                            sb.append(m.isDestroyed() ? "*" : "").append(m.isBreached() ? "x" : "").append(m.getDesc()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$                            if (m.getType().hasModes()) {                                sb.append(" (").append(m.curMode().getDisplayableName()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$                            }                            slotList.add(sb.toString());                        }                    }                }                if (clientgui.getClient().game.getOptions().booleanOption("maxtech_hotload")) {                    for (Mounted m : en.getEquipment()) {                        if ((m.getType() instanceof AmmoType)                                && m.getType().hasFlag(AmmoType.F_HOTLOAD)) {                            StringBuffer sb = new StringBuffer(32);                            sb.append(m.isDestroyed() ? "*" : "").append(m.isBreached() ? "x" : "").append(m.getDesc()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$                            slotList.add(sb.toString());                        }                    }                }            }        }