From 018e993f8096ecc9d5c1d61901b4f99859722ed2 Mon Sep 17 00:00:00 2001 From: DM0000 <98051919+DM0000@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:24:05 -0700 Subject: [PATCH] mixedtech check and add appropriate tag --- .../megamek/client/ui/swing/unitDisplay/WeaponPanel.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/megamek/src/megamek/client/ui/swing/unitDisplay/WeaponPanel.java b/megamek/src/megamek/client/ui/swing/unitDisplay/WeaponPanel.java index a9e3999292..f305dbbf48 100644 --- a/megamek/src/megamek/client/ui/swing/unitDisplay/WeaponPanel.java +++ b/megamek/src/megamek/client/ui/swing/unitDisplay/WeaponPanel.java @@ -238,6 +238,10 @@ public String getElementAt(int index) { StringBuilder wn = new StringBuilder(mounted.getDesc()); wn.append(" ["); wn.append(en.getLocationAbbr(mounted.getLocation())); + //Check if mixedTech and add Clan or IS tag + if (en.isMixedTech()) { + wn.insert(0, wtype.isClan() ? "(C) " : "(IS) "); + } if (mounted.isSplit()) { wn.append('/'); wn.append(en.getLocationAbbr(mounted.getSecondLocation())); @@ -1371,7 +1375,7 @@ public int getSelectedWeaponNum() { /** * Selects the first valid weapon in the weapon list. - * + * * @return The weapon id of the weapon selected */ public int selectFirstWeapon() { @@ -2794,7 +2798,7 @@ public void preferenceChange(PreferenceChangeEvent e) { * Updates the Weapon Panel with the information for the given entity. If the * given entity * is `null`, this method will do nothing. - * + * * @param entity - The weapon panel will update info based on the {@link Entity} * provided. */