wn += " (" + shotsLeft + "/" + totalShotsLeft + ")";
wn.append(" ("); wn.append(shotsLeft); wn.append("/"); wn.append(totalShotsLeft); wn.append(")");
    public void displayMech(Entity en) {        // Grab a copy of the game.        Game game = client.getClient().game;        // update pointer to weapons        this.weapons = en.getWeaponList();        this.entity = en;        int currentHeatBuildup = en.heat // heat from last round            + en.getEngineCritHeat() // heat engine crits will add            + en.heatBuildup; // heat we're building up this round        if ( en instanceof Mech && en.infernos.isStillBurning() ) { // hit with inferno ammo            currentHeatBuildup += en.infernos.getHeat();        }        Coords position = entity.getPosition();        if (!en.isOffBoard()) {            if ( position != null                    && game.getBoard().getHex(position).levelOf(Terrain.FIRE) == 2 ) {                   currentHeatBuildup += 5; // standing in fire               }        }        if ( en instanceof Mech && en.isStealthActive() ) {            currentHeatBuildup += 10; // active stealth heat        }        // update weapon list        weaponList.removeAll();        m_chAmmo.removeAll();        m_chAmmo.setEnabled(false);        for(int i = 0; i < weapons.size(); i++) {            Mounted mounted = (Mounted) weapons.elementAt(i);            WeaponType wtype = (WeaponType) mounted.getType();            // TODO : make this a StringBuffer.            String wn = mounted.getDesc()                        + " [" + en.getLocationAbbr(mounted.getLocation()) + "]";            // determine shots left & total shots left            if (wtype.getAmmoType() != AmmoType.T_NA                && !wtype.hasFlag(WeaponType.F_ONESHOT)) {                int shotsLeft = 0;                if (mounted.getLinked() != null                    && !mounted.getLinked().isDumping()) {                    shotsLeft = mounted.getLinked().getShotsLeft();                }                EquipmentType typeUsed = null;                if (null != mounted.getLinked()) {                    typeUsed = mounted.getLinked().getType();                }                int totalShotsLeft = entity.getTotalMunitionsOfType(typeUsed);                wn += " (" + shotsLeft + "/" + totalShotsLeft + ")";            }                        // MG rapidfire            if (mounted.isRapidfire()) {                wn += " [Rapid Fire]";            }            // Fire Mode - lots of things have variable modes            if (wtype.hasModes()) {                wn += " " + mounted.curMode();            }            weaponList.add(wn);            if (mounted.isUsedThisRound()                && game.getPhase() == Game.PHASE_FIRING) {                // add heat from weapons fire to heat tracker                currentHeatBuildup += wtype.getHeat() * mounted.howManyShots();            }        }        // This code block copied from the MovementPanel class,        //  bad coding practice (duplicate code).        int heatCap = en.getHeatCapacity();        int heatCapWater = en.getHeatCapacityWithWater();        String heatCapacityStr = Integer.toString(heatCap);        if ( heatCap < heatCapWater ) {          heatCapacityStr = heatCap + " [" + heatCapWater + "]";        }        // end duplicate block        String heatText = Integer.toString(currentHeatBuildup);        if (currentHeatBuildup > en.getHeatCapacityWithWater()) {            heatText += "*"; // overheat indication        }        this.currentHeatBuildupR.setText(heatText + " (" + heatCapacityStr + ")");        // If MaxTech range rules are in play, display the extreme range.        if (game.getOptions().booleanOption("maxtech_range")) {            wExtL.setVisible (true);            wExtR.setVisible (true);        }        else {            wExtL.setVisible (false);            wExtR.setVisible (false);        }    }