diff --git a/MekHQ/src/mekhq/Utilities.java b/MekHQ/src/mekhq/Utilities.java index 90fef5eaa4..fd0eb58ffe 100644 --- a/MekHQ/src/mekhq/Utilities.java +++ b/MekHQ/src/mekhq/Utilities.java @@ -1269,19 +1269,14 @@ public static MechSummary retrieveOriginalUnit(Entity newE) throws EntityLoading cacheInstance.loadMechData(); // I need to change the new entity to the one from the mtf file now, so that equipment numbers will match - MechSummary summary = cacheInstance.getMech(newE.getChassis() + " " + newE.getModel()); + MechSummary summary = cacheInstance.getMech(newE.getFullChassis() + " " + newE.getModel()); - // Need to deal with old naming conventions if (null == summary) { + // Attempt to deal with new naming convention directly summary = cacheInstance.getMech( newE.getChassis() + " (" + newE.getClanChassisName() + ") " + newE.getModel()); } - // Try the first fuzzy match - if (null == summary) { - summary = cacheInstance.fuzzyGetMech(newE.getChassis() + " " + newE.getModel()).get(0); - } - // If we got this far with no summary loaded, give up if (null == summary) { throw new EntityLoadingException(String.format("Could not load %s %s from the mech cache", diff --git a/MekHQ/src/mekhq/gui/dialog/ChooseRefitDialog.java b/MekHQ/src/mekhq/gui/dialog/ChooseRefitDialog.java index fa2afdc9c7..e2c3de0c84 100644 --- a/MekHQ/src/mekhq/gui/dialog/ChooseRefitDialog.java +++ b/MekHQ/src/mekhq/gui/dialog/ChooseRefitDialog.java @@ -261,8 +261,9 @@ private void populateRefits() { List refits = new ArrayList<>(); Entity e = unit.getEntity(); for (String model : Utilities.getAllVariants(e, campaign)) { - MechSummary summary = MechSummaryCache.getInstance().getMech(e.getChassis() + " " + model); + MechSummary summary = MechSummaryCache.getInstance().getMech(e.getFullChassis() + " " + model); if (null == summary) { + // Attempt to deal with new naming scheme directly summary = MechSummaryCache.getInstance().getMech(e.getChassis() + " (" + e.getClanChassisName() + ") " + model); if (null == summary) { continue;