Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include door count for SV transport bays #1702

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion megameklab/src/megameklab/printing/InventoryWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ public void writeEquipment() {

float[] metrics = scaleText(viewHeight - (yPosition - viewY), this::calcLineCount);
yPosition = printEquipmentTable(equipment, yPosition, metrics[0], metrics[1]);
if (sheet.getEntity() instanceof SmallCraft && !transportBays.isEmpty()) {
if ((sheet.getEntity() instanceof SmallCraft || sheet.getEntity() instanceof SupportTank) && !transportBays.isEmpty()) {
printBayInfo(metrics[0], metrics[1], yPosition);
}
if (sheet.showHeatProfile()) {
Expand Down
15 changes: 5 additions & 10 deletions megameklab/src/megameklab/printing/PrintTank.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,12 @@
import java.util.StringJoiner;
import java.util.stream.Collectors;

import megamek.common.*;
import megameklab.util.CConfig;
import megameklab.util.RSScale;
import org.w3c.dom.Element;
import org.w3c.dom.svg.SVGRectElement;

import megamek.common.Bay;
import megamek.common.Entity;
import megamek.common.EntityMovementMode;
import megamek.common.MiscType;
import megamek.common.StandardSeatCargoBay;
import megamek.common.Tank;
import megamek.common.Transporter;
import megamek.common.InfantryCompartment;
import megamek.common.VTOL;
import megameklab.printing.reference.ClusterHitsTable;
import megameklab.printing.reference.GroundMovementRecord;
import megameklab.printing.reference.GroundToHitMods;
Expand Down Expand Up @@ -203,7 +197,8 @@ public String formatFeatures() {
transport.merge("Infantry Compartment", t.getUnused(), Double::sum);
} else if (t instanceof StandardSeatCargoBay) {
seating.merge(((Bay) t).getType(), (int) ((Bay) t).getCapacity(), Integer::sum);
} else if (t instanceof Bay) {
// SVs have separate Bay handling similar to Small Craft, with doors. CVs just have bulk cargo space.
} else if (t instanceof Bay && !(tank instanceof SupportTank)) {
transport.merge(((Bay) t).getType(), ((Bay) t).getCapacity(), Double::sum);
}
}
Expand Down
Loading