Skip to content

Commit

Permalink
Issue MegaMek#1016 Always print CASE/CASEII in location header
Browse files Browse the repository at this point in the history
  • Loading branch information
SJuliez committed Jan 26, 2022
1 parent 0dd5bc6 commit 8906ae1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/megameklab/com/printing/PrintMech.java
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,10 @@ private void writeLocationCriticals(int loc, SVGRectElement svgRect) {
double x = viewX + viewWidth * 0.075;
x += addTextElement(canvas, x, viewY - 1, mech.getLocationName(loc),
fontSize * 1.25f, SVGConstants.SVG_START_VALUE, SVGConstants.SVG_BOLD_VALUE);
if (mech.isClan() && UnitUtil.hasAmmo(mech, loc) && !mech.hasCASEII(loc)) {
addTextElement(canvas, x + fontSize / 2, viewY - 1, "(CASE)", fontSize,
if ((mech.isClan() && UnitUtil.hasAmmo(mech, loc))
|| (!mech.isClan() && (mech.hasCASEII(loc) || mech.locationHasCase(loc)))) {
String text = "(CASE" + (mech.hasCASEII(loc) ? " II)" : ")");
addTextElement(canvas, x + fontSize / 2, viewY - 1, text, fontSize,
SVGConstants.SVG_START_VALUE, SVGConstants.SVG_NORMAL_VALUE);
}

Expand Down

0 comments on commit 8906ae1

Please sign in to comment.