Entity e = clientgui.mechD.getCurrentEntity();
    private Mounted getSelectedArtilleryWeapon() {        Entity e = clientgui.mechD.getCurrentEntity();        Mounted weapon = null;                if(e != null) {            weapon = e.getEquipment(clientgui.mechD.wPan.getSelectedWeaponNum());        }        if (weapon != null) {            if(!(weapon.getType() instanceof WeaponType && weapon.getType().hasFlag(WeaponType.F_ARTILLERY))) {                weapon = null;            }            //otherwise, a weapon is selected, and it is artillery        }        return weapon;    }