} if (en instanceof Tank) { if (en.hasTargComp()) { Enumeration equip = en.getEquipment(); while (equip.hasMoreElements()) { Mounted m = (Mounted)equip.nextElement(); if (m.getType() instanceof MiscType && m.getType().hasFlag(MiscType.F_TARGCOMP) ) { return m; } } }
    public Mounted getSelectedEquipment() {        int loc = locList.getSelectedIndex();        int slot = slotList.getSelectedIndex();        if (loc == -1 || slot == -1) {            return null;        }        final CriticalSlot cs = en.getCritical(loc, slot);        if (null == cs) {            return null;        }        if (cs.getType() == CriticalSlot.TYPE_SYSTEM) {            return null;        }        return en.getEquipment (cs.getIndex());    }