diff --git a/MekHQ/src/mekhq/campaign/unit/CargoStatistics.java b/MekHQ/src/mekhq/campaign/unit/CargoStatistics.java index ccd174d7ae..00890936aa 100644 --- a/MekHQ/src/mekhq/campaign/unit/CargoStatistics.java +++ b/MekHQ/src/mekhq/campaign/unit/CargoStatistics.java @@ -89,16 +89,6 @@ public double getCargoTonnage(final boolean inTransit, final boolean mothballed) double cargoTonnage = 0; double mothballedTonnage = 0; - int mechs = stats.getNumberOfUnitsByType(Entity.ETYPE_MECH); - int ds = stats.getNumberOfUnitsByType(Entity.ETYPE_DROPSHIP); - int sc = stats.getNumberOfUnitsByType(Entity.ETYPE_SMALL_CRAFT); - int cf = stats.getNumberOfUnitsByType(Entity.ETYPE_CONV_FIGHTER); - int asf = stats.getNumberOfUnitsByType(Entity.ETYPE_AEROSPACEFIGHTER); - int inf = stats.getNumberOfUnitsByType(Entity.ETYPE_INFANTRY); - int ba = stats.getNumberOfUnitsByType(Entity.ETYPE_BATTLEARMOR); - int lv = stats.getNumberOfUnitsByType(Entity.ETYPE_TANK, true); - int hv = stats.getNumberOfUnitsByType(Entity.ETYPE_TANK, false); - int protos = stats.getNumberOfUnitsByType(Entity.ETYPE_PROTOMECH); cargoTonnage += getCampaign().getWarehouse().streamSpareParts().filter(p -> inTransit || p.isPresent()) .mapToDouble(p -> p.getQuantity() * p.getTonnage()) diff --git a/MekHQ/src/mekhq/campaign/unit/HangarStatistics.java b/MekHQ/src/mekhq/campaign/unit/HangarStatistics.java index 56178ec4de..6dd740db98 100644 --- a/MekHQ/src/mekhq/campaign/unit/HangarStatistics.java +++ b/MekHQ/src/mekhq/campaign/unit/HangarStatistics.java @@ -53,11 +53,11 @@ public int getNumberOfUnitsByType(long type, boolean inTransit) { /** * Tally all used bay types and return a hashmap of ETYPE : Count * @param inTransit - * @param lv * @return */ public HashMap tallyBaysByType(boolean inTransit) { HashMap hashMap = new HashMap<>(); + for (Unit unit : getHangar().getUnits()) { if (!inTransit && !unit.isPresent()) { continue;