From af827c58f1067859fd338b207957208c10408947 Mon Sep 17 00:00:00 2001 From: cwspain Date: Tue, 16 Jan 2024 17:04:17 -0600 Subject: [PATCH] Show infantry bays on record sheet with platoon capacity rather than weight. --- megameklab/src/megameklab/printing/InventoryWriter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/megameklab/src/megameklab/printing/InventoryWriter.java b/megameklab/src/megameklab/printing/InventoryWriter.java index 0121424ec..514fa448a 100644 --- a/megameklab/src/megameklab/printing/InventoryWriter.java +++ b/megameklab/src/megameklab/printing/InventoryWriter.java @@ -890,6 +890,9 @@ public double printBayInfo(float fontSize, double lineHeight, double currY) { } else { capacity *= 4; } + } else if (b instanceof InfantryBay) { + // Divide total weight by weight required by platoon to get platoon capacity + capacity /= ((InfantryBay) b).getPlatoonType().getWeight(); } bayCapacityString.append(NumberFormat.getInstance().format(capacity)); if ((i + 1) < bays.size()) {